CMS 3D CMS Logo

TotemRPG4Hit.h
Go to the documentation of this file.
1 // File: CaloG4Hit.h
3 // Date: 10.02 Taken from CMSCaloHit
4 //
5 // Hit class for Calorimeters (Ecal, Hcal, ...)
6 //
7 // One Hit object should be created
8 // -for each new particle entering the calorimeter
9 // -for each detector unit (= cristal or fiber or scintillator layer)
10 // -for each nanosecond of the shower development
11 //
12 // This implies that all hit objects created for a given shower
13 // have the same value for
14 // - Entry (= local coordinates of the entrance point of the particle
15 // in the unit where the shower starts)
16 // - the TrackID (= Identification number of the incident particle)
17 // - the IncidentEnergy (= energy of that particle)
18 //
19 // Modified:
20 //
22 #ifndef PPS_TotemRPG4Hit_h
23 #define PPS_TotemRPG4Hit_h 1
24 
25 #include "G4VHit.hh"
26 #include "G4ThreeVector.hh"
28 #include <iostream>
29 
30 class TotemRPG4Hit : public G4VHit {
31 public:
32  TotemRPG4Hit();
33  ~TotemRPG4Hit() override = default;
34  TotemRPG4Hit(const TotemRPG4Hit &right);
35  const TotemRPG4Hit &operator=(const TotemRPG4Hit &right);
36  int operator==(const TotemRPG4Hit &) { return 0; }
37 
38  void Draw() override {}
39  void Print() override;
40 
41 public:
42  G4ThreeVector entry() const;
43  void setEntry(G4ThreeVector xyz);
44  G4ThreeVector exit() const;
45  void setExit(G4ThreeVector xyz);
46 
47  void setLocalEntry(const G4ThreeVector &theLocalEntryPoint);
48  void setLocalExit(const G4ThreeVector &theLocalExitPoint);
49  G4ThreeVector localEntry() const;
50  G4ThreeVector localExit() const;
51 
52  double incidentEnergy() const;
53  void setIncidentEnergy(double e);
54 
55  unsigned int trackID() const;
56  void setTrackID(int i);
57 
58  int unitID() const;
59  void setUnitID(unsigned int i);
60 
61  double timeSlice() const;
62  void setTimeSlice(double d);
63  int timeSliceID() const;
64 
65  double p() const;
66  double tof() const;
67  double energyLoss() const;
68  int particleType() const;
69 
70  void setP(double e);
71  void setTof(double e);
72  void setEnergyLoss(double e);
73  void setParticleType(short i);
74 
75  void addEnergyLoss(double e);
76 
77  double thetaAtEntry() const;
78  double phiAtEntry() const;
79 
80  void setThetaAtEntry(double t);
81  void setPhiAtEntry(double f);
82 
83  double x() const;
84  void setX(double t);
85  double y() const;
86  double z() const;
87  void setY(double t);
88  void setZ(double t);
89 
90  int parentId() const;
91  double vx() const;
92  double vy() const;
93  double vz() const;
94 
95  void setParentId(int p);
96  void setVx(double p);
97  void setVy(double p);
98  void setVz(double p);
99 
100  void setPx(double p);
101  void setPy(double p);
102  void setPz(double p);
103 
104  double px() const;
105  double py() const;
106  double pz() const;
107 
108 private:
109  G4ThreeVector entry_; //Entry point
110  G4ThreeVector exit_; //Exit point
111  G4ThreeVector local_entry_; //local entry point
112  G4ThreeVector local_exit_; //local exit point
113  double theIncidentEnergy_; //Energy of the primary particle
114  int theTrackID_; //Identification number of the primary
115  //particle
116  uint32_t theUnitID_; //Totem Unit Number
117  double theTimeSlice_; //Time Slice Identification
118 
119  double theX_;
120  double theY_;
121  double theZ_;
122  double thePabs_;
123  double theTof_;
126 
129  G4ThreeVector theEntryPoint_;
130  G4ThreeVector theExitPoint_;
131 
133  double theVx_;
134  double theVy_;
135  double theVz_;
136 
137  double thePx_, thePy_, thePz_;
138 };
139 
140 std::ostream &operator<<(std::ostream &, const TotemRPG4Hit &);
141 
142 #endif //PPS_TotemRPG4Hit_h
TotemRPG4Hit::setExit
void setExit(G4ThreeVector xyz)
Definition: TotemRPG4Hit.cc:79
TotemRPG4Hit::addEnergyLoss
void addEnergyLoss(double e)
Definition: TotemRPG4Hit.cc:107
TotemRPG4Hit::py
double py() const
Definition: TotemRPG4Hit.cc:142
mps_fire.i
i
Definition: mps_fire.py:355
TotemRPG4Hit::setVy
void setVy(double p)
Definition: TotemRPG4Hit.cc:132
TotemRPG4Hit::setParticleType
void setParticleType(short i)
Definition: TotemRPG4Hit.cc:108
TotemRPG4Hit::theVz_
double theVz_
Definition: TotemRPG4Hit.h:135
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
TotemRPG4Hit::setZ
void setZ(double t)
Definition: TotemRPG4Hit.cc:123
TotemRPG4Hit::theParticleType_
int theParticleType_
Definition: TotemRPG4Hit.h:125
TotemRPG4Hit::thetaAtEntry
double thetaAtEntry() const
Definition: TotemRPG4Hit.cc:110
TotemRPG4Hit::localExit
G4ThreeVector localExit() const
Definition: TotemRPG4Hit.cc:83
TotemRPG4Hit::vz
double vz() const
Definition: TotemRPG4Hit.cc:134
TotemRPG4Hit::timeSlice
double timeSlice() const
Definition: TotemRPG4Hit.cc:95
TotemRPG4Hit::theTof_
double theTof_
Definition: TotemRPG4Hit.h:123
TotemRPG4Hit::localEntry
G4ThreeVector localEntry() const
Definition: TotemRPG4Hit.cc:81
TotemRPG4Hit::setTrackID
void setTrackID(int i)
Definition: TotemRPG4Hit.cc:90
TotemRPG4Hit::local_exit_
G4ThreeVector local_exit_
Definition: TotemRPG4Hit.h:112
TotemRPG4Hit::setX
void setX(double t)
Definition: TotemRPG4Hit.cc:117
TotemRPG4Hit::setThetaAtEntry
void setThetaAtEntry(double t)
Definition: TotemRPG4Hit.cc:113
TotemRPG4Hit::setTof
void setTof(double e)
Definition: TotemRPG4Hit.cc:105
TotemRPG4Hit::theEntryPoint_
G4ThreeVector theEntryPoint_
Definition: TotemRPG4Hit.h:129
TotemRPG4Hit::theIncidentEnergy_
double theIncidentEnergy_
Definition: TotemRPG4Hit.h:113
TotemRPG4Hit::operator==
int operator==(const TotemRPG4Hit &)
Definition: TotemRPG4Hit.h:36
TotemRPG4Hit::theY_
double theY_
Definition: TotemRPG4Hit.h:120
TotemRPG4Hit::exit
G4ThreeVector exit() const
Definition: TotemRPG4Hit.cc:78
TotemRPG4Hit::setLocalEntry
void setLocalEntry(const G4ThreeVector &theLocalEntryPoint)
Definition: TotemRPG4Hit.cc:82
TotemRPG4Hit::tof
double tof() const
Definition: TotemRPG4Hit.cc:100
TotemRPG4Hit::setVz
void setVz(double p)
Definition: TotemRPG4Hit.cc:135
TotemRPG4Hit::theThetaAtEntry_
double theThetaAtEntry_
Definition: TotemRPG4Hit.h:127
TotemRPG4Hit::vx
double vx() const
Definition: TotemRPG4Hit.cc:128
TotemRPG4Hit::thePz_
double thePz_
Definition: TotemRPG4Hit.h:137
TotemRPG4Hit::px
double px() const
Definition: TotemRPG4Hit.cc:141
TotemRPG4Hit::setPhiAtEntry
void setPhiAtEntry(double f)
Definition: TotemRPG4Hit.cc:114
TotemRPG4Hit::incidentEnergy
double incidentEnergy() const
Definition: TotemRPG4Hit.cc:86
TotemRPG4Hit::timeSliceID
int timeSliceID() const
Definition: TotemRPG4Hit.cc:97
TotemRPG4Hit::theUnitID_
uint32_t theUnitID_
Definition: TotemRPG4Hit.h:116
TotemRPG4Hit::z
double z() const
Definition: TotemRPG4Hit.cc:122
TotemRPG4Hit
Definition: TotemRPG4Hit.h:30
TotemRPG4Hit::setPx
void setPx(double p)
Definition: TotemRPG4Hit.cc:137
TotemRPG4Hit::thePhiAtEntry_
double thePhiAtEntry_
Definition: TotemRPG4Hit.h:128
TotemRPG4Hit::unitID
int unitID() const
Definition: TotemRPG4Hit.cc:92
OrderedSet.t
t
Definition: OrderedSet.py:90
TotemRPG4Hit::thePy_
double thePy_
Definition: TotemRPG4Hit.h:137
TotemRPG4Hit::setEntry
void setEntry(G4ThreeVector xyz)
Definition: TotemRPG4Hit.cc:76
TotemRPG4Hit::setEnergyLoss
void setEnergyLoss(double e)
Definition: TotemRPG4Hit.cc:106
TotemRPG4Hit::setTimeSlice
void setTimeSlice(double d)
Definition: TotemRPG4Hit.cc:96
TotemRPG4Hit::theVx_
double theVx_
Definition: TotemRPG4Hit.h:133
TotemRPG4Hit::local_entry_
G4ThreeVector local_entry_
Definition: TotemRPG4Hit.h:111
TotemRPG4Hit::theTimeSlice_
double theTimeSlice_
Definition: TotemRPG4Hit.h:117
TotemRPG4Hit::x
double x() const
Definition: TotemRPG4Hit.cc:116
TotemRPG4Hit::theEnergyLoss_
double theEnergyLoss_
Definition: TotemRPG4Hit.h:124
operator<<
std::ostream & operator<<(std::ostream &, const TotemRPG4Hit &)
Definition: TotemRPG4Hit.cc:145
TotemRPG4Hit::setPz
void setPz(double p)
Definition: TotemRPG4Hit.cc:139
TotemRPG4Hit::setP
void setP(double e)
Definition: TotemRPG4Hit.cc:104
TotemRPG4Hit::setIncidentEnergy
void setIncidentEnergy(double e)
Definition: TotemRPG4Hit.cc:87
TotemRPG4Hit::setY
void setY(double t)
Definition: TotemRPG4Hit.cc:120
TotemRPG4Hit::y
double y() const
Definition: TotemRPG4Hit.cc:119
TotemRPG4Hit::particleType
int particleType() const
Definition: TotemRPG4Hit.cc:102
TotemRPG4Hit::TotemRPG4Hit
TotemRPG4Hit()
Definition: TotemRPG4Hit.cc:7
TotemRPG4Hit::theExitPoint_
G4ThreeVector theExitPoint_
Definition: TotemRPG4Hit.h:130
TotemRPG4Hit::thePabs_
double thePabs_
Definition: TotemRPG4Hit.h:122
TotemRPG4Hit::operator=
const TotemRPG4Hit & operator=(const TotemRPG4Hit &right)
Definition: TotemRPG4Hit.cc:49
TotemRPG4Hit::setVx
void setVx(double p)
Definition: TotemRPG4Hit.cc:129
TotemRPG4Hit::thePx_
double thePx_
Definition: TotemRPG4Hit.h:137
TotemRPG4Hit::Draw
void Draw() override
Definition: TotemRPG4Hit.h:38
TotemRPG4Hit::theParentId_
int theParentId_
Definition: TotemRPG4Hit.h:132
TotemRPG4Hit::parentId
int parentId() const
Definition: TotemRPG4Hit.cc:125
TotemRPG4Hit::setLocalExit
void setLocalExit(const G4ThreeVector &theLocalExitPoint)
Definition: TotemRPG4Hit.cc:84
TotemRPG4Hit::pz
double pz() const
Definition: TotemRPG4Hit.cc:143
TotemRPG4Hit::setPy
void setPy(double p)
Definition: TotemRPG4Hit.cc:138
TotemRPG4Hit::entry
G4ThreeVector entry() const
Definition: TotemRPG4Hit.cc:75
TotemRPG4Hit::exit_
G4ThreeVector exit_
Definition: TotemRPG4Hit.h:110
TotemRPG4Hit::entry_
G4ThreeVector entry_
Definition: TotemRPG4Hit.h:109
TotemRPG4Hit::setUnitID
void setUnitID(unsigned int i)
Definition: TotemRPG4Hit.cc:93
TotemRPG4Hit::phiAtEntry
double phiAtEntry() const
Definition: TotemRPG4Hit.cc:111
Point3D.h
TotemRPG4Hit::energyLoss
double energyLoss() const
Definition: TotemRPG4Hit.cc:101
ztail.d
d
Definition: ztail.py:151
TotemRPG4Hit::trackID
unsigned int trackID() const
Definition: TotemRPG4Hit.cc:89
TotemRPG4Hit::p
double p() const
Definition: TotemRPG4Hit.cc:99
TotemRPG4Hit::theX_
double theX_
Definition: TotemRPG4Hit.h:119
TotemRPG4Hit::~TotemRPG4Hit
~TotemRPG4Hit() override=default
TotemRPG4Hit::setParentId
void setParentId(int p)
Definition: TotemRPG4Hit.cc:126
TotemRPG4Hit::Print
void Print() override
Definition: TotemRPG4Hit.cc:73
TotemRPG4Hit::theTrackID_
int theTrackID_
Definition: TotemRPG4Hit.h:114
TotemRPG4Hit::theZ_
double theZ_
Definition: TotemRPG4Hit.h:121
TotemRPG4Hit::vy
double vy() const
Definition: TotemRPG4Hit.cc:131
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
TotemRPG4Hit::theVy_
double theVy_
Definition: TotemRPG4Hit.h:134