~mwinter4/maus/ckov-update

« back to all changes in this revision

Viewing changes to src/common_cpp/Optics/OpticsModel.hh

  • Committer: Chris Rogers
  • Date: 2012-11-23 11:19:42 UTC
  • mfrom: (659.1.50 release-candidate)
  • Revision ID: chris.rogers@stfc.ac.uk-20121123111942-5wi23zn7zx396q2d
Tags: MAUS-v0.4.1
MAUS-v0.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of MAUS: http://  micewww.pp.rl.ac.uk:8080/projects/maus
 
2
 * 
 
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.
 
7
 * 
 
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.
 
12
 * 
 
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/>.
 
15
 */
 
16
 
 
17
/* Author: Peter Lane
 
18
 */
 
19
 
 
20
#ifndef SRC_COMMON_CPP_OPTICS_OPTICS_MODEL_HH
 
21
#define SRC_COMMON_CPP_OPTICS_OPTICS_MODEL_HH
 
22
 
 
23
#include "src/common_cpp/Optics/TransferMap.hh"
 
24
 
 
25
namespace Json {
 
26
  class Value;
 
27
}
 
28
 
 
29
namespace MAUS {
 
30
 
 
31
class OpticsModel {
 
32
 public:
 
33
  OpticsModel() : configuration_(NULL) { }
 
34
  virtual ~OpticsModel() { }
 
35
 
 
36
  virtual void Build() = 0;
 
37
 
 
38
  /* @brief transports a beam envelope (covariance matrix) between the first
 
39
   *        simulation plane and the specified end plane.
 
40
   *
 
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
 
45
   */
 
46
  virtual CovarianceMatrix Transport(const CovarianceMatrix & covariances,
 
47
                                     const double end_plane)
 
48
      const = 0;
 
49
 
 
50
  /* @brief transports a beam envelope (covariance matrix) between two z planes.
 
51
   *
 
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
 
56
   */
 
57
  virtual CovarianceMatrix Transport(const CovarianceMatrix & covariances,
 
58
                                     const double start_plane,
 
59
                                     const double end_plane)
 
60
      const = 0;
 
61
 
 
62
  /* @brief transports a phase space vector ({t, E, x, Px, y, Py}) between the first
 
63
   *        simulation plane and the specified end plane.
 
64
   *
 
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
 
68
   */
 
69
  virtual PhaseSpaceVector Transport(const PhaseSpaceVector & vector,
 
70
                                     const double end_plane)
 
71
      const = 0;
 
72
 
 
73
  /* @brief transports a phase space vector ({t, E, x, Px, y, Py}) between two
 
74
   *  z planes.
 
75
   *
 
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
 
79
   */
 
80
  virtual PhaseSpaceVector Transport(const PhaseSpaceVector & vector,
 
81
                                     const double start_plane,
 
82
                                     const double end_plane)
 
83
      const = 0;
 
84
 
 
85
  Json::Value const * configuration() const {return configuration_;}
 
86
 
 
87
  const double first_plane() const {return first_plane_;}
 
88
  void set_first_plane(const double first_plane) {first_plane_ = first_plane;}
 
89
 protected:
 
90
  Json::Value const * configuration_;
 
91
  double first_plane_;
 
92
};
 
93
}
 
94
 
 
95
#endif