QwGeant4
QweakSimCerenkov_PMTHit.hh
Go to the documentation of this file.
1 #ifndef QweakSimCerenkov_PMTHit_h
2 #define QweakSimCerenkov_PMTHit_h
3 
4 // user includes
5 #include "QweakSimHit.hh"
6 
7 class QweakSimCerenkov_PMTHit : public G4VHit
8 {
9 public:
10 
12  virtual ~QweakSimCerenkov_PMTHit();
13 
15  QweakSimCerenkov_PMTHit(G4int pmt_id);
17  int operator==(const QweakSimCerenkov_PMTHit &right) const;
18 
19  inline void *operator new(size_t);
20  inline void operator delete(void *aHit);
21 
22  inline float x();
23  inline float y();
24 
25 private:
26 
27  G4int DetectorID; // octant number
28  G4int PMTID;
29  G4int hitID;
30  G4bool hitValid;
32  G4double currentHitTime;
33 
34  public:
35 
36  inline void StoreDetectorID(G4int detector_ID) { DetectorID = detector_ID; }
37  inline G4int GetDetectorID() const { return DetectorID; }
38 
39  inline void StorePMTID(G4int pmt_id) { PMTID = pmt_id; }
40  inline G4int GetPMTID() const { return PMTID; }
41 
42  inline void StoreHitID(G4int hit_id) { hitID = hit_id; }
43  inline G4int GetHitID() const { return hitID; }
44 
45  inline void SetHitValid(G4bool valid) { hitValid = valid; }
46  inline G4bool IsHitValid() const { return hitValid; }
47 
48  inline void StorePhotonEnergy(G4double eng) { currentPhotonEnergy = eng; }
49  inline G4double GetPhotonEnergy() const { return currentPhotonEnergy; }
50 
51  inline void StoreHitTime(G4double time) { currentHitTime = time; }
52  inline G4double GetHitTime() const { return currentHitTime; }
53 
54  };
55 
56 typedef G4THitsCollection<QweakSimCerenkov_PMTHit> QweakSimCerenkovDetector_PMTHitsCollection;
57 
58 extern G4Allocator<QweakSimCerenkov_PMTHit> QweakSimCerenkov_PMTHitAllocator;
59 
60 inline void* QweakSimCerenkov_PMTHit::operator new(size_t)
61 {
62  void* aHit;
63  aHit = (void*) QweakSimCerenkov_PMTHitAllocator.MallocSingle();
64  return aHit;
65 }
66 
67 inline void QweakSimCerenkov_PMTHit::operator delete(void* aHit)
68 {
70 }
71 
72 #endif
const QweakSimCerenkov_PMTHit & operator=(const QweakSimCerenkov_PMTHit &right)
G4THitsCollection< QweakSimCerenkov_PMTHit > QweakSimCerenkovDetector_PMTHitsCollection
void StorePhotonEnergy(G4double eng)
void StoreDetectorID(G4int detector_ID)
void StoreHitTime(G4double time)
G4Allocator< QweakSimCerenkov_PMTHit > QweakSimCerenkov_PMTHitAllocator
int operator==(const QweakSimCerenkov_PMTHit &right) const