QwGeant4
QweakSimLumi_DetectorHit.hh
Go to the documentation of this file.
1 /*
2 
3  \file QweakSimLumi_DetectorHit.hh
4  \author Wade Duvall
5 
6 */
7 
8 #ifndef QweakSimLumi_DetectorHit_h
9 #define QweakSimLumi_DetectorHit_h 1
10 
11 #include "QweakSimHit.hh"
12 
13 class QweakSimLumi_DetectorHit : public G4VHit {
14  public:
15 
17  QweakSimLumi_DetectorHit(G4int detector_id);
18 
19  virtual ~QweakSimLumi_DetectorHit();
20 
22 
24 
25  int operator==(const QweakSimLumi_DetectorHit &right) const;
26 
27  inline void *operator new(size_t);
28  inline void operator delete(void *aHit);
29 
30  inline float x();
31  inline float y();
32 
33  virtual void Draw();
34  virtual void Print();
35 
36  /*
37  * CLEAN UP, stolen from other files (Cerenkov/LeadGlass)
38  */
39 
40  //----------------- PrimaryEventNumber
41 
42  inline void StorePrimaryEventNumber(G4int pen) { primaryEventNumber = pen; }
43  inline G4int GetPrimaryEventNumber() const {return primaryEventNumber;}
44 
45  //----------------- TrackID
46 
47  inline void StoreTrackID(G4double tid) { trackID = tid; }
48  inline G4double GetTrackID() const {return trackID;}
49 
50  //----------------- PrarticleName & ParticleType
51 
52  inline void StoreParticleName(G4String pn) {particleName = pn;}
53  inline G4String GetParticleName() const {return particleName;}
54 
55  inline void StoreParticleType(G4int pt) {particleType = pt;}
56  inline G4int GetParticleType() const {return particleType;}
57 
58  //----------------- GlobalTimeOfHit
59 
60  inline void StoreGlobalTime(G4double t) { time = t; }
61  inline G4double GetGlobalTime() const {return time;}
62 
63  //----------------- HasBeenHit & EdgeEventFlag & NbOfHits
64 
65  inline void StoreHasBeenHit(G4int n) { hasBeenHit = n; }
66  inline G4int GetHasBeenHit() const {return hasBeenHit;}
67 
68  inline void StoreEdgeEventFlag(G4int flag) { edgeEventFlag = flag; }
69  inline G4int GetEdgeEventFlag() const {return edgeEventFlag;}
70 
71  inline void StoreNbOfHits(G4int nd) { nbOfHits = nd; }
72  inline G4int GetNbOfHits() const {return nbOfHits;}
73 
74  //----------------- Position
75 
76  //--- GlobalPosition
77  inline void StoreWorldPosition(G4ThreeVector xyz) { worldPos = xyz; }
78  inline G4ThreeVector GetWorldPosition() const {return worldPos;}
79 
80  //--- LocalPosition
81  inline void StoreLocalPosition(G4ThreeVector xyz) { localPos = xyz; }
82  inline G4ThreeVector GetLocalPosition() const {return localPos;}
83 
84  //--- LoclaExitPosition
85  inline void StoreLocalExitPosition(G4ThreeVector xyz) { localExitPos = xyz; }
86  inline G4ThreeVector GetLocalExitPosition() const {return localExitPos;}
87 
88  //--- OriginVertexPosition
89  inline void StoreOriginVertexPosition(G4ThreeVector oxyz) { originVertexPosition = oxyz; }
90  inline G4ThreeVector GetOriginVertexPosition() const {return originVertexPosition;}
91 
92  //----------------- Momentum
93 
94  //--- GlobalMomentum
95  inline void StoreWorldMomentum(G4ThreeVector gpxyz) { worldMomentum = gpxyz; }
96  inline G4ThreeVector GetWorldMomentum() const {return worldMomentum;}
97 
98  //--- LocalMomentum
99  inline void StoreLocalMomentum(G4ThreeVector lpxyz) { localMomentum = lpxyz; }
100  inline G4ThreeVector GetLocalMomentum() const {return localMomentum;}
101 
102  //--- LocalVertexMomentumDirection
103  inline void StoreMomentumDirection(G4ThreeVector pxyz) { currentMomentumDirection = pxyz; }
104  inline G4ThreeVector GetMomentumDirection() const {return currentMomentumDirection;}
105 
106  //--- OriginVertexMomentumDirection
107  inline void StoreOriginVertexMomentumDirection(G4ThreeVector opxyz) { originVertexMomentumDirection = opxyz; }
109 
110  //---------------- OriginVertexKineticEnergy & TotalEnergy
111 
112  inline void StoreOriginVertexKineticEnergy(G4double oekin) { originVertexKineticEnergy = oekin; }
113  inline G4double GetOriginVertexKineticEnergy() const {return originVertexKineticEnergy;}
114 
115  inline void StoreOriginVertexTotalEnergy(G4double oetot) { originVertexTotalEnergy = oetot; }
116  inline G4double GetOriginVertexTotalEnergy() const {return originVertexTotalEnergy;}
117 
118  //---------------- LocalVertexKineticEnergy & TotalEnergy
119 
120  inline void StoreKineticEnergy(G4double ekin) { currentKineticEnergy = ekin; }
121  inline G4double GetKineticEnergy() const {return currentKineticEnergy;}
122 
123  inline void StoreTotalEnergy(G4double etot) { currentTotalEnergy = etot; }
124  inline G4double GetTotalEnergy() const {return currentTotalEnergy;}
125 
126  //--------------- LeadGlass deposited energy
127 
128  inline void StoreHitDepositedEnergy(G4double dpeg) { depositedEnergyHit = dpeg; }
129  inline G4double GetHitDepositedEnergy() const {return depositedEnergyHit;}
130 
131 
132  //---
133  inline void StoreCellPosition(G4ThreeVector xyz) { cellPos = xyz; }
134  inline G4ThreeVector GetCellPosition() const {return cellPos;}
135 
136  inline void StoreCellRotation(G4RotationMatrix rmat) { cellRot = rmat; }
137  inline G4RotationMatrix GetCellRotation() const {return cellRot;}
138 
139  inline void StoreLogVolume(G4LogicalVolume* val) { pLogV = val; }
140  inline const G4LogicalVolume* GetLogVolume() const {return pLogV;}
141 
142  private:
143  G4int detectorID;
145  G4double trackID;
146 
147  G4String particleName;
149 
150  G4double time;
151 
152  G4int hasBeenHit;
154  G4int nbOfHits;
155 
156  G4ThreeVector worldPos;
157  G4ThreeVector localPos;
158  G4ThreeVector localExitPos;
159  G4ThreeVector originVertexPosition;
160 
161  G4ThreeVector worldMomentum;
162  G4ThreeVector localMomentum;
165 
168 
171 
173 
174  G4ThreeVector cellPos;
175  G4RotationMatrix cellRot;
176 
177  const G4LogicalVolume* pLogV;
178 };
179 
180 typedef G4THitsCollection<QweakSimLumi_DetectorHit> QweakSimLumi_DetectorHitsCollection;
181 
182 extern G4Allocator<QweakSimLumi_DetectorHit> QweakSimLumi_DetectorHitAllocator;
183 
184 inline void* QweakSimLumi_DetectorHit::operator new(size_t) {
185  void* aHit;
186  aHit = (void*) QweakSimLumi_DetectorHitAllocator.MallocSingle();
187  return aHit;
188 }
189 
190 inline void QweakSimLumi_DetectorHit::operator delete(void* aHit) {
192 }
193 
194 #endif
G4RotationMatrix GetCellRotation() const
void StoreLocalExitPosition(G4ThreeVector xyz)
const QweakSimLumi_DetectorHit & operator=(const QweakSimLumi_DetectorHit &right)
G4ThreeVector GetLocalMomentum() const
void StoreOriginVertexTotalEnergy(G4double oetot)
void StoreHitDepositedEnergy(G4double dpeg)
G4ThreeVector GetCellPosition() const
G4ThreeVector GetWorldPosition() const
G4Allocator< QweakSimLumi_DetectorHit > QweakSimLumi_DetectorHitAllocator
void StoreLocalPosition(G4ThreeVector xyz)
void StoreWorldPosition(G4ThreeVector xyz)
void StoreWorldMomentum(G4ThreeVector gpxyz)
G4ThreeVector GetLocalPosition() const
G4double GetOriginVertexKineticEnergy() const
void StoreCellPosition(G4ThreeVector xyz)
G4ThreeVector GetOriginVertexPosition() const
G4ThreeVector GetWorldMomentum() const
G4THitsCollection< QweakSimLumi_DetectorHit > QweakSimLumi_DetectorHitsCollection
G4ThreeVector GetMomentumDirection() const
void StoreCellRotation(G4RotationMatrix rmat)
void StoreLogVolume(G4LogicalVolume *val)
void StoreOriginVertexMomentumDirection(G4ThreeVector opxyz)
void StoreMomentumDirection(G4ThreeVector pxyz)
void StoreLocalMomentum(G4ThreeVector lpxyz)
G4double GetOriginVertexTotalEnergy() const
G4ThreeVector GetOriginVertexMomentumDirection() const
const G4LogicalVolume * GetLogVolume() const
G4ThreeVector GetLocalExitPosition() const
int operator==(const QweakSimLumi_DetectorHit &right) const
void StoreKineticEnergy(G4double ekin)
void StoreOriginVertexKineticEnergy(G4double oekin)
void StoreOriginVertexPosition(G4ThreeVector oxyz)