CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TotemRPG4Hit.cc
Go to the documentation of this file.
1 // Date: 11.10.02
2 // Description: Transient Hit class for the calorimeters
5 #include <iostream>
6 
8  theIncidentEnergy_ = 0.0;
9  theTrackID_ = -1;
10  theUnitID_ = 0;
11  theTimeSlice_ = 0.0;
12 
13  thePabs_ = 0.0;
14  theTof_ = 0.0;
15  theEnergyLoss_ = 0.0;
16  theParticleType_ = 0;
17  theX_ = 0.0;
18  theY_ = 0.0;
19  theZ_ = 0.0;
20  theParentId_ = 0;
21  theVx_ = 0.0;
22  theVy_ = 0.0;
23  theVz_ = 0.0;
24  thePx_ = thePy_ = thePz_ = 0.0;
25 }
26 
29  theTrackID_ = right.theTrackID_;
30  theUnitID_ = right.theUnitID_;
32  entry_ = right.entry_;
33 
34  thePabs_ = right.thePabs_;
35  theTof_ = right.theTof_;
38  theX_ = right.theX_;
39  theY_ = right.theY_;
40  theZ_ = right.theZ_;
41 
42  theVx_ = right.theVx_;
43  theVy_ = right.theVy_;
44  theVz_ = right.theVz_;
45 
46  theParentId_ = right.theParentId_;
47 }
48 
51  theTrackID_ = right.theTrackID_;
52  theUnitID_ = right.theUnitID_;
54  entry_ = right.entry_;
55 
56  thePabs_ = right.thePabs_;
57  theTof_ = right.theTof_;
60  theX_ = right.theX_;
61  theY_ = right.theY_;
62  theZ_ = right.theZ_;
63 
64  theVx_ = right.theVx_;
65  theVy_ = right.theVy_;
66  theVz_ = right.theVz_;
67 
68  theParentId_ = right.theParentId_;
69 
70  return *this;
71 }
72 
73 void TotemRPG4Hit::Print() { edm::LogInfo("TotemRP") << (*this); }
74 
75 G4ThreeVector TotemRPG4Hit::entry() const { return entry_; }
76 void TotemRPG4Hit::setEntry(G4ThreeVector xyz) { entry_ = xyz; }
77 
78 G4ThreeVector TotemRPG4Hit::exit() const { return exit_; }
79 void TotemRPG4Hit::setExit(G4ThreeVector xyz) { exit_ = xyz; }
80 
81 G4ThreeVector TotemRPG4Hit::localEntry() const { return local_entry_; }
82 void TotemRPG4Hit::setLocalEntry(const G4ThreeVector& xyz) { local_entry_ = xyz; }
83 G4ThreeVector TotemRPG4Hit::localExit() const { return local_exit_; }
84 void TotemRPG4Hit::setLocalExit(const G4ThreeVector& xyz) { local_exit_ = xyz; }
85 
88 
89 unsigned int TotemRPG4Hit::trackID() const { return theTrackID_; }
91 
92 int TotemRPG4Hit::unitID() const { return theUnitID_; }
93 void TotemRPG4Hit::setUnitID(unsigned int i) { theUnitID_ = i; }
94 
95 double TotemRPG4Hit::timeSlice() const { return theTimeSlice_; }
97 int TotemRPG4Hit::timeSliceID() const { return (int)theTimeSlice_; }
98 
99 double TotemRPG4Hit::p() const { return thePabs_; }
100 double TotemRPG4Hit::tof() const { return theTof_; }
101 double TotemRPG4Hit::energyLoss() const { return theEnergyLoss_; }
103 
104 void TotemRPG4Hit::setP(double e) { thePabs_ = e; }
105 void TotemRPG4Hit::setTof(double e) { theTof_ = e; }
109 
111 double TotemRPG4Hit::phiAtEntry() const { return thePhiAtEntry_; }
112 
115 
116 double TotemRPG4Hit::x() const { return theX_; }
117 void TotemRPG4Hit::setX(double t) { theX_ = t; }
118 
119 double TotemRPG4Hit::y() const { return theY_; }
120 void TotemRPG4Hit::setY(double t) { theY_ = t; }
121 
122 double TotemRPG4Hit::z() const { return theZ_; }
123 void TotemRPG4Hit::setZ(double t) { theZ_ = t; }
124 
125 int TotemRPG4Hit::parentId() const { return theParentId_; }
127 
128 double TotemRPG4Hit::vx() const { return theVx_; }
129 void TotemRPG4Hit::setVx(double t) { theVx_ = t; }
130 
131 double TotemRPG4Hit::vy() const { return theVy_; }
132 void TotemRPG4Hit::setVy(double t) { theVy_ = t; }
133 
134 double TotemRPG4Hit::vz() const { return theVz_; }
135 void TotemRPG4Hit::setVz(double t) { theVz_ = t; }
136 
137 void TotemRPG4Hit::setPx(double p) { thePx_ = p; }
138 void TotemRPG4Hit::setPy(double p) { thePy_ = p; }
139 void TotemRPG4Hit::setPz(double p) { thePz_ = p; }
140 
141 double TotemRPG4Hit::px() const { return thePx_; }
142 double TotemRPG4Hit::py() const { return thePy_; }
143 double TotemRPG4Hit::pz() const { return thePz_; }
144 
145 std::ostream& operator<<(std::ostream& os, const TotemRPG4Hit& hit) {
146  os << " Data of this TotemRPG4Hit are:" << std::endl
147  << " Time slice ID: " << hit.timeSliceID() << std::endl
148  << " EnergyDeposit = " << hit.energyLoss() << std::endl
149  << " Energy of primary particle (ID = " << hit.trackID() << ") = " << hit.incidentEnergy() << " (MeV)" << std::endl
150  << " Entry point in Totem unit number " << hit.unitID() << " is: " << hit.entry() << " (mm)" << std::endl;
151  os << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" << std::endl;
152  return os;
153 }
void setEntry(G4ThreeVector xyz)
Definition: TotemRPG4Hit.cc:76
G4ThreeVector localEntry() const
Definition: TotemRPG4Hit.cc:81
unsigned int trackID() const
Definition: TotemRPG4Hit.cc:89
G4ThreeVector entry_
Definition: TotemRPG4Hit.h:109
double px() const
int particleType() const
double vx() const
double py() const
void setTof(double e)
double theTimeSlice_
Definition: TotemRPG4Hit.h:117
void Print() override
Definition: TotemRPG4Hit.cc:73
void setP(double e)
void setIncidentEnergy(double e)
Definition: TotemRPG4Hit.cc:87
double x() const
double z() const
double theEnergyLoss_
Definition: TotemRPG4Hit.h:124
void setY(double t)
int unitID() const
Definition: TotemRPG4Hit.cc:92
double thePabs_
Definition: TotemRPG4Hit.h:122
void setVx(double p)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
double vz() const
G4ThreeVector local_exit_
Definition: TotemRPG4Hit.h:112
void setPy(double p)
double p() const
Definition: TotemRPG4Hit.cc:99
double vy() const
double theIncidentEnergy_
Definition: TotemRPG4Hit.h:113
tuple d
Definition: ztail.py:151
void setLocalEntry(const G4ThreeVector &theLocalEntryPoint)
Definition: TotemRPG4Hit.cc:82
void addEnergyLoss(double e)
double theTof_
Definition: TotemRPG4Hit.h:123
G4ThreeVector exit() const
Definition: TotemRPG4Hit.cc:78
double phiAtEntry() const
void setExit(G4ThreeVector xyz)
Definition: TotemRPG4Hit.cc:79
double timeSlice() const
Definition: TotemRPG4Hit.cc:95
int timeSliceID() const
Definition: TotemRPG4Hit.cc:97
const TotemRPG4Hit & operator=(const TotemRPG4Hit &right)
Definition: TotemRPG4Hit.cc:49
G4ThreeVector exit_
Definition: TotemRPG4Hit.h:110
double theThetaAtEntry_
Definition: TotemRPG4Hit.h:127
void setLocalExit(const G4ThreeVector &theLocalExitPoint)
Definition: TotemRPG4Hit.cc:84
void setX(double t)
void setThetaAtEntry(double t)
void setUnitID(unsigned int i)
Definition: TotemRPG4Hit.cc:93
G4ThreeVector entry() const
Definition: TotemRPG4Hit.cc:75
double energyLoss() const
double pz() const
uint32_t theUnitID_
Definition: TotemRPG4Hit.h:116
Log< level::Info, false > LogInfo
double thetaAtEntry() const
void setPhiAtEntry(double f)
G4ThreeVector local_entry_
Definition: TotemRPG4Hit.h:111
double y() const
G4ThreeVector localExit() const
Definition: TotemRPG4Hit.cc:83
void setVz(double p)
int parentId() const
double tof() const
void setParentId(int p)
void setTrackID(int i)
Definition: TotemRPG4Hit.cc:90
void setPz(double p)
void setParticleType(short i)
void setZ(double t)
int theParticleType_
Definition: TotemRPG4Hit.h:125
double incidentEnergy() const
Definition: TotemRPG4Hit.cc:86
void setEnergyLoss(double e)
double thePhiAtEntry_
Definition: TotemRPG4Hit.h:128
void setVy(double p)
void setPx(double p)
void setTimeSlice(double d)
Definition: TotemRPG4Hit.cc:96