BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
Simulation/BOOST/TruSim/TruSim-00-00-17/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
45{
46 public:
47
48 BesSensitiveDetector( const G4String name);
50
51 //
52 // These methods are invoked at the beginning and end
53 // of each event. Subsystems may wish to override these
54 // methods to perform actions at these times.
55 //
56 // For example, at the end of an event, a subsystem
57 // may want to store their lists into the Event.
58 //
59 virtual void BeginOfTruthEvent(const G4Event*) {;}
60 virtual void EndOfTruthEvent(const G4Event*) {;}
61
62
63 //
64 // These methods are invoked at the beginning and end
65 // of each track. Subsystems may wish to override these
66 // methods to perform bookkeeping actions for each track.
67 //
68 // Since many tracks are created in an event, it is
69 // important that these methods, if overridden, be
70 // very, very quick on average.
71 //
72 virtual void BeginOfTrack( const G4Track* ) {;}
73
74 virtual void EndOfTrack( const G4Track* ) {;}
75
76 protected:
77
78 void GetCurrentTrackIndex(G4int &trackIndex, G4int &g4TrackId) const;
79
80};
81
82#endif
void GetCurrentTrackIndex(G4int &trackIndex, G4int &g4TrackId) const
BesSensitiveDetector(const G4String name)