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