CMS 3D CMS Logo

BscG4Hit.h
Go to the documentation of this file.
1 // File: BscG4Hit.h
3 // Date: 02.2006
4 //
5 // Package: Bsc
6 // Class : BscG4Hit
7 //
9 #ifndef BscG4Hit_h
10 #define BscG4Hit_h
11 
12 #include "G4VHit.hh"
13 #include "G4ThreeVector.hh"
14 #include <cstdint>
15 #include <iostream>
16 
17 class BscG4Hit : public G4VHit {
18 
19 public:
20 
21  BscG4Hit();
22  ~BscG4Hit() override;
23  BscG4Hit(const BscG4Hit &right);
24  const BscG4Hit& operator=(const BscG4Hit &right);
25  int operator==(const BscG4Hit &){return 0;}
26 
27  void Draw() override{}
28  void Print() override;
29 
30 public:
31 
32  const G4ThreeVector& getEntry() const { return entry; };
33  void setEntry(const G4ThreeVector& xyz);
34 
35  const G4ThreeVector& getEntryLocalP() const { return entrylp; };
36  void setEntryLocalP(const G4ThreeVector& xyz) { entrylp = xyz; };
37 
38  const G4ThreeVector& getExitLocalP() const { return exitlp; };
39  void setExitLocalP(const G4ThreeVector& xyz) { exitlp = xyz; };
40 
41  float getEM() const { return elem; };
42  void setEM (float e) { elem = e; theEnergyLoss = elem + hadr; };
43 
44  float getHadr() const { return hadr; };
45  void setHadr (float e) { hadr = e; theEnergyLoss = elem + hadr; };
46 
47  float getIncidentEnergy() const { return theIncidentEnergy; };
48  void setIncidentEnergy (float e) { theIncidentEnergy = e; };
49 
50  int getTrackID() const { return theTrackID; };
51  void setTrackID (int id) { theTrackID = id; };
52 
53  uint32_t getUnitID() const { return theUnitID; };
54  void setUnitID (uint32_t id) { theUnitID = id; };
55 
56  double getTimeSlice() const { return theTimeSlice; };
57  void setTimeSlice(double d) { theTimeSlice = d; };
58  int getTimeSliceID() const { return (int)theTimeSlice; };
59  void addEnergyDeposit(float em, float hd);
60  void addEnergyDeposit(const BscG4Hit& aHit);
61 
62  float getEnergyDeposit() const { return theEnergyLoss; };
63 
64  float getPabs() const { return thePabs; };
65  float getTof() const { return theTof; };
66  float getEnergyLoss() const { return theEnergyLoss; };
67  int getParticleType() const { return theParticleType; };
68 
69  void setPabs(float e) { thePabs = e; };
70  void setTof(float e) { theTof = e; };
71  void setEnergyLoss(float e) { theEnergyLoss = e; };
72  void setParticleType(int i) { theParticleType = i; };
73 
74  float getThetaAtEntry() const { return theThetaAtEntry; };
75  float getPhiAtEntry() const { return thePhiAtEntry; };
76 
77  void setThetaAtEntry(float t) { theThetaAtEntry = t; };
78  void setPhiAtEntry(float f) { thePhiAtEntry = f; };
79 
80  float getX() const { return theX; };
81  void setX(float t) { theX = t; };
82  float getY() const { return theY; };
83  float getZ() const { return theZ; };
84  void setY(float t) { theY = t; };
85  void setZ(float t) { theZ = t; };
86 
87  void setHitPosition(const G4ThreeVector&);
88  void setVertexPosition(const G4ThreeVector&);
89 
90  int getParentId() const { return theParentId; };
91  int getProcessId() const { return theProcessId; };
92  float getVx() const { return theVx; };
93  float getVy() const { return theVy; };
94  float getVz() const { return theVz; };
95 
96  void setParentId(int p) { theParentId = p; };
97  void setProcessId(int p) { theProcessId = p; };
98  void setVx(float p) { theVx = p; };
99  void setVy(float p) { theVy = p; };
100  void setVz(float p) { theVz = p; };
101 
102 private:
103 
104  G4ThreeVector entry; //Entry point
105  G4ThreeVector entrylp; //Entry local point
106  G4ThreeVector exitlp; //Exit local point
107  float elem; //EnergyDeposit of EM particles
108  float hadr; //EnergyDeposit of HD particles
109  float theIncidentEnergy; //Energy of the primary particle
110  int theTrackID; //Geant4 track ID
111  double theTimeSlice; //Time Slice Identification
112 
113  int theUnitID; // Unit Number
114 
115  float theX;
116  float theY;
117  float theZ;
118  float thePabs;
119  float theTof;
122 
125 
128  float theVx;
129  float theVy;
130  float theVz;
131 };
132 
133 std::ostream& operator<<(std::ostream&, const BscG4Hit&);
134 
135 #endif
136 
float getVy() const
Definition: BscG4Hit.h:93
void setTof(float e)
Definition: BscG4Hit.h:70
void setEntryLocalP(const G4ThreeVector &xyz)
Definition: BscG4Hit.h:36
float theVx
Definition: BscG4Hit.h:128
void setHitPosition(const G4ThreeVector &)
Definition: BSCG4Hit.cc:118
void setEntry(const G4ThreeVector &xyz)
Definition: BSCG4Hit.cc:97
float getPhiAtEntry() const
Definition: BscG4Hit.h:75
float theVy
Definition: BscG4Hit.h:129
void setVx(float p)
Definition: BscG4Hit.h:98
int getParticleType() const
Definition: BscG4Hit.h:67
float getVz() const
Definition: BscG4Hit.h:94
float theX
Definition: BscG4Hit.h:115
void setIncidentEnergy(float e)
Definition: BscG4Hit.h:48
float theVz
Definition: BscG4Hit.h:130
G4ThreeVector entry
Definition: BscG4Hit.h:100
int getProcessId() const
Definition: BscG4Hit.h:91
void setEM(float e)
Definition: BscG4Hit.h:42
void setTrackID(int id)
Definition: BscG4Hit.h:51
void setEnergyLoss(float e)
Definition: BscG4Hit.h:71
void setParentId(int p)
Definition: BscG4Hit.h:96
float getIncidentEnergy() const
Definition: BscG4Hit.h:47
int theUnitID
Definition: BscG4Hit.h:113
void Print() override
Definition: BSCG4Hit.cc:108
float getTof() const
Definition: BscG4Hit.h:65
float getPabs() const
Definition: BscG4Hit.h:64
BscG4Hit()
Definition: BSCG4Hit.cc:9
void setVy(float p)
Definition: BscG4Hit.h:99
void setY(float t)
Definition: BscG4Hit.h:84
int theProcessId
Definition: BscG4Hit.h:127
float getY() const
Definition: BscG4Hit.h:82
void setParticleType(int i)
Definition: BscG4Hit.h:72
int getTrackID() const
Definition: BscG4Hit.h:50
float theEnergyLoss
Definition: BscG4Hit.h:120
float elem
Definition: BscG4Hit.h:107
float theTof
Definition: BscG4Hit.h:119
int getTimeSliceID() const
Definition: BscG4Hit.h:58
int theTrackID
Definition: BscG4Hit.h:110
int theParticleType
Definition: BscG4Hit.h:121
void setThetaAtEntry(float t)
Definition: BscG4Hit.h:77
void setX(float t)
Definition: BscG4Hit.h:81
void setPabs(float e)
Definition: BscG4Hit.h:69
std::ostream & operator<<(std::ostream &, const BscG4Hit &)
Definition: BSCG4Hit.cc:126
const BscG4Hit & operator=(const BscG4Hit &right)
Definition: BSCG4Hit.cc:66
void setUnitID(uint32_t id)
Definition: BscG4Hit.h:54
float hadr
Definition: BscG4Hit.h:108
float thePabs
Definition: BscG4Hit.h:118
void setPhiAtEntry(float f)
Definition: BscG4Hit.h:78
const G4ThreeVector & getExitLocalP() const
Definition: BscG4Hit.h:38
const G4ThreeVector & getEntry() const
Definition: BscG4Hit.h:32
double f[11][100]
float getHadr() const
Definition: BscG4Hit.h:44
float theIncidentEnergy
Definition: BscG4Hit.h:109
float getEM() const
Definition: BscG4Hit.h:41
float getThetaAtEntry() const
Definition: BscG4Hit.h:74
int operator==(const BscG4Hit &)
Definition: BscG4Hit.h:25
void setTimeSlice(double d)
Definition: BscG4Hit.h:57
void addEnergyDeposit(float em, float hd)
Definition: BSCG4Hit.cc:112
float getEnergyDeposit() const
Definition: BscG4Hit.h:62
void setVz(float p)
Definition: BscG4Hit.h:100
float theZ
Definition: BscG4Hit.h:117
void setExitLocalP(const G4ThreeVector &xyz)
Definition: BscG4Hit.h:39
~BscG4Hit() override
Definition: BSCG4Hit.cc:35
G4ThreeVector exitlp
Definition: BscG4Hit.h:106
void setVertexPosition(const G4ThreeVector &)
Definition: BSCG4Hit.cc:122
int theParentId
Definition: BscG4Hit.h:126
float theThetaAtEntry
Definition: BscG4Hit.h:123
float thePhiAtEntry
Definition: BscG4Hit.h:124
double theTimeSlice
Definition: BscG4Hit.h:111
const G4ThreeVector & getEntryLocalP() const
Definition: BscG4Hit.h:35
float getVx() const
Definition: BscG4Hit.h:92
void setZ(float t)
Definition: BscG4Hit.h:85
G4ThreeVector entrylp
Definition: BscG4Hit.h:105
int getParentId() const
Definition: BscG4Hit.h:90
float getZ() const
Definition: BscG4Hit.h:83
uint32_t getUnitID() const
Definition: BscG4Hit.h:53
float getX() const
Definition: BscG4Hit.h:80
void Draw() override
Definition: BscG4Hit.h:27
void setHadr(float e)
Definition: BscG4Hit.h:45
void setProcessId(int p)
Definition: BscG4Hit.h:97
double getTimeSlice() const
Definition: BscG4Hit.h:56
float getEnergyLoss() const
Definition: BscG4Hit.h:66
float theY
Definition: BscG4Hit.h:116