AuxDetReadout.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file AuxDetReadout.h
3 /// \brief A Geant4 sensitive detector that accumulates information.
4 /// \author miceli@fnal.gov
5 ////////////////////////////////////////////////////////////////////////
6 
7 #ifndef LARG4_AUXDETREADOUT_H
8 #define LARG4_AUXDETREADOUT_H
9 
10 #include "Geant4/G4Types.hh"
11 #include "Geant4/G4VSensitiveDetector.hh"
12 
14 
17 
18 #include <vector>
19 
20 // Forward declarations
21 class G4HCofThisEvent;
22 class G4TouchableHistory;
23 class G4Step;
24 
25 namespace larg4 {
26 
27  class AuxDetReadout : public G4VSensitiveDetector
28  {
29  public:
30  // Constructor.
32  unsigned int adNum,
33  unsigned int svNum);
34 
35  // Destructor
36  virtual ~AuxDetReadout();
37 
38  // Required for classes that inherit from G4VSensitiveDetector.
39  //
40  // Called at start and end of each event.
41  virtual void Initialize(G4HCofThisEvent*);
42  virtual void EndOfEvent(G4HCofThisEvent*);
43 
44  // Called to clear any accumulated information.
45  virtual void clear();
46 
47  // The key method of this class. It's called by Geant4 for each
48  // step within the read-out geometry. It accumulates the energy
49  // in the G4Step in the ?.
50  virtual G4bool ProcessHits( G4Step*, G4TouchableHistory* );
51 
52  // Moved here from AuxDetSimChannel
53  virtual void AddParticleStep(int inputTrackID,
54  float inputEnergyDeposited,
55  float inputEntryX,
56  float inputEntryY,
57  float inputEntryZ,
58  float inputEntryT,
59  float inputExitX,
60  float inputExitY,
61  float inputExitZ,
62  float inputExitT,
63  float inputExitMomentumX,
64  float inputExitMomentumY,
65  float inputExitMomentumZ);
66 
67  // Empty methods; they have to be defined, but they're rarely
68  // used in Geant4 applications.
69  virtual void DrawAll();
70  virtual void PrintAll();
71 
72  // Independent method; returns the accumulated information
74 
75  private:
76  art::ServiceHandle<geo::Geometry const> fGeoHandle; ///< Handle to the Geometry service
77  uint32_t fAuxDet; ///< which AuxDet this AuxDetReadout corresponds to
78  uint32_t fAuxDetSensitive; ///< which sensitive volume of the AuxDet this AuxDetReadout corresponds to
79  sim::AuxDetSimChannel fAuxDetSimChannel; ///< Contains the sim::AuxDetSimChannel for this AuxDet
80  std::vector<sim::AuxDetIDE> fAuxDetIDEs; ///< list of IDEs in one channel
81 };
82 }
83 
84 #endif // LARG4_AUXDETREADOUT_H
static QCString name
Definition: declinfo.cpp:673
AuxDetReadout(std::string const &name, unsigned int adNum, unsigned int svNum)
virtual G4bool ProcessHits(G4Step *, G4TouchableHistory *)
virtual void PrintAll()
std::string string
Definition: nybbler.cc:12
Geant4 interface.
virtual void EndOfEvent(G4HCofThisEvent *)
art framework interface to geometry description
Collection of particles crossing one auxiliary detector cell.
uint32_t fAuxDet
which AuxDet this AuxDetReadout corresponds to
Definition: AuxDetReadout.h:77
virtual void DrawAll()
virtual void clear()
art::ServiceHandle< geo::Geometry const > fGeoHandle
Handle to the Geometry service.
Definition: AuxDetReadout.h:73
virtual void AddParticleStep(int inputTrackID, float inputEnergyDeposited, float inputEntryX, float inputEntryY, float inputEntryZ, float inputEntryT, float inputExitX, float inputExitY, float inputExitZ, float inputExitT, float inputExitMomentumX, float inputExitMomentumY, float inputExitMomentumZ)
sim::AuxDetSimChannel fAuxDetSimChannel
Contains the sim::AuxDetSimChannel for this AuxDet.
Definition: AuxDetReadout.h:79
std::vector< sim::AuxDetIDE > fAuxDetIDEs
list of IDEs in one channel
Definition: AuxDetReadout.h:80
virtual void Initialize(G4HCofThisEvent *)
sim::AuxDetSimChannel const GetAuxDetSimChannel() const
Definition: AuxDetReadout.h:73
uint32_t fAuxDetSensitive
which sensitive volume of the AuxDet this AuxDetReadout corresponds to
Definition: AuxDetReadout.h:78