test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
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 
54  entry = right.entry;
55  elem = right.elem;
56  hadr = right.hadr;
58  theTrackID = right.theTrackID;
59  theUnitID = right.theUnitID;
60  theTimeSlice = right.theTimeSlice;
61 
62  theX = right.theX;
63  theY = right.theY;
64  theZ = right.theZ;
65  thePabs = right.thePabs;
66  theTof = right.theTof;
69 
73  theExitPoint = right.theExitPoint;
74  theParentId = right.theParentId;
75  theVx = right.theVx;
76  theVy = right.theVy;
77  theVz = right.theVz;
78 }
79 
80 
82 
83  entry = right.entry;
84  elem = right.elem;
85  hadr = right.hadr;
87  theTrackID = right.theTrackID;
88  theUnitID = right.theUnitID;
89  theTimeSlice = right.theTimeSlice;
90 
91  theX = right.theX;
92  theY = right.theY;
93  theZ = right.theZ;
94  thePabs = right.thePabs;
95  theTof = right.theTof ;
98 
102  theExitPoint = right.theExitPoint;
103  theParentId = right.theParentId;
104  theVx = right.theVx;
105  theVy = right.theVy;
106  theVz = right.theVz;
107 
108  return *this;
109 }
110 
112 
113  elem += aHit.getEM();
114  hadr += aHit.getHadr();
115 }
116 
117 
119  std::cout << (*this);
120 }
121 
122 
124 
125 double TotemG4Hit::getEM() const {return elem; }
126 void TotemG4Hit::setEM (double e) { elem = e; }
127 
128 double TotemG4Hit::getHadr() const {return hadr; }
129 void TotemG4Hit::setHadr (double e) { hadr = e; }
130 
133 
134 int TotemG4Hit::getTrackID() const {return theTrackID; }
136 
137 uint32_t TotemG4Hit::getUnitID() const {return theUnitID; }
138 void TotemG4Hit::setUnitID (uint32_t i) { theUnitID = i; }
139 
140 double TotemG4Hit::getTimeSlice() const {return theTimeSlice; }
142 int TotemG4Hit::getTimeSliceID() const {return (int)theTimeSlice;}
143 
144 void TotemG4Hit::addEnergyDeposit(double em, double hd) {elem += em; hadr += hd;}
145 
146 double TotemG4Hit::getEnergyDeposit() const {return elem+hadr;}
147 
148 float TotemG4Hit::getPabs() const {return thePabs;}
149 float TotemG4Hit::getTof() const {return theTof;}
152 
153 void TotemG4Hit::setPabs(float e) {thePabs = e;}
154 void TotemG4Hit::setTof(float e) {theTof = e;}
157 
160 
163 
164 float TotemG4Hit::getX() const {return theX;}
165 void TotemG4Hit::setX(float t) {theX = t;}
166 
167 float TotemG4Hit::getY() const {return theY;}
168 void TotemG4Hit::setY(float t) {theY = t;}
169 
170 float TotemG4Hit::getZ() const {return theZ;}
171 void TotemG4Hit::setZ(float t) {theZ = t;}
172 
175 
176 float TotemG4Hit::getVx() const {return theVx;}
177 void TotemG4Hit::setVx(float t) {theVx = t;}
178 
179 float TotemG4Hit::getVy() const {return theVy;}
180 void TotemG4Hit::setVy(float t) {theVy = t;}
181 
182 float TotemG4Hit::getVz() const {return theVz;}
183 void TotemG4Hit::setVz(float t) {theVz = t;}
184 
185 std::ostream& operator<<(std::ostream& os, const TotemG4Hit& hit) {
186  os << " Data of this TotemG4Hit are:\n"
187  << " Time slice ID: " << hit.getTimeSliceID() << "\n"
188  << " EnergyDeposit = " << hit.getEnergyLoss() << "\n"
189  << " Energy of primary particle (ID = " << hit.getTrackID()
190  << ") = " << hit.getIncidentEnergy() << " (MeV)" << "\n"
191  << " Entry point in Totem unit number " << hit.getUnitID()
192  << " is: " << hit.getEntry() << " (mm)" << "\n"
193  << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
194  return os;
195 }
196 
197 
void setVz(float p)
Definition: TotemG4Hit.cc:183
float theThetaAtEntry
Definition: TotemG4Hit.h:136
int i
Definition: DBlmapReader.cc:9
void setPabs(float e)
Definition: TotemG4Hit.cc:153
float theTof
Definition: TotemG4Hit.h:132
void setEnergyLoss(float e)
Definition: TotemG4Hit.cc:155
void Print()
Definition: TotemG4Hit.cc:118
int theParentId
Definition: TotemG4Hit.h:141
void setEntry(double x, double y, double z)
Definition: TotemG4Hit.h:57
float theVx
Definition: TotemG4Hit.h:142
float getTof() const
Definition: TotemG4Hit.cc:149
void setHadr(double e)
Definition: TotemG4Hit.cc:129
float getEnergyLoss() const
Definition: TotemG4Hit.cc:150
void setX(float t)
Definition: TotemG4Hit.cc:165
float theY
Definition: TotemG4Hit.h:129
int theTrackID
Definition: TotemG4Hit.h:122
math::XYZPoint getEntry() const
Definition: TotemG4Hit.cc:123
float getPabs() const
Definition: TotemG4Hit.cc:148
float theZ
Definition: TotemG4Hit.h:130
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
float getVy() const
Definition: TotemG4Hit.cc:179
void setVy(float p)
Definition: TotemG4Hit.cc:180
uint32_t theUnitID
Definition: TotemG4Hit.h:124
void setTimeSlice(double d)
Definition: TotemG4Hit.cc:141
double theTimeSlice
Definition: TotemG4Hit.h:125
tuple d
Definition: ztail.py:151
void setY(float t)
Definition: TotemG4Hit.cc:168
float thePhiAtEntry
Definition: TotemG4Hit.h:137
float getPhiAtEntry() const
Definition: TotemG4Hit.cc:159
void setVx(float p)
Definition: TotemG4Hit.cc:177
float theX
Definition: TotemG4Hit.h:128
int getTrackID() const
Definition: TotemG4Hit.cc:134
int getTimeSliceID() const
Definition: TotemG4Hit.cc:142
double f[11][100]
float theEnergyLoss
Definition: TotemG4Hit.h:133
float theVz
Definition: TotemG4Hit.h:144
void setParentId(int p)
Definition: TotemG4Hit.cc:174
int theParticleType
Definition: TotemG4Hit.h:134
float getVx() const
Definition: TotemG4Hit.cc:176
void setZ(float t)
Definition: TotemG4Hit.cc:171
double getHadr() const
Definition: TotemG4Hit.cc:128
void setIncidentEnergy(double e)
Definition: TotemG4Hit.cc:132
double getIncidentEnergy() const
Definition: TotemG4Hit.cc:131
float getVz() const
Definition: TotemG4Hit.cc:182
void setThetaAtEntry(float t)
Definition: TotemG4Hit.cc:161
int getParentId() const
Definition: TotemG4Hit.cc:173
math::XYZPoint theExitPoint
Definition: TotemG4Hit.h:139
void setUnitID(uint32_t i)
Definition: TotemG4Hit.cc:138
void setTrackID(int i)
Definition: TotemG4Hit.cc:135
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
void setPhiAtEntry(float f)
Definition: TotemG4Hit.cc:162
uint32_t getUnitID() const
Definition: TotemG4Hit.cc:137
float theVy
Definition: TotemG4Hit.h:143
math::XYZPoint theEntryPoint
Definition: TotemG4Hit.h:138
double getEM() const
Definition: TotemG4Hit.cc:125
void setParticleType(short i)
Definition: TotemG4Hit.cc:156
void setTof(float e)
Definition: TotemG4Hit.cc:154
const TotemG4Hit & operator=(const TotemG4Hit &right)
Definition: TotemG4Hit.cc:81
float getZ() const
Definition: TotemG4Hit.cc:170
double getEnergyDeposit() const
Definition: TotemG4Hit.cc:146
float thePabs
Definition: TotemG4Hit.h:131
int getParticleType() const
Definition: TotemG4Hit.cc:151
float getX() const
Definition: TotemG4Hit.cc:164
void setEM(double e)
Definition: TotemG4Hit.cc:126
tuple cout
Definition: gather_cfg.py:121
double hadr
Definition: TotemG4Hit.h:120
double getTimeSlice() const
Definition: TotemG4Hit.cc:140
float getThetaAtEntry() const
Definition: TotemG4Hit.cc:158
float getY() const
Definition: TotemG4Hit.cc:167
double elem
Definition: TotemG4Hit.h:119
math::XYZPoint entry
Definition: TotemG4Hit.h:118
void addEnergyDeposit(double em, double hd)
Definition: TotemG4Hit.cc:144
double theIncidentEnergy
Definition: TotemG4Hit.h:121