QwGeant4
QweakSimTriggerScintillator_DetectorHit.hh
Go to the documentation of this file.
1 
2 // QweakSimTriggerScintillator_DetectorHit.hh
3 // Klaus Grimm
4 // 2005-12-27
5 
6 #ifndef QweakSimTriggerScintillator_DetectorHit_h
7 #define QweakSimTriggerScintillator_DetectorHit_h
8 
9 // user includes
10 #include "QweakSimHit.hh"
11 
12 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
14 {
15  public:
16 
18  QweakSimTriggerScintillator_DetectorHit(G4int detector_id);
23 
24  inline void *operator new(size_t);
25  inline void operator delete(void *aHit);
26 
27  inline float x();
28  inline float y();
29 
30  virtual void Draw();
31  virtual void Print();
32 
33 private:
34 
35  G4int DetectorID; // octant number
36  G4double time;
37 
38  G4int TrackID;
39 
40  G4ThreeVector localPos;
41  G4ThreeVector worldPos;
42 
43  G4ThreeVector localMomentum;
44  G4ThreeVector worldMomentum;
45 
46  G4String particleName;
47  G4int particleType;
48 
49  G4ThreeVector cellPos;
50  G4RotationMatrix cellRot;
51  const G4LogicalVolume* pLogV;
52 
53  G4ThreeVector originVertexPosition;
57 
58  G4ThreeVector currentMomentumDirection;
61 
62  G4double primaryQ2;
63  G4double crossSection;
65 
66  G4double depositedEnergy;
67 
68 public:
69 
70  inline void StoreDepositedEnergy(G4double dpeg) {depositedEnergy = dpeg;}
71  inline void AddDepositedEnergy(G4double dpeg) {depositedEnergy += dpeg;}
72  inline G4double GetHitDepositedEnergy() const {return depositedEnergy;}
73 
74  inline void StoreTrackID(G4int tid) { TrackID = tid; }
75  inline G4int GetTrackID() const { return TrackID; }
76 
77  inline void StoreGlobalTime(G4double t) { time = t; }
78  inline G4double GetGlobalTime() const { return time; }
79 
80  inline void StoreParticleName(G4String pn) {particleName = pn;}
81  inline G4String GetParticleName() const {return particleName;}
82 
83  void StoreParticleType(G4int pt) {particleType = pt;}
84  G4int GetParticleType() const {return particleType;}
85 
86  //------
87  inline void StoreLocalPosition(G4ThreeVector xyz) { localPos = xyz; }
88  inline G4ThreeVector GetLocalPosition() const { return localPos; }
89 
90  inline void StoreWorldPosition(G4ThreeVector xyz) { worldPos = xyz; }
91  inline G4ThreeVector GetWorldPosition() const { return worldPos; }
92  //------
93  inline void StoreLocalMomentum(G4ThreeVector lpxyz) { localMomentum = lpxyz; }
94  inline G4ThreeVector GetLocalMomentum() const { return localMomentum; }
95 
96  inline void StoreWorldMomentum(G4ThreeVector gpxyz) { worldMomentum = gpxyz; }
97  inline G4ThreeVector GetWorldMomentum() const { return worldMomentum; }
98  //------
99  inline void StoreCellPosition(G4ThreeVector xyz) { cellPos = xyz; }
100  inline G4ThreeVector GetCellPosition() const { return cellPos; }
101 
102  inline void StoreCellRotation(G4RotationMatrix rmat) { cellRot = rmat; }
103  inline G4RotationMatrix GetCellRotation() const { return cellRot; }
104 
105  inline void StoreLogVolume(G4LogicalVolume* val) { pLogV = val; }
106  inline const G4LogicalVolume* GetLogVolume() const { return pLogV; }
107  //------
108  inline void StoreOriginVertexPosition(G4ThreeVector oxyz) { originVertexPosition = oxyz; }
109  inline G4ThreeVector GetOriginVertexPosition() const { return originVertexPosition; }
110 
111  inline void StoreOriginVertexMomentumDirection(G4ThreeVector opxyz) { originVertexMomentumDirection = opxyz; }
112  inline G4ThreeVector GetOriginVertexMomentumDirection() const { return originVertexMomentumDirection; }
113 
114  inline void StoreOriginVertexKineticEnergy(G4double oekin) { originVertexKineticEnergy = oekin; }
115  inline G4double GetOriginVertexKineticEnergy() const { return originVertexKineticEnergy; }
116 
117  inline void StoreOriginVertexTotalEnergy(G4double oetot) { originVertexTotalEnergy = oetot; }
118  inline G4double GetOriginVertexTotalEnergy() const { return originVertexTotalEnergy; }
119 
120  //------
121 
122  inline void StoreMomentumDirection(G4ThreeVector pxyz) { currentMomentumDirection = pxyz; }
123  inline G4ThreeVector GetMomentumDirection() const { return currentMomentumDirection; }
124 
125  inline void StoreKineticEnergy(G4double ekin) { currentKineticEnergy = ekin; }
126  inline G4double GetKineticEnergy() const { return currentKineticEnergy; }
127 
128  inline void StoreTotalEnergy(G4double etot) { currentTotalEnergy = etot; }
129  inline G4double GetTotalEnergy() const { return currentTotalEnergy; }
130 
131  inline void StorePrimaryQ2(G4double q2) { primaryQ2 = q2; }
132  inline G4double GetPrimaryQ2() const { return primaryQ2; }
133 
134  inline void StoreCrossSection(G4double cs) {crossSection = cs;}
135  inline G4double GetCrossSection() const {return crossSection;}
136 
137  inline void StoreCrossSectionWeight(G4double csw) {crossSectionWeight = csw;}
138  inline G4double GetCrossSectionWeight() const {return crossSectionWeight;}
139 
140 
141 };
142 
143 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
144 
145 typedef G4THitsCollection<QweakSimTriggerScintillator_DetectorHit> QweakSimTriggerScintillator_DetectorHitsCollection;
146 
147 extern G4Allocator<QweakSimTriggerScintillator_DetectorHit> QweakSimTriggerScintillator_DetectorHitAllocator;
148 
149 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
150 inline void* QweakSimTriggerScintillator_DetectorHit::operator new(size_t)
151 {
152  void* aHit;
153  aHit = (void*) QweakSimTriggerScintillator_DetectorHitAllocator.MallocSingle();
154  return aHit;
155 }
156 
157 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
158 inline void QweakSimTriggerScintillator_DetectorHit::operator delete(void* aHit)
159 {
161 }
162 
163 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
164 
165 #endif
166 
167 //=======================================================================================
168 // -----------------------
169 // | CVS File Information |
170 // -----------------------
171 //
172 // $Revisions$
173 // $Log: QweakSimTriggerScintillator_DetectorHit.hh,v $
174 // Revision 1.2 2005/12/27 19:27:53 grimm
175 // - Redesign of Doxygen header containing CVS info like revision and date
176 // - Added CVS revision log at the end of file
177 //
178 //
int operator==(const QweakSimTriggerScintillator_DetectorHit &right) const
G4Allocator< QweakSimTriggerScintillator_DetectorHit > QweakSimTriggerScintillator_DetectorHitAllocator
G4THitsCollection< QweakSimTriggerScintillator_DetectorHit > QweakSimTriggerScintillator_DetectorHitsCollection
const QweakSimTriggerScintillator_DetectorHit & operator=(const QweakSimTriggerScintillator_DetectorHit &right)