FDsimG4OpticalHit.hh
Go to the documentation of this file.
1 #ifndef FDsimG4OpticalHit_h
2 #define FDsimG4OpticalHit_h 1
3 
4 #include "G4VHit.hh"
5 #include "G4THitsCollection.hh"
6 #include "G4Allocator.hh"
7 #include "G4ThreeVector.hh"
8 
9 namespace TelescopeSimulatorLX {
10 
11  class FDsimG4OpticalHit : public G4VHit {
12 
13  public:
18  int operator==(const FDsimG4OpticalHit&) const;
19 
20  inline void* operator new(size_t);
21  inline void operator delete(void*);
22 
23  void Draw();
24  void Print();
25 
26  private:
27  G4double fPhotEne; // Photon energy energy
28  G4double fPhotWvl; // Photon wavelength (nm)
29  G4double fPhotTime; // Photon detection time
30  G4ThreeVector fPhotPos; // Position of the hit in local coordinates
31  G4ThreeVector fPhotWorldPos; // Position of the hit in world coordinates
32  G4ThreeVector fPhotDir; // Direction of the photon
33  G4ThreeVector fPixelPos; // Position of sensitive detector
34  G4int fHitID; // Code identifying particle that produced the hit;
35  G4int fPMTid; // Code identifying the hit PMT.
36  G4double fWeight;
37 
38  public:
39  inline void SetEnergy(G4double En) {fPhotEne = En;}
40  inline void SetWavelength(G4double Wv) {fPhotWvl = Wv;}
41  inline void SetTime(G4double Ti) {fPhotTime = Ti;}
42  inline void SetPosition(G4ThreeVector xyz) {fPhotPos = xyz;}
43  inline void SetWorldPosition(G4ThreeVector xyz) {fPhotWorldPos = xyz;}
44  inline void SetDirection(G4ThreeVector xyz) {fPhotDir = xyz;}
45  inline void SetPixelPosition(G4ThreeVector xyz) {fPixelPos = xyz;}
46  inline void SetHitID(G4int ID) {fHitID = ID;}
47  inline void SetPMTid(G4int ID) {fPMTid = ID;}
48  inline void SetWeight(G4double w) {fWeight = w;}
49 
50  inline G4double GetEnergy() const {return fPhotEne;}
51  inline G4double GetWavelength() const {return fPhotWvl;}
52  inline G4double GetTime() const {return fPhotTime;}
53  inline G4ThreeVector GetPosition() const {return fPhotPos;}
54  inline G4ThreeVector GetWorldPosition() const {return fPhotWorldPos;}
55  inline G4ThreeVector GetDirection() const {return fPhotDir;}
56  inline G4ThreeVector GetPixelPosition() const {return fPixelPos;}
57  inline G4int GetHitID() const {return fHitID;}
58  inline G4int GetPMTid() const {return fPMTid;}
59  inline G4double GetWeight() const {return fWeight;}
60  };
61 
62  typedef G4THitsCollection<FDsimG4OpticalHit> FDsimG4OpticalHitsCollection;
63 }
64 
65 extern G4Allocator<TelescopeSimulatorLX::FDsimG4OpticalHit> FDsimG4OpticalHitAllocator;
66 
67 namespace TelescopeSimulatorLX {
68 
69  inline void* FDsimG4OpticalHit::operator new(size_t)
70  {
71  void* aHit;
72  aHit = (void*) FDsimG4OpticalHitAllocator.MallocSingle();
73  return aHit;
74  }
75 
76  inline void FDsimG4OpticalHit::operator delete(void* aHit)
77  {
79  }
80 }
81 
82 #endif
G4THitsCollection< FDsimG4OpticalHit > FDsimG4OpticalHitsCollection
const FDsimG4OpticalHit & operator=(const FDsimG4OpticalHit &)
G4Allocator< FDsimG4OpticalHit > FDsimG4OpticalHitAllocator
int operator==(const FDsimG4OpticalHit &) const

, generated on Tue Sep 26 2023.