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
void setEntry(G4ThreeVector xyz)
Definition: TotemRPG4Hit.cc:76
int operator==(const TotemRPG4Hit &)
Definition: TotemRPG4Hit.h:36
G4ThreeVector localExit() const
Definition: TotemRPG4Hit.cc:83
G4ThreeVector entry_
Definition: TotemRPG4Hit.h:109
double x() const
G4ThreeVector localEntry() const
Definition: TotemRPG4Hit.cc:81
int unitID() const
Definition: TotemRPG4Hit.cc:92
void setTof(double e)
double theTimeSlice_
Definition: TotemRPG4Hit.h:117
void Draw() override
Definition: TotemRPG4Hit.h:38
void Print() override
Definition: TotemRPG4Hit.cc:73
G4ThreeVector exit() const
Definition: TotemRPG4Hit.cc:78
void setP(double e)
void setIncidentEnergy(double e)
Definition: TotemRPG4Hit.cc:87
double vy() const
int timeSliceID() const
Definition: TotemRPG4Hit.cc:97
double z() const
double theEnergyLoss_
Definition: TotemRPG4Hit.h:124
void setY(double t)
double thePabs_
Definition: TotemRPG4Hit.h:122
void setVx(double p)
G4ThreeVector entry() const
Definition: TotemRPG4Hit.cc:75
std::ostream & operator<<(std::ostream &, const TotemRPG4Hit &)
double energyLoss() const
double pz() const
G4ThreeVector local_exit_
Definition: TotemRPG4Hit.h:112
void setPy(double p)
int particleType() const
double thetaAtEntry() const
double phiAtEntry() const
double theIncidentEnergy_
Definition: TotemRPG4Hit.h:113
void setLocalEntry(const G4ThreeVector &theLocalEntryPoint)
Definition: TotemRPG4Hit.cc:82
void addEnergyLoss(double e)
double vx() const
G4ThreeVector theEntryPoint_
Definition: TotemRPG4Hit.h:129
double theTof_
Definition: TotemRPG4Hit.h:123
void setExit(G4ThreeVector xyz)
Definition: TotemRPG4Hit.cc:79
const TotemRPG4Hit & operator=(const TotemRPG4Hit &right)
Definition: TotemRPG4Hit.cc:49
G4ThreeVector exit_
Definition: TotemRPG4Hit.h:110
double tof() const
double f[11][100]
double theThetaAtEntry_
Definition: TotemRPG4Hit.h:127
int parentId() const
void setLocalExit(const G4ThreeVector &theLocalExitPoint)
Definition: TotemRPG4Hit.cc:84
void setX(double t)
void setThetaAtEntry(double t)
double timeSlice() const
Definition: TotemRPG4Hit.cc:95
d
Definition: ztail.py:151
void setUnitID(unsigned int i)
Definition: TotemRPG4Hit.cc:93
uint32_t theUnitID_
Definition: TotemRPG4Hit.h:116
double px() const
void setPhiAtEntry(double f)
G4ThreeVector local_entry_
Definition: TotemRPG4Hit.h:111
double p() const
Definition: TotemRPG4Hit.cc:99
void setVz(double p)
double vz() const
void setParentId(int p)
void setTrackID(int i)
Definition: TotemRPG4Hit.cc:90
G4ThreeVector theExitPoint_
Definition: TotemRPG4Hit.h:130
double y() const
double incidentEnergy() const
Definition: TotemRPG4Hit.cc:86
void setPz(double p)
~TotemRPG4Hit() override=default
void setParticleType(short i)
double py() const
void setZ(double t)
int theParticleType_
Definition: TotemRPG4Hit.h:125
void setEnergyLoss(double e)
double thePhiAtEntry_
Definition: TotemRPG4Hit.h:128
void setVy(double p)
void setPx(double p)
unsigned int trackID() const
Definition: TotemRPG4Hit.cc:89
void setTimeSlice(double d)
Definition: TotemRPG4Hit.cc:96