CMS 3D CMS Logo

FP420G4Hit.cc
Go to the documentation of this file.
1 // File: FP420G4Hit.cc
3 // Date: 02.2006
4 // Description: Transient Hit class for the FP420
7 #include <iostream>
8 
10  entrylp(0);
11  exitlp(0);
12  elem = 0.;
13  hadr = 0.;
14  theIncidentEnergy = 0.;
15  theTimeSlice = 0.;
16  theTrackID = -1;
17  theUnitID = 0;
18  thePabs = 0.;
19  theTof = 0.;
20  theEnergyLoss = 0.;
21  theParticleType = 0;
22  theUnitID = 0;
23  theTrackID = -1;
24  theThetaAtEntry = -10000.;
25  thePhiAtEntry = -10000.;
26  theParentId = 0;
27 
28  theX = 0.;
29  theY = 0.;
30  theZ = 0.;
31  theVx = 0.;
32  theVy = 0.;
33  theVz = 0.;
34 }
35 
37 
39  theUnitID = right.theUnitID;
40 
41  theTrackID = right.theTrackID;
42  theTof = right.theTof;
45  thePabs = right.thePabs;
46  elem = right.elem;
47  hadr = right.hadr;
49  theTimeSlice = right.theTimeSlice;
50  entry = right.entry;
51  entrylp = right.entrylp;
52  exitlp = right.exitlp;
55  theParentId = right.theParentId;
56 
57  theX = right.theX;
58  theY = right.theY;
59  theZ = right.theZ;
60 
61  theVx = right.theVx;
62  theVy = right.theVy;
63  theVz = right.theVz;
64 }
65 
67  theUnitID = right.theUnitID;
68 
69  theTrackID = right.theTrackID;
70  theTof = right.theTof;
73  thePabs = right.thePabs;
74  elem = right.elem;
75  hadr = right.hadr;
77  theTimeSlice = right.theTimeSlice;
78  entry = right.entry;
79  entrylp = right.entrylp;
80  exitlp = right.exitlp;
83  theParentId = right.theParentId;
84 
85  theX = right.theX;
86  theY = right.theY;
87  theZ = right.theZ;
88 
89  theVx = right.theVx;
90  theVy = right.theVy;
91  theVz = right.theVz;
92 
93  return *this;
94 }
95 
97  elem += aHit.getEM();
98  hadr += aHit.getHadr();
99 }
100 
101 void FP420G4Hit::Print() { std::cout << (*this); }
102 
103 G4ThreeVector FP420G4Hit::getEntry() const { return entry; }
104 void FP420G4Hit::setEntry(const G4ThreeVector& xyz) { entry = xyz; }
105 
106 G4ThreeVector FP420G4Hit::getEntryLocalP() const { return entrylp; }
107 void FP420G4Hit::setEntryLocalP(const G4ThreeVector& xyz1) { entrylp = xyz1; }
108 
109 G4ThreeVector FP420G4Hit::getExitLocalP() const { return exitlp; }
110 void FP420G4Hit::setExitLocalP(const G4ThreeVector& xyz1) { exitlp = xyz1; }
111 
112 double FP420G4Hit::getEM() const { return elem; }
113 void FP420G4Hit::setEM(double e) { elem = e; }
114 
115 double FP420G4Hit::getHadr() const { return hadr; }
116 void FP420G4Hit::setHadr(double e) { hadr = e; }
117 
120 
121 unsigned int FP420G4Hit::getTrackID() const { return theTrackID; }
123 
124 unsigned int FP420G4Hit::getUnitID() const { return theUnitID; }
125 void FP420G4Hit::setUnitID(unsigned int i) { theUnitID = i; }
126 
127 double FP420G4Hit::getTimeSlice() const { return theTimeSlice; }
129 int FP420G4Hit::getTimeSliceID() const { return (int)theTimeSlice; }
130 
131 void FP420G4Hit::addEnergyDeposit(double em, double hd) {
132  elem += em;
133  hadr += hd;
134 }
135 
136 double FP420G4Hit::getEnergyDeposit() const { return elem + hadr; }
137 
138 float FP420G4Hit::getPabs() const { return thePabs; }
139 float FP420G4Hit::getTof() const { return theTof; }
140 float FP420G4Hit::getEnergyLoss() const { return theEnergyLoss; }
142 
143 void FP420G4Hit::setPabs(float e) { thePabs = e; }
144 void FP420G4Hit::setTof(float e) { theTof = e; }
148 
150 float FP420G4Hit::getPhiAtEntry() const { return thePhiAtEntry; }
151 
154 
155 float FP420G4Hit::getX() const { return theX; }
156 void FP420G4Hit::setX(float t) { theX = t; }
157 
158 float FP420G4Hit::getY() const { return theY; }
159 void FP420G4Hit::setY(float t) { theY = t; }
160 
161 float FP420G4Hit::getZ() const { return theZ; }
162 void FP420G4Hit::setZ(float t) { theZ = t; }
163 
164 int FP420G4Hit::getParentId() const { return theParentId; }
166 
167 float FP420G4Hit::getVx() const { return theVx; }
168 void FP420G4Hit::setVx(float t) { theVx = t; }
169 
170 float FP420G4Hit::getVy() const { return theVy; }
171 void FP420G4Hit::setVy(float t) { theVy = t; }
172 
173 float FP420G4Hit::getVz() const { return theVz; }
174 void FP420G4Hit::setVz(float t) { theVz = t; }
175 
176 std::ostream& operator<<(std::ostream& os, const FP420G4Hit& hit) {
177  os << " Data of this FP420G4Hit are:" << std::endl
178  << " hitEntryLocalP: " << hit.getEntryLocalP() << std::endl
179  << " hitExitLocalP: " << hit.getExitLocalP() << std::endl
180  << " Time slice ID: " << hit.getTimeSliceID() << std::endl
181  << " Time slice : " << hit.getTimeSlice() << std::endl
182  << " Tof : " << hit.getTof() << std::endl
183  << " EnergyDeposit = " << hit.getEnergyDeposit() << std::endl
184  << " elmenergy = " << hit.getEM() << std::endl
185  << " hadrenergy = " << hit.getHadr() << std::endl
186  << " EnergyLoss = " << hit.getEnergyLoss() << std::endl
187  << " ParticleType = " << hit.getParticleType() << std::endl
188  << " ParticleType = " << hit.getParticleType() << std::endl
189  << " Theta at Entry = " << hit.getThetaAtEntry() << std::endl
190  << " Phi at Entry = " << hit.getPhiAtEntry() << std::endl
191  << " X at Entry = " << hit.getX() << std::endl
192  << " Y at Entry = " << hit.getY() << std::endl
193  << " Z at Entry = " << hit.getZ() << std::endl
194  << " VtxX = " << hit.getVx() << std::endl
195  << " VtxY = " << hit.getVy() << std::endl
196  << " VtxZ = " << hit.getVz() << std::endl
197  << " parentID = " << hit.getParentId() << std::endl
198  << " Pabs = " << hit.getPabs() << std::endl
199  << " Energy of primary particle (ID = " << hit.getTrackID() << ") = " << hit.getIncidentEnergy() << " (MeV)"
200  << std::endl
201  << " Entry point in FP420 unit number " << hit.getUnitID() << " is: " << hit.getEntry() << " (mm)" << std::endl;
202  os << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" << std::endl;
203  return os;
204 }
FP420G4Hit::operator=
const FP420G4Hit & operator=(const FP420G4Hit &right)
Definition: FP420G4Hit.cc:66
FP420G4Hit::getVz
float getVz() const
Definition: FP420G4Hit.cc:173
FP420G4Hit::getEM
double getEM() const
Definition: FP420G4Hit.cc:112
FP420G4Hit::getEnergyLoss
float getEnergyLoss() const
Definition: FP420G4Hit.cc:140
FP420G4Hit::setY
void setY(float t)
Definition: FP420G4Hit.cc:159
FP420G4Hit::setParentId
void setParentId(int p)
Definition: FP420G4Hit.cc:165
mps_fire.i
i
Definition: mps_fire.py:428
FP420G4Hit::getThetaAtEntry
float getThetaAtEntry() const
Definition: FP420G4Hit.cc:149
FP420G4Hit::getParticleType
int getParticleType() const
Definition: FP420G4Hit.cc:141
FP420G4Hit::theZ
float theZ
Definition: FP420G4Hit.h:113
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
FP420G4Hit::theParentId
int theParentId
Definition: FP420G4Hit.h:122
FP420G4Hit::getIncidentEnergy
double getIncidentEnergy() const
Definition: FP420G4Hit.cc:118
FP420G4Hit::setVx
void setVx(float p)
Definition: FP420G4Hit.cc:168
mps_splice.entry
entry
Definition: mps_splice.py:68
FP420G4Hit::theTrackID
G4int theTrackID
Definition: FP420G4Hit.h:105
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
gather_cfg.cout
cout
Definition: gather_cfg.py:144
FP420G4Hit::theUnitID
int theUnitID
Definition: FP420G4Hit.h:109
FP420G4Hit::elem
double elem
Definition: FP420G4Hit.h:102
operator<<
std::ostream & operator<<(std::ostream &os, const FP420G4Hit &hit)
Definition: FP420G4Hit.cc:176
FP420G4Hit::Print
void Print() override
Definition: FP420G4Hit.cc:101
FP420G4Hit::getY
float getY() const
Definition: FP420G4Hit.cc:158
FP420G4Hit::setEntry
void setEntry(const G4ThreeVector &xyz)
Definition: FP420G4Hit.cc:104
FP420G4Hit::theIncidentEnergy
double theIncidentEnergy
Definition: FP420G4Hit.h:104
FP420G4Hit::entrylp
G4ThreeVector entrylp
Definition: FP420G4Hit.h:100
FP420G4Hit::theVz
float theVz
Definition: FP420G4Hit.h:125
FP420G4Hit::getUnitID
unsigned int getUnitID() const
Definition: FP420G4Hit.cc:124
FP420G4Hit::addEnergyDeposit
void addEnergyDeposit(double em, double hd)
Definition: FP420G4Hit.cc:131
FP420G4Hit::theTimeSlice
double theTimeSlice
Definition: FP420G4Hit.h:107
FP420G4Hit::getEntry
G4ThreeVector getEntry() const
Definition: FP420G4Hit.cc:103
FP420G4Hit::setVz
void setVz(float p)
Definition: FP420G4Hit.cc:174
FP420G4Hit::theThetaAtEntry
float theThetaAtEntry
Definition: FP420G4Hit.h:119
FP420G4Hit::getVx
float getVx() const
Definition: FP420G4Hit.cc:167
FP420G4Hit::setX
void setX(float t)
Definition: FP420G4Hit.cc:156
FP420G4Hit::setExitLocalP
void setExitLocalP(const G4ThreeVector &xyz1)
Definition: FP420G4Hit.cc:110
FP420G4Hit::getZ
float getZ() const
Definition: FP420G4Hit.cc:161
FP420G4Hit::setTrackID
void setTrackID(int i)
Definition: FP420G4Hit.cc:122
FP420G4Hit::getTimeSlice
double getTimeSlice() const
Definition: FP420G4Hit.cc:127
FP420G4Hit::getTof
float getTof() const
Definition: FP420G4Hit.cc:139
FP420G4Hit::theVx
float theVx
Definition: FP420G4Hit.h:123
FP420G4Hit::setVy
void setVy(float p)
Definition: FP420G4Hit.cc:171
FP420G4Hit::hadr
double hadr
Definition: FP420G4Hit.h:103
FP420G4Hit::getTimeSliceID
int getTimeSliceID() const
Definition: FP420G4Hit.cc:129
FP420G4Hit::setTof
void setTof(float e)
Definition: FP420G4Hit.cc:144
FP420G4Hit::theParticleType
int theParticleType
Definition: FP420G4Hit.h:117
FP420G4Hit::theTof
float theTof
Definition: FP420G4Hit.h:115
FP420G4Hit::getEntryLocalP
G4ThreeVector getEntryLocalP() const
Definition: FP420G4Hit.cc:106
FP420G4Hit::getExitLocalP
G4ThreeVector getExitLocalP() const
Definition: FP420G4Hit.cc:109
FP420G4Hit::setUnitID
void setUnitID(unsigned int i)
Definition: FP420G4Hit.cc:125
FP420G4Hit::setEntryLocalP
void setEntryLocalP(const G4ThreeVector &xyz1)
Definition: FP420G4Hit.cc:107
FP420G4Hit::getVy
float getVy() const
Definition: FP420G4Hit.cc:170
FP420G4Hit::getX
float getX() const
Definition: FP420G4Hit.cc:155
FP420G4Hit::FP420G4Hit
FP420G4Hit()
Definition: FP420G4Hit.cc:9
FP420G4Hit::theEnergyLoss
float theEnergyLoss
Definition: FP420G4Hit.h:116
FP420G4Hit::getPabs
float getPabs() const
Definition: FP420G4Hit.cc:138
FP420G4Hit::setParticleType
void setParticleType(short i)
Definition: FP420G4Hit.cc:147
FP420G4Hit::setEM
void setEM(double e)
Definition: FP420G4Hit.cc:113
FP420G4Hit::thePhiAtEntry
float thePhiAtEntry
Definition: FP420G4Hit.h:120
FP420G4Hit::setZ
void setZ(float t)
Definition: FP420G4Hit.cc:162
FP420G4Hit::getHadr
double getHadr() const
Definition: FP420G4Hit.cc:115
FP420G4Hit::thePabs
float thePabs
Definition: FP420G4Hit.h:114
FP420G4Hit
Definition: FP420G4Hit.h:18
FP420G4Hit::theVy
float theVy
Definition: FP420G4Hit.h:124
FP420G4Hit::getPhiAtEntry
float getPhiAtEntry() const
Definition: FP420G4Hit.cc:150
FP420G4Hit.h
FP420G4Hit::setPabs
void setPabs(float e)
Definition: FP420G4Hit.cc:143
FP420G4Hit::theX
float theX
Definition: FP420G4Hit.h:111
FP420G4Hit::setPhiAtEntry
void setPhiAtEntry(float f)
Definition: FP420G4Hit.cc:153
ztail.d
d
Definition: ztail.py:151
FP420G4Hit::entry
G4ThreeVector entry
Definition: FP420G4Hit.h:99
FP420G4Hit::setHadr
void setHadr(double e)
Definition: FP420G4Hit.cc:116
FP420G4Hit::addEnergyLoss
void addEnergyLoss(float e)
Definition: FP420G4Hit.cc:145
FP420G4Hit::setTimeSlice
void setTimeSlice(double d)
Definition: FP420G4Hit.cc:128
FP420G4Hit::getEnergyDeposit
double getEnergyDeposit() const
Definition: FP420G4Hit.cc:136
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
FP420G4Hit::getParentId
int getParentId() const
Definition: FP420G4Hit.cc:164
FP420G4Hit::theY
float theY
Definition: FP420G4Hit.h:112
FP420G4Hit::getTrackID
unsigned int getTrackID() const
Definition: FP420G4Hit.cc:121
FP420G4Hit::setEnergyLoss
void setEnergyLoss(float e)
Definition: FP420G4Hit.cc:146
FP420G4Hit::~FP420G4Hit
~FP420G4Hit() override
Definition: FP420G4Hit.cc:36
FP420G4Hit::exitlp
G4ThreeVector exitlp
Definition: FP420G4Hit.h:101
hit
Definition: SiStripHitEffFromCalibTree.cc:88
FP420G4Hit::setThetaAtEntry
void setThetaAtEntry(float t)
Definition: FP420G4Hit.cc:152
FP420G4Hit::setIncidentEnergy
void setIncidentEnergy(double e)
Definition: FP420G4Hit.cc:119
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37