CMS 3D CMS Logo

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
SingleParticleEvent::tmpVx
double tmpVx
Definition: SingleParticleEvent.h:77
SingleParticleEvent::pz_in
double pz_in()
Definition: SingleParticleEvent.cc:302
SingleParticleEvent::vy
double vy()
Definition: SingleParticleEvent.cc:330
SingleParticleEvent::Vz
double Vz
Definition: SingleParticleEvent.h:58
SingleParticleEvent::dX
double dX
Definition: SingleParticleEvent.h:74
SingleParticleEvent::HitTarget
bool HitTarget
Definition: SingleParticleEvent.h:70
SingleParticleEvent::t0
double t0()
Definition: SingleParticleEvent.cc:334
Point5MaterialMap.cc
SingleParticleEvent::vx
double vx()
Definition: SingleParticleEvent.cc:328
SingleParticleEvent::absmom
double absmom()
Definition: SingleParticleEvent.cc:347
SingleParticleEvent::T0_in
double T0_in
Definition: SingleParticleEvent.h:69
EcalCondDBWriter_cfi.Energy
Energy
Definition: EcalCondDBWriter_cfi.py:152
SingleParticleEvent::Vy
double Vy
Definition: SingleParticleEvent.h:57
SingleParticleEvent::absVzTmp
double absVzTmp()
Definition: SingleParticleEvent.cc:284
SingleParticleEvent::hitTarget
bool hitTarget()
Definition: SingleParticleEvent.cc:294
SingleParticleEvent::propagate
void propagate(double ElossScaleFac, double RadiusTarget, double Z_DistTarget, double Z_CentrTarget, bool TrackerOnly, bool MTCCHalf)
Definition: SingleParticleEvent.cc:18
SingleParticleEvent::~SingleParticleEvent
~SingleParticleEvent()
Definition: SingleParticleEvent.h:47
SingleParticleEvent::RhoAir
double RhoAir
Definition: SingleParticleEvent.h:148
DefaultClayWidth
const double DefaultClayWidth
Definition: CosmicMuonParameters.h:38
SingleParticleEvent::m
double m()
Definition: SingleParticleEvent.cc:326
SingleParticleEvent::ID
int ID
Definition: SingleParticleEvent.h:50
SingleParticleEvent::M
double M
Definition: SingleParticleEvent.h:55
SingleParticleEvent::update
void update(double stepSize)
Definition: SingleParticleEvent.cc:220
SingleParticleEvent::vz
double vz()
Definition: SingleParticleEvent.cc:332
SingleParticleEvent::RhoRock
double RhoRock
Definition: SingleParticleEvent.h:150
SingleParticleEvent::tmpVz
double tmpVz
Definition: SingleParticleEvent.h:79
SingleParticleEvent::Vx
double Vx
Definition: SingleParticleEvent.h:56
SingleParticleEvent::Py_in
double Py_in
Definition: SingleParticleEvent.h:62
SingleParticleEvent::E_in
double E_in
Definition: SingleParticleEvent.h:64
SingleParticleEvent::SingleParticleEvent
SingleParticleEvent()
Definition: SingleParticleEvent.h:15
SingleParticleEvent::tmpVy
double tmpVy
Definition: SingleParticleEvent.h:78
SingleParticleEvent::vy_in
double vy_in()
Definition: SingleParticleEvent.cc:310
SingleParticleEvent::Px
double Px
Definition: SingleParticleEvent.h:51
SingleParticleEvent::Pz_in
double Pz_in
Definition: SingleParticleEvent.h:63
SingleParticleEvent::pz
double pz()
Definition: SingleParticleEvent.cc:322
SingleParticleEvent::PlugVx
double PlugVx
Definition: SingleParticleEvent.h:146
SingleParticleEvent::create
void create(int id, double px, double py, double pz, double e, double m, double vx, double vy, double vz, double t0)
Definition: SingleParticleEvent.cc:3
SingleParticleEvent::RhoClay
double RhoClay
Definition: SingleParticleEvent.h:151
SingleParticleEvent::PlugVz
double PlugVz
Definition: SingleParticleEvent.h:147
SingleParticleEvent::py_in
double py_in()
Definition: SingleParticleEvent.cc:300
SingleParticleEvent::absVz
double absVz()
Definition: SingleParticleEvent.cc:349
SingleParticleEvent::RhoWall
double RhoWall
Definition: SingleParticleEvent.h:149
SingleParticleEvent
Definition: SingleParticleEvent.h:12
SingleParticleEvent::e
double e()
Definition: SingleParticleEvent.cc:324
CosmicMuonParameters.h
SingleParticleEvent::WaterEquivalents
double WaterEquivalents()
Definition: SingleParticleEvent.cc:336
SingleParticleEvent::setEug
void setEug(double Eug)
Definition: SingleParticleEvent.cc:257
SingleParticleEvent::E_ug
double E_ug
Definition: SingleParticleEvent.h:155
SingleParticleEvent::MTCC
bool MTCC
Definition: SingleParticleEvent.h:71
SingleParticleEvent::ID_in
int ID_in
Definition: SingleParticleEvent.h:60
SingleParticleEvent::px_in
double px_in()
Definition: SingleParticleEvent.cc:298
SingleParticleEvent::waterEquivalents
double waterEquivalents
Definition: SingleParticleEvent.h:154
SingleParticleEvent::px
double px()
Definition: SingleParticleEvent.cc:318
SingleParticleEvent::T0
double T0
Definition: SingleParticleEvent.h:59
SingleParticleEvent::Vx_in
double Vx_in
Definition: SingleParticleEvent.h:66
SingleParticleEvent::dZ
double dZ
Definition: SingleParticleEvent.h:76
SingleParticleEvent::e_in
double e_in()
Definition: SingleParticleEvent.cc:304
CMSCGENproducer_cfi.MTCCHalf
MTCCHalf
Definition: CMSCGENproducer_cfi.py:16
SingleParticleEvent::ClayWidth
double ClayWidth
Definition: SingleParticleEvent.h:153
CMSCGENproducer_cfi.TrackerOnly
TrackerOnly
Definition: CMSCGENproducer_cfi.py:17
SingleParticleEvent::m_in
double m_in()
Definition: SingleParticleEvent.cc:306
SingleParticleEvent::vz_in
double vz_in()
Definition: SingleParticleEvent.cc:312
SingleParticleEvent::updateTmp
void updateTmp(double stepSize)
Definition: SingleParticleEvent.cc:226
SingleParticleEvent::id
int id()
Definition: SingleParticleEvent.cc:316
SingleParticleEvent::Eug
double Eug()
Definition: SingleParticleEvent.cc:259
SingleParticleEvent::RhoPlug
double RhoPlug
Definition: SingleParticleEvent.h:152
SingleParticleEvent::deltaEmin
double deltaEmin(double Energy)
Definition: SingleParticleEvent.cc:261
SingleParticleEvent::id_in
int id_in()
Definition: SingleParticleEvent.cc:296
SingleParticleEvent::Vy_in
double Vy_in
Definition: SingleParticleEvent.h:67
SingleParticleEvent::M_in
double M_in
Definition: SingleParticleEvent.h:65
SingleParticleEvent::rVxyTmp
double rVxyTmp()
Definition: SingleParticleEvent.cc:292
SingleParticleEvent::Vz_in
double Vz_in
Definition: SingleParticleEvent.h:68
SingleParticleEvent::Pz
double Pz
Definition: SingleParticleEvent.h:53
SingleParticleEvent::vx_in
double vx_in()
Definition: SingleParticleEvent.cc:308
SingleParticleEvent::Eloss
double Eloss(double waterEquivalents, double Energy)
Definition: SingleParticleEvent.cc:246
SingleParticleEvent::py
double py()
Definition: SingleParticleEvent.cc:320
SingleParticleEvent::SurfProj
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)
Definition: SingleParticleEvent.cc:266
PlugOnShaftVz
const double PlugOnShaftVz
Definition: CosmicMuonParameters.h:47
PlugOnShaftVx
const double PlugOnShaftVx
Definition: CosmicMuonParameters.h:46
SingleParticleEvent::t0_in
double t0_in()
Definition: SingleParticleEvent.cc:314
SingleParticleEvent::phi
double phi()
Definition: SingleParticleEvent.cc:338
SingleParticleEvent::subtractEloss
void subtractEloss(double waterEquivalents)
Definition: SingleParticleEvent.cc:232
SingleParticleEvent::theta
double theta()
Definition: SingleParticleEvent.cc:345
SingleParticleEvent::dY
double dY
Definition: SingleParticleEvent.h:75
SingleParticleEvent::rVxy
double rVxy()
Definition: SingleParticleEvent.cc:351
SingleParticleEvent::E
double E
Definition: SingleParticleEvent.h:54
SingleParticleEvent::Py
double Py
Definition: SingleParticleEvent.h:52
SingleParticleEvent::Px_in
double Px_in
Definition: SingleParticleEvent.h:61