QwGeant4
QweakSimCerenkov_DetectorHit.hh
Go to the documentation of this file.
1 /**
2  \class QweakSimCerenkov_DetectorHit
3 
4  \brief Handling of a hit in the Cerenkov detector
5 
6  */
7 
8 #ifndef QweakSimCerenkov_DetectorHit_h
9 #define QweakSimCerenkov_DetectorHit_h
10 
11 // user includes
12 #include "QweakSimHit.hh"
13 
14 class QweakSimCerenkov_DetectorHit : public G4VHit
15 {
16  public:
17 
19  QweakSimCerenkov_DetectorHit(G4int detector_id);
23  int operator==(const QweakSimCerenkov_DetectorHit &right) const;
24 
25  inline void *operator new(size_t);
26  inline void operator delete(void *aHit);
27 
28  inline float x();
29  inline float y();
30 
31  virtual void Draw();
32  virtual void Print();
33 
34 private:
35 
36  G4int DetectorID; // octant number
37  G4double time;
38 
39  G4int TrackID;
40  G4int ParentID;
42 
43  G4ThreeVector localPos;
44  G4ThreeVector worldPos;
45 
46  G4ThreeVector localMomentum;
47  G4ThreeVector worldMomentum;
48 
49  G4ThreeVector cellPos;
50  G4RotationMatrix cellRot;
51  const G4LogicalVolume* pLogV;
52 
53  G4ThreeVector originVertexPosition;
57 
58  G4ThreeVector currentMomentumDirection;
61  G4ThreeVector currentPolarization;
62 
63  G4double primaryQ2;
64  G4double crossSection;
66 
67  G4String particleName;
68  G4int particleType;
69 
70 public:
71 
72  inline void StoreTrackID(G4int tid) { TrackID = tid; }
73  inline G4int GetTrackID() const { return TrackID; }
74 
75  inline void StoreParentID(G4int tid) { ParentID = tid; }
76  inline G4int GetParentID() const { return ParentID; }
77 
78  inline void StoreCreatorProcessName(G4String name) { CreatorProcessName = name; }
79  inline G4String GetCreatorProcessName() const { return CreatorProcessName; }
80 
81  inline void StoreDetectorID(G4int detector_ID) { DetectorID = detector_ID; }
82  inline G4int GetDetectorID() const { return DetectorID; }
83 
84  inline void StoreGlobalTime(G4double t) { time = t; }
85  inline G4double GetGlobalTime() const { return time; }
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  //------
100  inline void StoreCellPosition(G4ThreeVector xyz) { cellPos = xyz; }
101  inline G4ThreeVector GetCellPosition() const { return cellPos; }
102 
103  inline void StoreCellRotation(G4RotationMatrix rmat) { cellRot = rmat; }
104  inline G4RotationMatrix GetCellRotation() const { return cellRot; }
105 
106  inline void StoreLogVolume(G4LogicalVolume* val) { pLogV = val; }
107  inline const G4LogicalVolume* GetLogVolume() const { return pLogV; }
108  //------
109  inline void StoreOriginVertexPosition(G4ThreeVector oxyz) { originVertexPosition = oxyz; }
110  inline G4ThreeVector GetOriginVertexPosition() const { return originVertexPosition; }
111 
112  inline void StoreOriginVertexMomentumDirection(G4ThreeVector opxyz) { originVertexMomentumDirection = opxyz; }
113  inline G4ThreeVector GetOriginVertexMomentumDirection() const { return originVertexMomentumDirection; }
114 
115  inline void StoreOriginVertexKineticEnergy(G4double oekin) { originVertexKineticEnergy = oekin; }
116  inline G4double GetOriginVertexKineticEnergy() const { return originVertexKineticEnergy; }
117 
118  inline void StoreOriginVertexTotalEnergy(G4double oetot) { originVertexTotalEnergy = oetot; }
119  inline G4double GetOriginVertexTotalEnergy() const { return originVertexTotalEnergy; }
120 
121  //------
122 
123  inline void StoreMomentumDirection(G4ThreeVector pxyz) { currentMomentumDirection = pxyz; }
124  inline G4ThreeVector GetMomentumDirection() const { return currentMomentumDirection; }
125 
126  inline void StoreKineticEnergy(G4double ekin) { currentKineticEnergy = ekin; }
127  inline G4double GetKineticEnergy() const { return currentKineticEnergy; }
128 
129  inline void StoreTotalEnergy(G4double etot) { currentTotalEnergy = etot; }
130  inline G4double GetTotalEnergy() const { return currentTotalEnergy; }
131 
132  //------
133 
134  inline void StorePolarization(G4ThreeVector p) { currentPolarization = p; }
135  inline G4ThreeVector GetPolarization() const { return currentPolarization; }
136 
137  //------
138 
139  inline void StorePrimaryQ2(G4double q2) { primaryQ2 = q2; }
140  inline G4double GetPrimaryQ2() const { return primaryQ2; }
141 
142  inline void StoreCrossSection(G4double cs) {crossSection = cs;}
143  inline G4double GetCrossSection() const {return crossSection;}
144 
145  inline void StoreCrossSectionWeight(G4double csw) {crossSectionWeight = csw;}
146  inline G4double GetCrossSectionWeight() const {return crossSectionWeight;}
147 
148  //------
149 
150  inline void StoreParticleName(G4String pn) {particleName = pn;}
151  inline G4String GetParticleName() const {return particleName;}
152 
153  inline void StoreParticleType(G4int pt) {particleType = pt;}
154  inline G4int GetParticleType() const {return particleType;}
155 
156 };
157 
158 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
159 
160 typedef G4THitsCollection<QweakSimCerenkov_DetectorHit> QweakSimCerenkovDetectorHitsCollection;
161 
162 extern G4Allocator<QweakSimCerenkov_DetectorHit> QweakSimCerenkovDetectorHitAllocator;
163 
164 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
165 inline void* QweakSimCerenkov_DetectorHit::operator new(size_t)
166 {
167  void* aHit;
168  aHit = (void*) QweakSimCerenkovDetectorHitAllocator.MallocSingle();
169  return aHit;
170 }
171 
172 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
173 inline void QweakSimCerenkov_DetectorHit::operator delete(void* aHit)
174 {
176 }
177 
178 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
179 
180 #endif
void StoreOriginVertexPosition(G4ThreeVector oxyz)
Handling of a hit in the Cerenkov detector.
const G4LogicalVolume * GetLogVolume() const
void StoreOriginVertexMomentumDirection(G4ThreeVector opxyz)
void StoreWorldMomentum(G4ThreeVector gpxyz)
G4ThreeVector GetOriginVertexMomentumDirection() const
G4Allocator< QweakSimCerenkov_DetectorHit > QweakSimCerenkovDetectorHitAllocator
int operator==(const QweakSimCerenkov_DetectorHit &right) const
void StoreMomentumDirection(G4ThreeVector pxyz)
const QweakSimCerenkov_DetectorHit & operator=(const QweakSimCerenkov_DetectorHit &right)
void StoreCellRotation(G4RotationMatrix rmat)
void StoreLogVolume(G4LogicalVolume *val)
void StoreLocalMomentum(G4ThreeVector lpxyz)
G4THitsCollection< QweakSimCerenkov_DetectorHit > QweakSimCerenkovDetectorHitsCollection