CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
12 
14 public:
15  // constructor
17  ID = 0;
18  Px = 0.; Py = 0.; Pz = 0.; E = 0.; M = 0.;
19  Vx = 0.; Vy = 0.; Vz = 0.; T0 = 0.;
20  ID_in = 0;
21  Px_in = 0.; Py_in = 0.; Pz_in = 0.; E_in = 0.; M_in = 0.;
22  Vx_in = 0.; Vy_in = 0.; Vz_in = 0.; T0_in = 0.;
23  HitTarget = false;
26  RhoAir = 0.;
27  RhoWall = 0.;
28  RhoRock = 0.;
29  RhoClay = 0.;
30  RhoPlug = 0.;
32  }
33  // destructor
35 private:
36  int ID;
37  double Px; double Py; double Pz; double E; double M;
38  double Vx; double Vy; double Vz; double T0;
39  int ID_in;
40  double Px_in; double Py_in; double Pz_in; double E_in; double M_in;
41  double Vx_in; double Vy_in; double Vz_in; double T0_in;
42  bool HitTarget;
43  bool MTCC;
44 
45  // other stuff
46  double dX; double dY; double dZ;
47  double tmpVx; double tmpVy; double tmpVz;
48  // update event during propagation
49  void update(double stepSize);
50  // temporary propagation
51  void updateTmp(double stepSize);
52  void subtractEloss(double waterEquivalents); // update 4momentum
53  double absVzTmp(); // |Vz| [mm]
54  double rVxyTmp(); // R_XY [mm]
55 
56 
57 public:
58  // create (initialize) an event with a single particle
59  void create(int id, double px, double py, double pz, double e, double m, double vx, double vy, double vz, double t0);
60  // propagate particle to target area
61  void propagate(double ElossScaleFac, double RadiusTarget, double Z_DistTarget, double Z_CentrTarget, bool TrackerOnly, bool MTCCHalf);
62  double Eloss(double waterEquivalents, double Energy); //return Eloss
63  // particle has hit the target volume (during propagation)
64  bool hitTarget();
65  // event info (direct access)
66  //initial state mother particle
67  int id_in(); // [HEP particle code]
68  double px_in(); // [GeV/c]
69  double py_in(); // [GeV/c]
70  double pz_in(); // [GeV/c]
71  double e_in(); // [GeV]
72  double m_in(); // [GeV/c^2]
73  double vx_in(); // [mm]
74  double vy_in(); // [mm]
75  double vz_in(); // [mm]
76  double t0_in(); // [mm/c] with c = 299.792458 mm/ns
77  double WaterEquivalents(); //[g cm^-2]
78 
79  //final state daughter particles
80  int id(); // [HEP particle code]
81  double px(); // [GeV/c]
82  double py(); // [GeV/c]
83  double pz(); // [GeV/c]
84  double e(); // [GeV]
85  double m(); // [GeV/c^2]
86  double vx(); // [mm]
87  double vy(); // [mm]
88  double vz(); // [mm]
89  double t0(); // [mm/c] with c = 299.792458 mm/ns
90  // event info (calculated)
91  double phi(); // in horizontal (x-z) plane [rad]
92  double theta(); // off vertical (y) axis [rad]
93  double absmom(); // |p| [GeV/c]
94  double absVz(); // |Vz| [mm]
95  double rVxy(); // R_XY [mm]
96 
97  void setEug(double Eug); // [GeV]
98  double Eug(); // [GeV/c]
99  double deltaEmin(double Energy); // [GeV]
100  void SurfProj(double Vx_in, double Vy_in, double Vz_in,
101  double Px_in, double Py_in, double Pz_in,
102  double& Vx_up, double& Vy_up, double& Vz_up);
103 
104  double PlugVx;
105  double PlugVz;
106  double RhoAir;
107  double RhoWall;
108  double RhoRock;
109  double RhoClay;
110  double RhoPlug;
111  double ClayWidth;
113  double E_ug;
114 };
115 #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