CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SingleParticleEvent.h
Go to the documentation of this file.
1 #ifndef SingleParticleEvent_h
2 #define SingleParticleEvent_h
3 //
4 // SingleParticleEvent by droll (23/DEC/2005)
5 //
6 
7 // include files
10 #include <iostream>
11 
13 public:
14  // constructor
16  ID = 0;
17  Px = 0.;
18  Py = 0.;
19  Pz = 0.;
20  E = 0.;
21  M = 0.;
22  Vx = 0.;
23  Vy = 0.;
24  Vz = 0.;
25  T0 = 0.;
26  ID_in = 0;
27  Px_in = 0.;
28  Py_in = 0.;
29  Pz_in = 0.;
30  E_in = 0.;
31  M_in = 0.;
32  Vx_in = 0.;
33  Vy_in = 0.;
34  Vz_in = 0.;
35  T0_in = 0.;
36  HitTarget = false;
39  RhoAir = 0.;
40  RhoWall = 0.;
41  RhoRock = 0.;
42  RhoClay = 0.;
43  RhoPlug = 0.;
45  }
46  // destructor
48 
49 private:
50  int ID;
51  double Px;
52  double Py;
53  double Pz;
54  double E;
55  double M;
56  double Vx;
57  double Vy;
58  double Vz;
59  double T0;
60  int ID_in;
61  double Px_in;
62  double Py_in;
63  double Pz_in;
64  double E_in;
65  double M_in;
66  double Vx_in;
67  double Vy_in;
68  double Vz_in;
69  double T0_in;
70  bool HitTarget;
71  bool MTCC;
72 
73  // other stuff
74  double dX;
75  double dY;
76  double dZ;
77  double tmpVx;
78  double tmpVy;
79  double tmpVz;
80  // update event during propagation
81  void update(double stepSize);
82  // temporary propagation
83  void updateTmp(double stepSize);
84  void subtractEloss(double waterEquivalents); // update 4momentum
85  double absVzTmp(); // |Vz| [mm]
86  double rVxyTmp(); // R_XY [mm]
87 
88 public:
89  // create (initialize) an event with a single particle
90  void create(int id, double px, double py, double pz, double e, double m, double vx, double vy, double vz, double t0);
91  // propagate particle to target area
92  void propagate(double ElossScaleFac,
93  double RadiusTarget,
94  double Z_DistTarget,
95  double Z_CentrTarget,
96  bool TrackerOnly,
97  bool MTCCHalf);
98  double Eloss(double waterEquivalents, double Energy); //return Eloss
99  // particle has hit the target volume (during propagation)
100  bool hitTarget();
101  // event info (direct access)
102  //initial state mother particle
103  int id_in(); // [HEP particle code]
104  double px_in(); // [GeV/c]
105  double py_in(); // [GeV/c]
106  double pz_in(); // [GeV/c]
107  double e_in(); // [GeV]
108  double m_in(); // [GeV/c^2]
109  double vx_in(); // [mm]
110  double vy_in(); // [mm]
111  double vz_in(); // [mm]
112  double t0_in(); // [mm/c] with c = 299.792458 mm/ns
113  double WaterEquivalents(); //[g cm^-2]
114 
115  //final state daughter particles
116  int id(); // [HEP particle code]
117  double px(); // [GeV/c]
118  double py(); // [GeV/c]
119  double pz(); // [GeV/c]
120  double e(); // [GeV]
121  double m(); // [GeV/c^2]
122  double vx(); // [mm]
123  double vy(); // [mm]
124  double vz(); // [mm]
125  double t0(); // [mm/c] with c = 299.792458 mm/ns
126  // event info (calculated)
127  double phi(); // in horizontal (x-z) plane [rad]
128  double theta(); // off vertical (y) axis [rad]
129  double absmom(); // |p| [GeV/c]
130  double absVz(); // |Vz| [mm]
131  double rVxy(); // R_XY [mm]
132 
133  void setEug(double Eug); // [GeV]
134  double Eug(); // [GeV/c]
135  double deltaEmin(double Energy); // [GeV]
136  void SurfProj(double Vx_in,
137  double Vy_in,
138  double Vz_in,
139  double Px_in,
140  double Py_in,
141  double Pz_in,
142  double& Vx_up,
143  double& Vy_up,
144  double& Vz_up);
145 
146  double PlugVx;
147  double PlugVz;
148  double RhoAir;
149  double RhoWall;
150  double RhoRock;
151  double RhoClay;
152  double RhoPlug;
153  double ClayWidth;
155  double E_ug;
156 };
157 #endif
void propagate(double ElossScaleFac, double RadiusTarget, double Z_DistTarget, double Z_CentrTarget, bool TrackerOnly, bool MTCCHalf)
const double PlugOnShaftVz
double Eloss(double waterEquivalents, double Energy)
void updateTmp(double stepSize)
void subtractEloss(double waterEquivalents)
void update(double stepSize)
const double PlugOnShaftVx
double deltaEmin(double Energy)
void SurfProj(double Vx_in, double Vy_in, double Vz_in, double Px_in, double Py_in, double Pz_in, double &Vx_up, double &Vy_up, double &Vz_up)
void create(int id, double px, double py, double pz, double e, double m, double vx, double vy, double vz, double t0)
const double DefaultClayWidth