CMS 3D CMS Logo

PPSDiamondG4Hit.cc
Go to the documentation of this file.
1 // Author
2 //Seyed Mohsen Etesami setesami@cern.ch
5 
6 #include <iostream>
7 
8 PPSDiamondG4Hit::PPSDiamondG4Hit() : entry_(0), exit_(0), local_entry_(0), local_exit_(0) {
9  theIncidentEnergy_ = 0.0;
10  theTrackID_ = -1;
11  theUnitID_ = 0;
12  theTimeSlice_ = 0.0;
13  theGlobaltimehit_ = 0.0;
14  theX_ = 0.0;
15  theY_ = 0.0;
16  theZ_ = 0.0;
17  thePabs_ = 0.0;
18  theTof_ = 0.0;
19  theEnergyLoss_ = 0.0;
20  theParticleType_ = 0;
21  theParentId_ = 0;
22  theVx_ = 0.0;
23  theVy_ = 0.0;
24  theVz_ = 0.0;
25  thePx_ = thePy_ = thePz_ = 0.0;
26  theThetaAtEntry_ = 0;
27  thePhiAtEntry_ = 0;
28 }
29 
31 
33  entry_ = right.entry_;
34  exit_ = right.exit_;
35  local_entry_ = right.local_entry_;
36  local_exit_ = right.local_exit_;
38  theTrackID_ = right.theTrackID_;
39  theUnitID_ = right.theUnitID_;
42  theX_ = right.theX_;
43  theY_ = right.theY_;
44  theZ_ = right.theZ_;
45  thePabs_ = right.thePabs_;
46  theTof_ = right.theTof_;
49  theParentId_ = right.theParentId_;
50  theVx_ = right.theVx_;
51  theVy_ = right.theVy_;
52  theVz_ = right.theVz_;
53  thePx_ = right.thePx_;
54  thePy_ = right.thePy_;
55  thePz_ = right.thePz_;
58 }
59 
61  entry_ = right.entry_;
62  exit_ = right.exit_;
63  local_entry_ = right.local_entry_;
64  local_exit_ = right.local_exit_;
66  theTrackID_ = right.theTrackID_;
67  theUnitID_ = right.theUnitID_;
70  theX_ = right.theX_;
71  theY_ = right.theY_;
72  theZ_ = right.theZ_;
73  thePabs_ = right.thePabs_;
74  theTof_ = right.theTof_;
77  theParentId_ = right.theParentId_;
78  theVx_ = right.theVx_;
79  theVy_ = right.theVy_;
80  theVz_ = right.theVz_;
81  thePx_ = right.thePx_;
82  thePy_ = right.thePy_;
83  thePz_ = right.thePz_;
86 
87  return *this;
88 }
89 
90 void PPSDiamondG4Hit::Print() { edm::LogInfo("PPSSimDiamond") << (*this); }
91 
92 const G4ThreeVector& PPSDiamondG4Hit::entry() const { return entry_; }
93 void PPSDiamondG4Hit::setEntry(const G4ThreeVector& xyz) { entry_ = xyz; }
94 
95 const G4ThreeVector& PPSDiamondG4Hit::exit() const { return exit_; }
96 void PPSDiamondG4Hit::setExit(const G4ThreeVector& xyz) { exit_ = xyz; }
97 
98 const G4ThreeVector& PPSDiamondG4Hit::localEntry() const { return local_entry_; }
99 void PPSDiamondG4Hit::setLocalEntry(const G4ThreeVector& xyz) { local_entry_ = xyz; }
100 const G4ThreeVector& PPSDiamondG4Hit::localExit() const { return local_exit_; }
101 void PPSDiamondG4Hit::setLocalExit(const G4ThreeVector& xyz) { local_exit_ = xyz; }
102 
105 
106 unsigned int PPSDiamondG4Hit::trackID() const { return theTrackID_; }
108 
109 int PPSDiamondG4Hit::unitID() const { return theUnitID_; }
110 void PPSDiamondG4Hit::setUnitID(unsigned int i) { theUnitID_ = i; }
111 
112 double PPSDiamondG4Hit::timeSlice() const { return theTimeSlice_; }
114 int PPSDiamondG4Hit::timeSliceID() const { return (int)theTimeSlice_; }
115 
116 double PPSDiamondG4Hit::p() const { return thePabs_; }
117 double PPSDiamondG4Hit::tof() const { return theTof_; }
118 double PPSDiamondG4Hit::energyLoss() const { return theEnergyLoss_; }
120 
121 void PPSDiamondG4Hit::setP(double e) { thePabs_ = e; }
122 void PPSDiamondG4Hit::setTof(double e) { theTof_ = e; }
126 
128 double PPSDiamondG4Hit::phiAtEntry() const { return thePhiAtEntry_; }
129 
132 
133 double PPSDiamondG4Hit::x() const { return theX_; }
134 void PPSDiamondG4Hit::setX(double t) { theX_ = t; }
135 
136 double PPSDiamondG4Hit::y() const { return theY_; }
137 void PPSDiamondG4Hit::setY(double t) { theY_ = t; }
138 
139 double PPSDiamondG4Hit::z() const { return theZ_; }
140 void PPSDiamondG4Hit::setZ(double t) { theZ_ = t; }
141 
144 
145 double PPSDiamondG4Hit::vx() const { return theVx_; }
146 void PPSDiamondG4Hit::setVx(double t) { theVx_ = t; }
147 
148 double PPSDiamondG4Hit::vy() const { return theVy_; }
149 void PPSDiamondG4Hit::setVy(double t) { theVy_ = t; }
150 
151 double PPSDiamondG4Hit::vz() const { return theVz_; }
152 void PPSDiamondG4Hit::setVz(double t) { theVz_ = t; }
153 
154 void PPSDiamondG4Hit::setPx(double p) { thePx_ = p; }
155 void PPSDiamondG4Hit::setPy(double p) { thePy_ = p; }
156 void PPSDiamondG4Hit::setPz(double p) { thePz_ = p; }
157 
158 double PPSDiamondG4Hit::px() const { return thePx_; }
159 double PPSDiamondG4Hit::py() const { return thePy_; }
160 double PPSDiamondG4Hit::pz() const { return thePz_; }
161 
164 
165 std::ostream& operator<<(std::ostream& os, const PPSDiamondG4Hit& hit) {
166  os << " Data of this PPSDiamondG4Hit are:" << std::endl
167  << " Time slice ID: " << hit.timeSliceID() << std::endl
168  << " EnergyDeposit = " << hit.energyLoss() << std::endl
169  << " Energy of primary particle (ID = " << hit.trackID() << ") = " << hit.incidentEnergy() << " (MeV)"
170  << "\n"
171  << " Local entry and exit points in PPS unit number " << hit.unitID() << " are: " << hit.entry() << " (mm)"
172  << hit.exit() << " (mm)"
173  << "\n"
174  << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" << std::endl;
175  return os;
176 }
double timeSlice() const
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
void setP(double e)
const G4ThreeVector & localEntry() const
void setTof(double e)
void setVy(double p)
double x() const
double tof() const
const G4ThreeVector & localExit() const
void setPz(double p)
double energyLoss() const
unsigned int trackID() const
G4ThreeVector entry_
double p() const
void setEntry(const G4ThreeVector &xyz)
void setZ(double t)
const G4ThreeVector & exit() const
void setIncidentEnergy(double e)
void setThetaAtEntry(double t)
void setVz(double p)
double vy() const
void setPy(double p)
double px() const
double pz() const
int particleType() const
double incidentEnergy() const
void setUnitID(unsigned int i)
void setEnergyLoss(double e)
void setExit(const G4ThreeVector &xyz)
const PPSDiamondG4Hit & operator=(const PPSDiamondG4Hit &right)
void setVx(double p)
G4ThreeVector local_exit_
double f[11][100]
void setPhiAtEntry(double f)
void setTrackID(int i)
void addEnergyLoss(double e)
d
Definition: ztail.py:151
double z() const
~PPSDiamondG4Hit() override
std::ostream & operator<<(std::ostream &os, const PPSDiamondG4Hit &hit)
G4ThreeVector local_entry_
void setParticleType(short i)
double theIncidentEnergy_
void setParentId(int p)
void setGlobalTimehit(double h)
void setLocalEntry(const G4ThreeVector &theLocalEntryPoint)
double vx() const
const G4ThreeVector & entry() const
void setX(double t)
double globalTimehit() const
void setY(double t)
double py() const
double vz() const
double thetaAtEntry() const
G4ThreeVector exit_
int timeSliceID() const
double y() const
int unitID() const
void Print() override
void setLocalExit(const G4ThreeVector &theLocalExitPoint)
int parentId() const
double phiAtEntry() const
void setPx(double p)
void setTimeSlice(double d)