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