LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
OpDetSensitiveDetector.h
Go to the documentation of this file.
1 //
6 // This is the sensitive detector class for the OpDet detectors. It is
7 // associated with the relevant detector volumes in DetectorConstruction.cxx
8 // and is called via the ProcessHits method every time a particle steps
9 // within the volume.
10 //
11 // The detector owns a hit collection which is passed back to LArG4 at
12 // the end of the event. One OpDetSensitiveDetector corresponds to a set
13 // of OpDet's, which are looked up by their G4PhysicalVolume in the OpDetLookup class.
14 //
15 // Photons stepping into the volume are stopped and killed and their trackID,
16 // 4 position and 4 momentum are stored in the relevant SimPhotons.
17 //
18 // Ben Jones, MIT, 06/04/2010
19 //
20 
21 
22 #include "Geant4/G4VSensitiveDetector.hh"
24 
25 
26 #ifndef OpDetSensitiveDetector_h
27 #define OpDetSensitiveDetector_h 1
28 
29 class G4HCofThisEvent;
30 class G4TOuchableHistory;
31 class G4Step;
32 
33 namespace sim{
34  class SimPhotonsCollection;
35 }
36 
37 namespace larg4 {
38 
39  class OpDetLookup;
40  class OpDetPhotonTable;
41 
42  class OpDetSensitiveDetector : public G4VSensitiveDetector
43  {
44 
45 
46  public:
49 
50 
51  // Beginning and end of event
52  virtual void Initialize(G4HCofThisEvent*);
53  virtual void EndOfEvent(G4HCofThisEvent*){}
54 
55  // Tidy up event in abort
56  virtual void clear(){}
57 
58  // Run per step in sensitive volume
59  virtual G4bool ProcessHits( G4Step*, G4TouchableHistory*);
60 
61 
62  // Required but empty
63  virtual void DrawAll(){}
64  virtual void PrintAll(){}
65 
66  private:
69 
70  //double fGlobalTimeOffset;
71  };
72 }
73 
74 #endif
void Initialize()
Definition: errprop.cc:101
Geant4 interface.
virtual void EndOfEvent(G4HCofThisEvent *)
Monte Carlo Simulation.
Tools and modules for checking out the basics of the Monte Carlo.