CMS 3D CMS Logo

PPSPixelG4Hit.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: PPS
4 // Class : PPSPixelG4Hit
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 #include <iostream>
19 
20 //
21 // constructors and destructor
22 //
23 
24 PPSPixelG4Hit::PPSPixelG4Hit() : MeanPosition_(0), theEntryPoint_(0), theExitPoint_(0) {
25  elem_ = 0.;
26  hadr_ = 0.;
27  theIncidentEnergy_ = 0.;
28  theTrackID_ = -1;
29  theUnitID_ = 0;
30  theTimeSlice_ = 0.;
31 
32  theX_ = 0.;
33  theY_ = 0.;
34  theZ_ = 0.;
35  thePabs_ = 0.;
36  theTof_ = 0.;
37  theEnergyLoss_ = 0.;
38  theParticleType_ = 0;
39  theThetaAtEntry_ = 0.;
40  thePhiAtEntry_ = 0.;
41  theParentId_ = 0;
42  theVx_ = 0.;
43  theVy_ = 0.;
44  theVz_ = 0.;
45  thePx_ = 0;
46  thePy_ = 0;
47  thePz_ = 0;
48  theVPx_ = 0;
49  theVPy_ = 0;
50  theVPz_ = 0;
51 }
52 
55 
56  elem_ = right.elem_;
57  hadr_ = right.hadr_;
59  theTrackID_ = right.theTrackID_;
60  theUnitID_ = right.theUnitID_;
62 
63  theX_ = right.theX_;
64  theY_ = right.theY_;
65  theZ_ = right.theZ_;
66  thePabs_ = right.thePabs_;
67  theTof_ = right.theTof_;
70 
75  theParentId_ = right.theParentId_;
76  theVx_ = right.theVx_;
77  theVy_ = right.theVy_;
78  theVz_ = right.theVz_;
79  thePx_ = right.thePx_;
80  thePy_ = right.thePy_;
81  thePz_ = right.thePz_;
82  theVPx_ = right.theVPx_;
83  theVPy_ = right.theVPy_;
84  theVPz_ = right.theVPz_;
85 }
86 
89  elem_ = right.elem_;
90  hadr_ = right.hadr_;
92  theTrackID_ = right.theTrackID_;
93  theUnitID_ = right.theUnitID_;
95 
96  theX_ = right.theX_;
97  theY_ = right.theY_;
98  theZ_ = right.theZ_;
99  thePabs_ = right.thePabs_;
100  theTof_ = right.theTof_;
103 
108  theParentId_ = right.theParentId_;
109  theVx_ = right.theVx_;
110  theVy_ = right.theVy_;
111  theVz_ = right.theVz_;
112  thePx_ = right.thePx_;
113  thePy_ = right.thePy_;
114  thePz_ = right.thePz_;
115  theVPx_ = right.theVPx_;
116  theVPy_ = right.theVPy_;
117  theVPz_ = right.theVPz_;
118 
119  return *this;
120 }
121 
123  elem_ += aHit.eM();
124  hadr_ += aHit.hadr();
125 }
126 
127 void PPSPixelG4Hit::Print() { edm::LogInfo("PPSPixelG4Hit") << (*this); }
128 
129 const G4ThreeVector& PPSPixelG4Hit::entryPoint() const { return theEntryPoint_; }
130 
131 void PPSPixelG4Hit::setEntryPoint(const G4ThreeVector& xyz) { theEntryPoint_ = xyz; }
132 
133 const G4ThreeVector& PPSPixelG4Hit::exitPoint() const { return theExitPoint_; }
134 
135 void PPSPixelG4Hit::setExitPoint(const G4ThreeVector& xyz) { theExitPoint_ = xyz; }
136 
137 double PPSPixelG4Hit::eM() const { return elem_; }
138 void PPSPixelG4Hit::setEM(double e) { elem_ = e; }
139 
140 double PPSPixelG4Hit::hadr() const { return hadr_; }
141 void PPSPixelG4Hit::setHadr(double e) { hadr_ = e; }
142 
145 
146 int PPSPixelG4Hit::trackID() const { return theTrackID_; }
148 
149 uint32_t PPSPixelG4Hit::unitID() const { return theUnitID_; }
150 void PPSPixelG4Hit::setUnitID(uint32_t i) { theUnitID_ = i; }
151 
152 double PPSPixelG4Hit::timeSlice() const { return theTimeSlice_; }
154 int PPSPixelG4Hit::timeSliceID() const { return (int)theTimeSlice_; }
155 
156 void PPSPixelG4Hit::addEnergyDeposit(double em, double hd) {
157  elem_ += em;
158  hadr_ += hd;
159 }
160 
161 double PPSPixelG4Hit::energyDeposit() const { return elem_ + hadr_; }
162 
163 float PPSPixelG4Hit::p() const { return thePabs_; }
164 float PPSPixelG4Hit::tof() const { return theTof_; }
165 float PPSPixelG4Hit::energyLoss() const { return theEnergyLoss_; }
167 float PPSPixelG4Hit::px() const { return thePx_; }
168 float PPSPixelG4Hit::py() const { return thePy_; }
169 float PPSPixelG4Hit::pz() const { return thePz_; }
170 float PPSPixelG4Hit::vPx() const { return theVPx_; }
171 float PPSPixelG4Hit::vPy() const { return theVPy_; }
172 float PPSPixelG4Hit::vPz() const { return theVPz_; }
173 
174 void PPSPixelG4Hit::setP(float e) { thePabs_ = e; }
175 void PPSPixelG4Hit::setPx(float e) { thePx_ = e; }
176 void PPSPixelG4Hit::setPy(float e) { thePy_ = e; }
177 void PPSPixelG4Hit::setPz(float e) { thePz_ = e; }
178 void PPSPixelG4Hit::setVPx(float e) { theVPx_ = e; }
179 void PPSPixelG4Hit::setVPy(float e) { theVPy_ = e; }
180 void PPSPixelG4Hit::setVPz(float e) { theVPz_ = e; }
181 void PPSPixelG4Hit::setTof(float e) { theTof_ = e; }
184 
186 float PPSPixelG4Hit::phiAtEntry() const { return thePhiAtEntry_; }
187 
190 
191 float PPSPixelG4Hit::x() const { return theX_; }
192 void PPSPixelG4Hit::setX(float t) { theX_ = t; }
193 
194 float PPSPixelG4Hit::y() const { return theY_; }
195 void PPSPixelG4Hit::setY(float t) { theY_ = t; }
196 
197 float PPSPixelG4Hit::z() const { return theZ_; }
198 void PPSPixelG4Hit::setZ(float t) { theZ_ = t; }
199 
200 int PPSPixelG4Hit::parentId() const { return theParentId_; }
202 
203 float PPSPixelG4Hit::vx() const { return theVx_; }
204 void PPSPixelG4Hit::setVx(float t) { theVx_ = t; }
205 
206 float PPSPixelG4Hit::vy() const { return theVy_; }
207 void PPSPixelG4Hit::setVy(float t) { theVy_ = t; }
208 
209 float PPSPixelG4Hit::vz() const { return theVz_; }
210 void PPSPixelG4Hit::setVz(float t) { theVz_ = t; }
211 
212 std::ostream& operator<<(std::ostream& os, const PPSPixelG4Hit& hit) {
213  os << " Data of this PPSPixelG4Hit are:\n"
214  << " Time slice ID: " << hit.timeSliceID() << "\n"
215  << " EnergyDeposit = " << hit.energyLoss() << "\n"
216  << " Energy of primary particle (ID = " << hit.trackID() << ") = " << hit.incidentEnergy() << " (MeV)"
217  << "\n"
218  << " Local entry and exit points in PPS unit number " << hit.unitID() << " are: " << hit.entryPoint() << " (mm)"
219  << hit.exitPoint() << " (mm)"
220  << "\n"
221  << " Global posizion in PPS unit number " << hit.unitID() << " are: " << hit.meanPosition() << " (mm)"
222  << "\n"
223  << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
224  return os;
225 }
PPSPixelG4Hit::setX
void setX(float t)
Definition: PPSPixelG4Hit.cc:192
PPSPixelG4Hit::eM
double eM() const
Definition: PPSPixelG4Hit.cc:137
PPSPixelG4Hit::setTrackID
void setTrackID(int i)
Definition: PPSPixelG4Hit.cc:147
PPSPixelG4Hit::theEnergyLoss_
float theEnergyLoss_
Definition: PPSPixelG4Hit.h:145
PPSPixelG4Hit::setParentId
void setParentId(int p)
Definition: PPSPixelG4Hit.cc:201
PPSPixelG4Hit::theVPy_
float theVPy_
Definition: PPSPixelG4Hit.h:152
PPSPixelG4Hit::setTimeSlice
void setTimeSlice(double d)
Definition: PPSPixelG4Hit.cc:153
mps_fire.i
i
Definition: mps_fire.py:428
PPSPixelG4Hit::theVx_
float theVx_
Definition: PPSPixelG4Hit.h:154
MessageLogger.h
PPSPixelG4Hit::setThetaAtEntry
void setThetaAtEntry(float t)
Definition: PPSPixelG4Hit.cc:188
PPSPixelG4Hit::setVz
void setVz(float p)
Definition: PPSPixelG4Hit.cc:210
PPSPixelG4Hit::theThetaAtEntry_
float theThetaAtEntry_
Definition: PPSPixelG4Hit.h:148
PPSPixelG4Hit::theUnitID_
uint32_t theUnitID_
Definition: PPSPixelG4Hit.h:137
PPSPixelG4Hit::theY_
float theY_
Definition: PPSPixelG4Hit.h:141
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
PPSPixelG4Hit::energyLoss
float energyLoss() const
Definition: PPSPixelG4Hit.cc:165
PPSPixelG4Hit
Definition: PPSPixelG4Hit.h:38
PPSPixelG4Hit::vz
float vz() const
Definition: PPSPixelG4Hit.cc:209
PPSPixelG4Hit::tof
float tof() const
Definition: PPSPixelG4Hit.cc:164
PPSPixelG4Hit::timeSlice
double timeSlice() const
Definition: PPSPixelG4Hit.cc:152
operator<<
std::ostream & operator<<(std::ostream &os, const PPSPixelG4Hit &hit)
Definition: PPSPixelG4Hit.cc:212
PPSPixelG4Hit::x
float x() const
Definition: PPSPixelG4Hit.cc:191
PPSPixelG4Hit::thetaAtEntry
float thetaAtEntry() const
Definition: PPSPixelG4Hit.cc:185
PPSPixelG4Hit::setPx
void setPx(float e)
Definition: PPSPixelG4Hit.cc:175
PPSPixelG4Hit::theVPz_
float theVPz_
Definition: PPSPixelG4Hit.h:152
PPSPixelG4Hit::theEntryPoint_
G4ThreeVector theEntryPoint_
Definition: PPSPixelG4Hit.h:150
PPSPixelG4Hit::setVPx
void setVPx(float e)
Definition: PPSPixelG4Hit.cc:178
PPSPixelG4Hit::MeanPosition_
G4ThreeVector MeanPosition_
Definition: PPSPixelG4Hit.h:131
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
PPSPixelG4Hit::setUnitID
void setUnitID(uint32_t i)
Definition: PPSPixelG4Hit.cc:150
PPSPixelG4Hit::setParticleType
void setParticleType(short i)
Definition: PPSPixelG4Hit.cc:183
PPSPixelG4Hit::vPy
float vPy() const
Definition: PPSPixelG4Hit.cc:171
PPSPixelG4Hit::setVy
void setVy(float p)
Definition: PPSPixelG4Hit.cc:207
PPSPixelG4Hit::theZ_
float theZ_
Definition: PPSPixelG4Hit.h:142
PPSPixelG4Hit::thePx_
float thePx_
Definition: PPSPixelG4Hit.h:152
PPSPixelG4Hit::pz
float pz() const
Definition: PPSPixelG4Hit.cc:169
PPSPixelG4Hit::theExitPoint_
G4ThreeVector theExitPoint_
Definition: PPSPixelG4Hit.h:151
PPSPixelG4Hit::theIncidentEnergy_
double theIncidentEnergy_
Definition: PPSPixelG4Hit.h:134
PPSPixelG4Hit::theVy_
float theVy_
Definition: PPSPixelG4Hit.h:155
PPSPixelG4Hit::exitPoint
const G4ThreeVector & exitPoint() const
Definition: PPSPixelG4Hit.cc:133
PPSPixelG4Hit::theTrackID_
int theTrackID_
Definition: PPSPixelG4Hit.h:135
PPSPixelG4Hit::unitID
uint32_t unitID() const
Definition: PPSPixelG4Hit.cc:149
PPSPixelG4Hit::theTof_
float theTof_
Definition: PPSPixelG4Hit.h:144
PPSPixelG4Hit::setEM
void setEM(double e)
Definition: PPSPixelG4Hit.cc:138
PPSPixelG4Hit::setZ
void setZ(float t)
Definition: PPSPixelG4Hit.cc:198
PPSPixelG4Hit::thePabs_
float thePabs_
Definition: PPSPixelG4Hit.h:143
PPSPixelG4Hit::setExitPoint
void setExitPoint(const G4ThreeVector &)
Definition: PPSPixelG4Hit.cc:135
PPSPixelG4Hit::thePhiAtEntry_
float thePhiAtEntry_
Definition: PPSPixelG4Hit.h:149
PPSPixelG4Hit::parentId
int parentId() const
Definition: PPSPixelG4Hit.cc:200
PPSPixelG4Hit::phiAtEntry
float phiAtEntry() const
Definition: PPSPixelG4Hit.cc:186
PPSPixelG4Hit::z
float z() const
Definition: PPSPixelG4Hit.cc:197
PPSPixelG4Hit::vPz
float vPz() const
Definition: PPSPixelG4Hit.cc:172
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
PPSPixelG4Hit::theTimeSlice_
double theTimeSlice_
Definition: PPSPixelG4Hit.h:138
PPSPixelG4Hit::py
float py() const
Definition: PPSPixelG4Hit.cc:168
PPSPixelG4Hit::particleType
int particleType() const
Definition: PPSPixelG4Hit.cc:166
PPSPixelG4Hit::setIncidentEnergy
void setIncidentEnergy(double e)
Definition: PPSPixelG4Hit.cc:144
PPSPixelG4Hit::timeSliceID
int timeSliceID() const
Definition: PPSPixelG4Hit.cc:154
PPSPixelG4Hit::thePy_
float thePy_
Definition: PPSPixelG4Hit.h:152
PPSPixelG4Hit::addEnergyDeposit
void addEnergyDeposit(double em, double hd)
Definition: PPSPixelG4Hit.cc:156
PPSPixelG4Hit::setEnergyLoss
void setEnergyLoss(float e)
Definition: PPSPixelG4Hit.cc:182
PPSPixelG4Hit::theVz_
float theVz_
Definition: PPSPixelG4Hit.h:156
PPSPixelG4Hit::operator=
const PPSPixelG4Hit & operator=(const PPSPixelG4Hit &right)
Definition: PPSPixelG4Hit.cc:87
PPSPixelG4Hit::p
float p() const
Definition: PPSPixelG4Hit.cc:163
PPSPixelG4Hit::incidentEnergy
double incidentEnergy() const
Definition: PPSPixelG4Hit.cc:143
PPSPixelG4Hit::entryPoint
const G4ThreeVector & entryPoint() const
Definition: PPSPixelG4Hit.cc:129
PPSPixelG4Hit::theParentId_
int theParentId_
Definition: PPSPixelG4Hit.h:153
PPSPixelG4Hit::setY
void setY(float t)
Definition: PPSPixelG4Hit.cc:195
PPSPixelG4Hit::setHadr
void setHadr(double e)
Definition: PPSPixelG4Hit.cc:141
PPSPixelG4Hit.h
PPSPixelG4Hit::px
float px() const
Definition: PPSPixelG4Hit.cc:167
PPSPixelG4Hit::hadr_
double hadr_
Definition: PPSPixelG4Hit.h:133
PPSPixelG4Hit::setPy
void setPy(float e)
Definition: PPSPixelG4Hit.cc:176
PPSPixelG4Hit::setVPy
void setVPy(float e)
Definition: PPSPixelG4Hit.cc:179
PPSPixelG4Hit::elem_
double elem_
Definition: PPSPixelG4Hit.h:132
PPSPixelG4Hit::trackID
int trackID() const
Definition: PPSPixelG4Hit.cc:146
PPSPixelG4Hit::setP
void setP(float e)
Definition: PPSPixelG4Hit.cc:174
PPSPixelG4Hit::theParticleType_
int theParticleType_
Definition: PPSPixelG4Hit.h:146
PPSPixelG4Hit::vx
float vx() const
Definition: PPSPixelG4Hit.cc:203
PPSPixelG4Hit::setTof
void setTof(float e)
Definition: PPSPixelG4Hit.cc:181
PPSPixelG4Hit::Print
void Print() override
Definition: PPSPixelG4Hit.cc:127
PPSPixelG4Hit::y
float y() const
Definition: PPSPixelG4Hit.cc:194
ztail.d
d
Definition: ztail.py:151
PPSPixelG4Hit::hadr
double hadr() const
Definition: PPSPixelG4Hit.cc:140
PPSPixelG4Hit::setEntryPoint
void setEntryPoint(const G4ThreeVector &)
Definition: PPSPixelG4Hit.cc:131
PPSPixelG4Hit::theVPx_
float theVPx_
Definition: PPSPixelG4Hit.h:152
PPSPixelG4Hit::setPz
void setPz(float e)
Definition: PPSPixelG4Hit.cc:177
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
PPSPixelG4Hit::theX_
float theX_
Definition: PPSPixelG4Hit.h:140
PPSPixelG4Hit::thePz_
float thePz_
Definition: PPSPixelG4Hit.h:152
PPSPixelG4Hit::vPx
float vPx() const
Definition: PPSPixelG4Hit.cc:170
PPSPixelG4Hit::energyDeposit
double energyDeposit() const
Definition: PPSPixelG4Hit.cc:161
PPSPixelG4Hit::PPSPixelG4Hit
PPSPixelG4Hit()
Definition: PPSPixelG4Hit.cc:24
hit
Definition: SiStripHitEffFromCalibTree.cc:88
PPSPixelG4Hit::setVPz
void setVPz(float e)
Definition: PPSPixelG4Hit.cc:180
PPSPixelG4Hit::setPhiAtEntry
void setPhiAtEntry(float f)
Definition: PPSPixelG4Hit.cc:189
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
PPSPixelG4Hit::setVx
void setVx(float p)
Definition: PPSPixelG4Hit.cc:204
PPSPixelG4Hit::vy
float vy() const
Definition: PPSPixelG4Hit.cc:206