QwGeant4
QweakSimLeadGlass_PMTHit.hh
Go to the documentation of this file.
1 
2 // QweakSimLeadGlass_PMTHit.hh
3 // Fang Guo
4 // 2012/07/31
5 
6 /////// --------------------------------------------------------------------
7 
8 #ifndef QweakSimLeadGlass_PMTHit_h
9 #define QweakSimLeadGlass_PMTHit_h
10 
11 //--- user includes
12 #include "QweakSimHit.hh"
13 
14 
15 
16 /////// --------------------------------------------------------------------
17 
18 class QweakSimLeadGlass_PMTHit : public G4VHit
19 {
20 
21 public:
22 
24  QweakSimLeadGlass_PMTHit(G4int detector_id);
25 
26  virtual ~QweakSimLeadGlass_PMTHit();
27 
30  int operator==(const QweakSimLeadGlass_PMTHit &right) const;
31 
32  inline void *operator new(size_t);
33  inline void operator delete(void *aHit);
34 
35  inline float x();
36  inline float y();
37 
38  //virtual void Draw();
39  //virtual void Print();
40 
41 private:
42 
43  G4int PMTID;
45 
46 public:
47 
48  inline void StorePMTID(G4int pmt_id) { PMTID = pmt_id; }
49  inline G4int GetPMTID() const { return PMTID; }
50 
51  inline void StorePhotonEnergy(G4double eng) { currentPhotonEnergy = eng; }
52  inline G4double GetPhotonEnergy() const { return currentPhotonEnergy; }
53 
54 };
55 
56 
57 
58 /////// --------------------------------------------------------------------
59 
60 typedef G4THitsCollection<QweakSimLeadGlass_PMTHit> QweakSimLeadGlass_PMTHitsCollection;
61 
62 extern G4Allocator<QweakSimLeadGlass_PMTHit> QweakSimLeadGlass_PMTHitAllocator;
63 
64 
65 
66 /////// --------------------------------------------------------------------
67 
68 inline void* QweakSimLeadGlass_PMTHit::operator new(size_t)
69 {
70  void* aHit;
71  aHit = (void*) QweakSimLeadGlass_PMTHitAllocator.MallocSingle();
72  return aHit;
73 }
74 
75 
76 
77 /////// --------------------------------------------------------------------
78 
79 inline void QweakSimLeadGlass_PMTHit::operator delete(void* aHit)
80 {
82 }
83 
84 
85 
86 /////// --------------------------------------------------------------------
87 
88 #endif
89 
90 /////// --------------------------------------------------------------------
int operator==(const QweakSimLeadGlass_PMTHit &right) const
G4THitsCollection< QweakSimLeadGlass_PMTHit > QweakSimLeadGlass_PMTHitsCollection
G4Allocator< QweakSimLeadGlass_PMTHit > QweakSimLeadGlass_PMTHitAllocator
const QweakSimLeadGlass_PMTHit & operator=(const QweakSimLeadGlass_PMTHit &right)
virtual ~QweakSimLeadGlass_PMTHit()