/home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/geo/include/RAT/GLG4PMTSD.hh Source File

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/geo/include/RAT/GLG4PMTSD.hh Source File
Ratpac-two
GLG4PMTSD.hh
1 // This file is part of the GenericLAND software library.
2 // $Id: GLG4PMTSD.hh,v 1.1 2005/08/30 19:55:22 volsung Exp $
3 //
4 // GLG4PMTSD.hh
5 //
6 // Records total number of hits and "waveform" on each PMT,
7 // with no PMT TTS or digitizer bandwidth effects included.
8 // (Convolve the hit waveform with the TTS+digitizer single-hit function
9 // to get the resulting digitized waveform.)
10 //
11 // Bypasses Geant4 hit collection mechanism.
12 //
13 // Author: Glenn Horton-Smith, 2000/01/28
14 //
15 
16 #ifndef GLG4PMTSD_h
17 #define GLG4PMTSD_h 1
18 
19 #include "G4VSensitiveDetector.hh"
20 
21 class G4Step;
22 class G4HCofThisEvent;
23 class G4TouchableHistory;
24 
25 class GLG4PMTSD : public G4VSensitiveDetector {
26  protected:
27  int max_pmts;
28  int pmt_no_offset;
29  int my_id_pmt_size;
30  // enum { max_waveform_ns= 200 };
31 
32  public:
33  G4int *hit_sum; /* indexed by pmt number */
34  // typedef G4int waveform_t[max_waveform_ns];
35  // waveform_t *hit_waveform; /* indexed by pmt number */
36 
37  G4int n_pmt_hits; /* # of hits, calculated at EndOfEvent */
38  G4int n_hit_pmts; /* # of PMTs hit, calculated at EndOfEvent */
39 
40  public:
41  // member functions
42  GLG4PMTSD(G4String name, int max_pmts = 1920, int pmt_no_offset = 0, int my_id_pmt_size = -1);
43  virtual ~GLG4PMTSD();
44 
45  virtual void Initialize(G4HCofThisEvent *HCE);
46  virtual void EndOfEvent(G4HCofThisEvent *HCE);
47  virtual void clear();
48  virtual void DrawAll();
49  virtual void PrintAll();
50 
51  void SimpleHit(G4int ipmt, G4double time, G4double kineticEnergy, const G4ThreeVector &position,
52  const G4ThreeVector &momentum, const G4ThreeVector &polarization, G4int iHitPhotonCount,
53  G4int trackID = -1, G4bool prepulse = false);
54 
55  protected:
56  virtual G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist);
57 };
58 
59 #endif
Definition: GLG4PMTSD.hh:25