BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Simulation/BOOST/TruSim/include/TruSim/BesSensitiveDetector.hh
Go to the documentation of this file.
1//---------------------------------------------------------------------------//
2////// BOOST --- BESIII Object_Oriented Simulation Tool //
3//////---------------------------------------------------------------------------//
4////Author : Dengzy
5////Created: Aug, 2004
6////Modified:
7////Comment:
8////$Id:BesSensitiveDetector.hh
9
10// A pure virtual class that represents a generic Bes sensitive
11// Detector. Bes subsystems should inherit from this class when
12// implementing their hit scoring.
13//
14// Subsystems may optionally override the following methods:
15// BeginOfEvent
16// EndOfEvent
17// BeginOfTrack
18// EndOfTrack
19// The following utility methods are provided:
20// GetMonteCarloId
21//
22// Chronological sequence:
23//
24// For each event:
25// call BeginOfTruthEvent()
26// For each track:
27// call BeginOfTrack()
28// processHits()
29// call EndOfTrack()
30// call EndOfTruthEvent()
31//
32
33#ifndef BesSensitiveDetector_hh
34#define BesSensitiveDetector_hh
35
36#include "G4VSensitiveDetector.hh"
37
38class G4Event;
39class G4Step;
40class G4Track;
41class G4TouchableHistory;
43
44class BesSensitiveDetector : public G4VSensitiveDetector {
45public:
46 BesSensitiveDetector( const G4String name );
47 virtual ~BesSensitiveDetector() { ; }
48
49 //
50 // These methods are invoked at the beginning and end
51 // of each event. Subsystems may wish to override these
52 // methods to perform actions at these times.
53 //
54 // For example, at the end of an event, a subsystem
55 // may want to store their lists into the Event.
56 //
57 virtual void BeginOfTruthEvent( const G4Event* ) { ; }
58 virtual void EndOfTruthEvent( const G4Event* ) { ; }
59
60 //
61 // These methods are invoked at the beginning and end
62 // of each track. Subsystems may wish to override these
63 // methods to perform bookkeeping actions for each track.
64 //
65 // Since many tracks are created in an event, it is
66 // important that these methods, if overridden, be
67 // very, very quick on average.
68 //
69 virtual void BeginOfTrack( const G4Track* ) { ; }
70
71 virtual void EndOfTrack( const G4Track* ) { ; }
72
73protected:
74 void GetCurrentTrackIndex( G4int& trackIndex, G4int& g4TrackId ) const;
75};
76
77#endif
void GetCurrentTrackIndex(G4int &trackIndex, G4int &g4TrackId) const
BesSensitiveDetector(const G4String name)