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