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 }
void setVz(float p)
Definition: TotemG4Hit.cc:177
float theThetaAtEntry
Definition: TotemG4Hit.h:132
void setPabs(float e)
Definition: TotemG4Hit.cc:147
float theTof
Definition: TotemG4Hit.h:128
void setEnergyLoss(float e)
Definition: TotemG4Hit.cc:149
int theParentId
Definition: TotemG4Hit.h:137
void setEntry(double x, double y, double z)
Definition: TotemG4Hit.h:55
float theVx
Definition: TotemG4Hit.h:138
float getTof() const
Definition: TotemG4Hit.cc:143
void setHadr(double e)
Definition: TotemG4Hit.cc:120
float getEnergyLoss() const
Definition: TotemG4Hit.cc:144
void setX(float t)
Definition: TotemG4Hit.cc:159
float theY
Definition: TotemG4Hit.h:125
int theTrackID
Definition: TotemG4Hit.h:119
math::XYZPoint getEntry() const
Definition: TotemG4Hit.cc:114
float getPabs() const
Definition: TotemG4Hit.cc:142
float theZ
Definition: TotemG4Hit.h:126
float getVy() const
Definition: TotemG4Hit.cc:173
void setVy(float p)
Definition: TotemG4Hit.cc:174
uint32_t theUnitID
Definition: TotemG4Hit.h:121
void setTimeSlice(double d)
Definition: TotemG4Hit.cc:132
std::ostream & operator<<(std::ostream &os, const TotemG4Hit &hit)
Definition: TotemG4Hit.cc:179
double theTimeSlice
Definition: TotemG4Hit.h:122
void setY(float t)
Definition: TotemG4Hit.cc:162
float thePhiAtEntry
Definition: TotemG4Hit.h:133
void Print() override
Definition: TotemG4Hit.cc:112
float getPhiAtEntry() const
Definition: TotemG4Hit.cc:153
void setVx(float p)
Definition: TotemG4Hit.cc:171
float theX
Definition: TotemG4Hit.h:124
int getTrackID() const
Definition: TotemG4Hit.cc:125
int getTimeSliceID() const
Definition: TotemG4Hit.cc:133
double f[11][100]
float theEnergyLoss
Definition: TotemG4Hit.h:129
float theVz
Definition: TotemG4Hit.h:140
~TotemG4Hit() override
Definition: TotemG4Hit.cc:49
void setParentId(int p)
Definition: TotemG4Hit.cc:168
int theParticleType
Definition: TotemG4Hit.h:130
float getVx() const
Definition: TotemG4Hit.cc:170
void setZ(float t)
Definition: TotemG4Hit.cc:165
double getHadr() const
Definition: TotemG4Hit.cc:119
void setIncidentEnergy(double e)
Definition: TotemG4Hit.cc:123
d
Definition: ztail.py:151
double getIncidentEnergy() const
Definition: TotemG4Hit.cc:122
float getVz() const
Definition: TotemG4Hit.cc:176
void setThetaAtEntry(float t)
Definition: TotemG4Hit.cc:155
int getParentId() const
Definition: TotemG4Hit.cc:167
math::XYZPoint theExitPoint
Definition: TotemG4Hit.h:135
void setUnitID(uint32_t i)
Definition: TotemG4Hit.cc:129
void setTrackID(int i)
Definition: TotemG4Hit.cc:126
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
void setPhiAtEntry(float f)
Definition: TotemG4Hit.cc:156
uint32_t getUnitID() const
Definition: TotemG4Hit.cc:128
float theVy
Definition: TotemG4Hit.h:139
math::XYZPoint theEntryPoint
Definition: TotemG4Hit.h:134
double getEM() const
Definition: TotemG4Hit.cc:116
void setParticleType(short i)
Definition: TotemG4Hit.cc:150
void setTof(float e)
Definition: TotemG4Hit.cc:148
const TotemG4Hit & operator=(const TotemG4Hit &right)
Definition: TotemG4Hit.cc:78
float getZ() const
Definition: TotemG4Hit.cc:164
double getEnergyDeposit() const
Definition: TotemG4Hit.cc:140
float thePabs
Definition: TotemG4Hit.h:127
int getParticleType() const
Definition: TotemG4Hit.cc:145
float getX() const
Definition: TotemG4Hit.cc:158
void setEM(double e)
Definition: TotemG4Hit.cc:117
double hadr
Definition: TotemG4Hit.h:117
double getTimeSlice() const
Definition: TotemG4Hit.cc:131
float getThetaAtEntry() const
Definition: TotemG4Hit.cc:152
float getY() const
Definition: TotemG4Hit.cc:161
double elem
Definition: TotemG4Hit.h:116
math::XYZPoint entry
Definition: TotemG4Hit.h:115
void addEnergyDeposit(double em, double hd)
Definition: TotemG4Hit.cc:135
double theIncidentEnergy
Definition: TotemG4Hit.h:118