CMS 3D CMS Logo

TotemG4Hit.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Forward
4 // Class : TotemG4Hit
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author:
10 // Created: Tue May 16 10:14:34 CEST 2006
11 //
12 
13 // system include files
14 
15 // user include files
17 
18 //
19 // constructors and destructor
20 //
21 
23  setEntry(0., 0., 0.);
24  theEntryPoint.SetCoordinates(0., 0., 0.);
25  theExitPoint.SetCoordinates(0., 0., 0.);
26 
27  elem = 0.;
28  hadr = 0.;
29  theIncidentEnergy = 0.;
30  theTrackID = -1;
31  theUnitID = 0;
32  theTimeSlice = 0.;
33 
34  theX = 0.;
35  theY = 0.;
36  theZ = 0.;
37  thePabs = 0.;
38  theTof = 0.;
39  theEnergyLoss = 0.;
40  theParticleType = 0;
41  theThetaAtEntry = 0.;
42  thePhiAtEntry = 0.;
43  theParentId = 0;
44  theVx = 0.;
45  theVy = 0.;
46  theVz = 0.;
47 }
48 
50 
52  entry = right.entry;
53  elem = right.elem;
54  hadr = right.hadr;
56  theTrackID = right.theTrackID;
57  theUnitID = right.theUnitID;
58  theTimeSlice = right.theTimeSlice;
59 
60  theX = right.theX;
61  theY = right.theY;
62  theZ = right.theZ;
63  thePabs = right.thePabs;
64  theTof = right.theTof;
67 
71  theExitPoint = right.theExitPoint;
72  theParentId = right.theParentId;
73  theVx = right.theVx;
74  theVy = right.theVy;
75  theVz = right.theVz;
76 }
77 
79  entry = right.entry;
80  elem = right.elem;
81  hadr = right.hadr;
83  theTrackID = right.theTrackID;
84  theUnitID = right.theUnitID;
85  theTimeSlice = right.theTimeSlice;
86 
87  theX = right.theX;
88  theY = right.theY;
89  theZ = right.theZ;
90  thePabs = right.thePabs;
91  theTof = right.theTof;
94 
98  theExitPoint = right.theExitPoint;
99  theParentId = right.theParentId;
100  theVx = right.theVx;
101  theVy = right.theVy;
102  theVz = right.theVz;
103 
104  return *this;
105 }
106 
108  elem += aHit.getEM();
109  hadr += aHit.getHadr();
110 }
111 
112 void TotemG4Hit::Print() { std::cout << (*this); }
113 
115 
116 double TotemG4Hit::getEM() const { return elem; }
117 void TotemG4Hit::setEM(double e) { elem = e; }
118 
119 double TotemG4Hit::getHadr() const { return hadr; }
120 void TotemG4Hit::setHadr(double e) { hadr = e; }
121 
124 
125 int TotemG4Hit::getTrackID() const { return theTrackID; }
127 
128 uint32_t TotemG4Hit::getUnitID() const { return theUnitID; }
129 void TotemG4Hit::setUnitID(uint32_t i) { theUnitID = i; }
130 
131 double TotemG4Hit::getTimeSlice() const { return theTimeSlice; }
133 int TotemG4Hit::getTimeSliceID() const { return (int)theTimeSlice; }
134 
135 void TotemG4Hit::addEnergyDeposit(double em, double hd) {
136  elem += em;
137  hadr += hd;
138 }
139 
140 double TotemG4Hit::getEnergyDeposit() const { return elem + hadr; }
141 
142 float TotemG4Hit::getPabs() const { return thePabs; }
143 float TotemG4Hit::getTof() const { return theTof; }
144 float TotemG4Hit::getEnergyLoss() const { return theEnergyLoss; }
146 
147 void TotemG4Hit::setPabs(float e) { thePabs = e; }
148 void TotemG4Hit::setTof(float e) { theTof = e; }
151 
153 float TotemG4Hit::getPhiAtEntry() const { return thePhiAtEntry; }
154 
157 
158 float TotemG4Hit::getX() const { return theX; }
159 void TotemG4Hit::setX(float t) { theX = t; }
160 
161 float TotemG4Hit::getY() const { return theY; }
162 void TotemG4Hit::setY(float t) { theY = t; }
163 
164 float TotemG4Hit::getZ() const { return theZ; }
165 void TotemG4Hit::setZ(float t) { theZ = t; }
166 
167 int TotemG4Hit::getParentId() const { return theParentId; }
169 
170 float TotemG4Hit::getVx() const { return theVx; }
171 void TotemG4Hit::setVx(float t) { theVx = t; }
172 
173 float TotemG4Hit::getVy() const { return theVy; }
174 void TotemG4Hit::setVy(float t) { theVy = t; }
175 
176 float TotemG4Hit::getVz() const { return theVz; }
177 void TotemG4Hit::setVz(float t) { theVz = t; }
178 
179 std::ostream& operator<<(std::ostream& os, const TotemG4Hit& hit) {
180  os << " Data of this TotemG4Hit are:\n"
181  << " Time slice ID: " << hit.getTimeSliceID() << "\n"
182  << " EnergyDeposit = " << hit.getEnergyLoss() << "\n"
183  << " Energy of primary particle (ID = " << hit.getTrackID() << ") = " << hit.getIncidentEnergy() << " (MeV)"
184  << "\n"
185  << " Entry point in Totem unit number " << hit.getUnitID() << " is: " << hit.getEntry() << " (mm)"
186  << "\n"
187  << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
188  return os;
189 }
TotemG4Hit::addEnergyDeposit
void addEnergyDeposit(double em, double hd)
Definition: TotemG4Hit.cc:135
TotemG4Hit::setParticleType
void setParticleType(short i)
Definition: TotemG4Hit.cc:150
TotemG4Hit::theEntryPoint
math::XYZPoint theEntryPoint
Definition: TotemG4Hit.h:134
TotemG4Hit::theZ
float theZ
Definition: TotemG4Hit.h:126
TotemG4Hit::setUnitID
void setUnitID(uint32_t i)
Definition: TotemG4Hit.cc:129
TotemG4Hit::setTof
void setTof(float e)
Definition: TotemG4Hit.cc:148
mps_fire.i
i
Definition: mps_fire.py:428
TotemG4Hit::getThetaAtEntry
float getThetaAtEntry() const
Definition: TotemG4Hit.cc:152
TotemG4Hit::thePhiAtEntry
float thePhiAtEntry
Definition: TotemG4Hit.h:133
TotemG4Hit::setTimeSlice
void setTimeSlice(double d)
Definition: TotemG4Hit.cc:132
TotemG4Hit::getTrackID
int getTrackID() const
Definition: TotemG4Hit.cc:125
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
TotemG4Hit::getUnitID
uint32_t getUnitID() const
Definition: TotemG4Hit.cc:128
TotemG4Hit::getEntry
math::XYZPoint getEntry() const
Definition: TotemG4Hit.cc:114
TotemG4Hit::operator=
const TotemG4Hit & operator=(const TotemG4Hit &right)
Definition: TotemG4Hit.cc:78
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
gather_cfg.cout
cout
Definition: gather_cfg.py:144
TotemG4Hit::setVy
void setVy(float p)
Definition: TotemG4Hit.cc:174
TotemG4Hit::getIncidentEnergy
double getIncidentEnergy() const
Definition: TotemG4Hit.cc:122
TotemG4Hit::setHadr
void setHadr(double e)
Definition: TotemG4Hit.cc:120
TotemG4Hit::setParentId
void setParentId(int p)
Definition: TotemG4Hit.cc:168
TotemG4Hit::theTimeSlice
double theTimeSlice
Definition: TotemG4Hit.h:122
TotemG4Hit::setEntry
void setEntry(double x, double y, double z)
Definition: TotemG4Hit.h:55
TotemG4Hit::theUnitID
uint32_t theUnitID
Definition: TotemG4Hit.h:121
TotemG4Hit::getZ
float getZ() const
Definition: TotemG4Hit.cc:164
TotemG4Hit::setZ
void setZ(float t)
Definition: TotemG4Hit.cc:165
TotemG4Hit::setX
void setX(float t)
Definition: TotemG4Hit.cc:159
TotemG4Hit::getVz
float getVz() const
Definition: TotemG4Hit.cc:176
TotemG4Hit::setTrackID
void setTrackID(int i)
Definition: TotemG4Hit.cc:126
TotemG4Hit::setEnergyLoss
void setEnergyLoss(float e)
Definition: TotemG4Hit.cc:149
TotemG4Hit::setPhiAtEntry
void setPhiAtEntry(float f)
Definition: TotemG4Hit.cc:156
TotemG4Hit::getTimeSliceID
int getTimeSliceID() const
Definition: TotemG4Hit.cc:133
TotemG4Hit::theParentId
int theParentId
Definition: TotemG4Hit.h:137
TotemG4Hit::theExitPoint
math::XYZPoint theExitPoint
Definition: TotemG4Hit.h:135
TotemG4Hit::getPhiAtEntry
float getPhiAtEntry() const
Definition: TotemG4Hit.cc:153
TotemG4Hit::Print
void Print() override
Definition: TotemG4Hit.cc:112
TotemG4Hit::theVz
float theVz
Definition: TotemG4Hit.h:140
TotemG4Hit::getPabs
float getPabs() const
Definition: TotemG4Hit.cc:142
TotemG4Hit::getTof
float getTof() const
Definition: TotemG4Hit.cc:143
TotemG4Hit::theParticleType
int theParticleType
Definition: TotemG4Hit.h:130
TotemG4Hit::getVy
float getVy() const
Definition: TotemG4Hit.cc:173
TotemG4Hit::setVx
void setVx(float p)
Definition: TotemG4Hit.cc:171
TotemG4Hit::getVx
float getVx() const
Definition: TotemG4Hit.cc:170
TotemG4Hit::theVx
float theVx
Definition: TotemG4Hit.h:138
TotemG4Hit::setY
void setY(float t)
Definition: TotemG4Hit.cc:162
TotemG4Hit::getTimeSlice
double getTimeSlice() const
Definition: TotemG4Hit.cc:131
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
TotemG4Hit::theEnergyLoss
float theEnergyLoss
Definition: TotemG4Hit.h:129
TotemG4Hit::theTrackID
int theTrackID
Definition: TotemG4Hit.h:119
TotemG4Hit::getX
float getX() const
Definition: TotemG4Hit.cc:158
TotemG4Hit::TotemG4Hit
TotemG4Hit()
Definition: TotemG4Hit.cc:22
TotemG4Hit::setThetaAtEntry
void setThetaAtEntry(float t)
Definition: TotemG4Hit.cc:155
TotemG4Hit::theX
float theX
Definition: TotemG4Hit.h:124
TotemG4Hit::setVz
void setVz(float p)
Definition: TotemG4Hit.cc:177
operator<<
std::ostream & operator<<(std::ostream &os, const TotemG4Hit &hit)
Definition: TotemG4Hit.cc:179
TotemG4Hit::elem
double elem
Definition: TotemG4Hit.h:116
TotemG4Hit::getHadr
double getHadr() const
Definition: TotemG4Hit.cc:119
TotemG4Hit::~TotemG4Hit
~TotemG4Hit() override
Definition: TotemG4Hit.cc:49
TotemG4Hit::getEM
double getEM() const
Definition: TotemG4Hit.cc:116
TotemG4Hit::theVy
float theVy
Definition: TotemG4Hit.h:139
TotemG4Hit::getEnergyLoss
float getEnergyLoss() const
Definition: TotemG4Hit.cc:144
TotemG4Hit::getParticleType
int getParticleType() const
Definition: TotemG4Hit.cc:145
TotemG4Hit::theTof
float theTof
Definition: TotemG4Hit.h:128
TotemG4Hit::getParentId
int getParentId() const
Definition: TotemG4Hit.cc:167
TotemG4Hit::getY
float getY() const
Definition: TotemG4Hit.cc:161
TotemG4Hit::setEM
void setEM(double e)
Definition: TotemG4Hit.cc:117
TotemG4Hit::entry
math::XYZPoint entry
Definition: TotemG4Hit.h:115
TotemG4Hit::thePabs
float thePabs
Definition: TotemG4Hit.h:127
TotemG4Hit::hadr
double hadr
Definition: TotemG4Hit.h:117
TotemG4Hit.h
TotemG4Hit::theIncidentEnergy
double theIncidentEnergy
Definition: TotemG4Hit.h:118
ztail.d
d
Definition: ztail.py:151
TotemG4Hit
Definition: TotemG4Hit.h:39
TotemG4Hit::theThetaAtEntry
float theThetaAtEntry
Definition: TotemG4Hit.h:132
TotemG4Hit::getEnergyDeposit
double getEnergyDeposit() const
Definition: TotemG4Hit.cc:140
TotemG4Hit::setPabs
void setPabs(float e)
Definition: TotemG4Hit.cc:147
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
TotemG4Hit::setIncidentEnergy
void setIncidentEnergy(double e)
Definition: TotemG4Hit.cc:123
TotemG4Hit::theY
float theY
Definition: TotemG4Hit.h:125
hit
Definition: SiStripHitEffFromCalibTree.cc:88
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37