1
/* This file is part of MAUS: http:// micewww.pp.rl.ac.uk:8080/projects/maus
3
* MAUS is free software: you can redistribute it and/or modify
4
* it under the terms of the GNU General Public License as published by
5
* the Free Software Foundation, either version 3 of the License, or
6
* (at your option) any later version.
8
* MAUS is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with MAUS. If not, see <http:// www.gnu.org/licenses/>.
20
#ifndef SRC_COMMON_CPP_OPTICS_OPTICS_MODEL_HH
21
#define SRC_COMMON_CPP_OPTICS_OPTICS_MODEL_HH
23
#include "src/common_cpp/Optics/TransferMap.hh"
33
OpticsModel() : configuration_(NULL) { }
34
virtual ~OpticsModel() { }
36
virtual void Build() = 0;
38
/* @brief transports a beam envelope (covariance matrix) between the first
39
* simulation plane and the specified end plane.
41
* @params covariances the matrix of second moments of the phase space
42
* variables {t, E, x, Px, y, Py} to be transported
43
* @params start_plane the z plane to transport from
44
* @params end_plane the z plane to transport to
46
virtual CovarianceMatrix Transport(const CovarianceMatrix & covariances,
47
const double end_plane)
50
/* @brief transports a beam envelope (covariance matrix) between two z planes.
52
* @params covariances the matrix of second moments of the phase space
53
* variables {t, E, x, Px, y, Py} to be transported
54
* @params start_plane the z plane to transport from
55
* @params end_plane the z plane to transport to
57
virtual CovarianceMatrix Transport(const CovarianceMatrix & covariances,
58
const double start_plane,
59
const double end_plane)
62
/* @brief transports a phase space vector ({t, E, x, Px, y, Py}) between the first
63
* simulation plane and the specified end plane.
65
* @params vector the phase space vector to be transported
66
* @params start_plane the z plane to transport from
67
* @params end_plane the z plane to transport to
69
virtual PhaseSpaceVector Transport(const PhaseSpaceVector & vector,
70
const double end_plane)
73
/* @brief transports a phase space vector ({t, E, x, Px, y, Py}) between two
76
* @params vector the phase space vector to be transported
77
* @params start_plane the z plane to transport from
78
* @params end_plane the z plane to transport to
80
virtual PhaseSpaceVector Transport(const PhaseSpaceVector & vector,
81
const double start_plane,
82
const double end_plane)
85
Json::Value const * configuration() const {return configuration_;}
87
const double first_plane() const {return first_plane_;}
88
void set_first_plane(const double first_plane) {first_plane_ = first_plane;}
90
Json::Value const * configuration_;