CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 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 Draw() override
Definition: TotemRPG4Hit.h:38
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)
G4ThreeVector theEntryPoint_
Definition: TotemRPG4Hit.h:129
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
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
G4ThreeVector theExitPoint_
Definition: TotemRPG4Hit.h:130
void setPz(double p)
~TotemRPG4Hit() override=default
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