QwGeant4
QweakSimPMTOnly_PMTHit.hh
Go to the documentation of this file.
1 
2 // QweakSimPMTOnly_PMTHit.hh
3 // Martin McHugh
4 // 2013-08-01
5 
6 /////// --------------------------------------------------------------------
7 
8 #ifndef QweakSimPMTOnly_PMTHit_h
9 #define QweakSimPMTOnly_PMTHit_h
10 
11 //--- user includes
12 #include "QweakSimHit.hh"
13 
14 /////// --------------------------------------------------------------------
15 
16 class QweakSimPMTOnly_PMTHit : public G4VHit
17 {
18 
19  public:
20 
23 
24  virtual ~QweakSimPMTOnly_PMTHit();
25 
27  int operator==(const QweakSimPMTOnly_PMTHit &right) const;
28 
29  inline void *operator new(size_t);
30  inline void operator delete(void *aHit);
31 
32  private:
33 
34  G4int myHitID;
36 
37  public:
38 
39  inline void StoreHitID(G4int hitID) { myHitID = hitID; }
40  inline G4int GetHitID() const { return myHitID; }
41 
42  inline void StorePhotonEnergy(G4double eng) { currentPhotonEnergy = eng; }
43  inline G4double GetPhotonEnergy() const { return currentPhotonEnergy; }
44 
45 };
46 
47 /////// --------------------------------------------------------------------
48 
49 typedef G4THitsCollection<QweakSimPMTOnly_PMTHit> QweakSimPMTOnly_PMTHitsCollection;
50 
51 extern G4Allocator<QweakSimPMTOnly_PMTHit> QweakSimPMTOnly_PMTHitAllocator;
52 
53 /////// --------------------------------------------------------------------
54 
55 inline void* QweakSimPMTOnly_PMTHit::operator new(size_t)
56 {
57  void* aHit;
58  aHit = (void*) QweakSimPMTOnly_PMTHitAllocator.MallocSingle();
59  return aHit;
60 }
61 
62 /////// --------------------------------------------------------------------
63 
64 inline void QweakSimPMTOnly_PMTHit::operator delete(void* aHit)
65 {
67 }
68 
69 /////// --------------------------------------------------------------------
70 
71 #endif
72 
int operator==(const QweakSimPMTOnly_PMTHit &right) const
const QweakSimPMTOnly_PMTHit & operator=(const QweakSimPMTOnly_PMTHit &right)
void StorePhotonEnergy(G4double eng)
G4Allocator< QweakSimPMTOnly_PMTHit > QweakSimPMTOnly_PMTHitAllocator
G4double GetPhotonEnergy() const
G4THitsCollection< QweakSimPMTOnly_PMTHit > QweakSimPMTOnly_PMTHitsCollection