/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Simulation/BOOST/TruSim/TruSim-00-00-17/TruSim/BesSensitiveDetector.hh

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------//
00009 
00010 // A pure virtual class that represents a generic Bes sensitive
00011 // Detector. Bes subsystems should inherit from this class when
00012 // implementing their hit scoring.
00013 //
00014 // Subsystems may optionally override the following methods:
00015 //         BeginOfEvent
00016 //         EndOfEvent
00017 //         BeginOfTrack
00018 //         EndOfTrack
00019 // The following utility methods are provided:
00020 //         GetMonteCarloId
00021 //
00022 // Chronological sequence:
00023 //
00024 //       For each event:
00025 //               call BeginOfTruthEvent()
00026 //               For each track:
00027 //                      call BeginOfTrack()
00028 //                      processHits()
00029 //                      call EndOfTrack()
00030 //               call EndOfTruthEvent()
00031 //
00032 
00033 #ifndef BesSensitiveDetector_hh
00034 #define BesSensitiveDetector_hh
00035 
00036 #include "G4VSensitiveDetector.hh"
00037 
00038 class G4Event;
00039 class G4Step;
00040 class G4Track;
00041 class G4TouchableHistory;
00042 class BesSensitiveManager;
00043 
00044 class BesSensitiveDetector : public G4VSensitiveDetector
00045 {
00046   public:
00047           
00048     BesSensitiveDetector( const G4String name);
00049     virtual ~BesSensitiveDetector() {;}
00050         
00051     //
00052     // These methods are invoked at the beginning and end
00053     // of each event. Subsystems may wish to override these
00054     // methods to perform actions at these times.
00055     //
00056     // For example, at the end of an event, a subsystem
00057     // may want to store their lists into the Event.
00058     //
00059     virtual void BeginOfTruthEvent(const G4Event*) {;}
00060     virtual void EndOfTruthEvent(const G4Event*) {;}
00061         
00062         
00063     //
00064     // These methods are invoked at the beginning and end
00065     // of each track. Subsystems may wish to override these
00066     // methods to perform bookkeeping actions for each track.
00067     //
00068     // Since many tracks are created in an event, it is
00069     // important that these methods, if overridden, be
00070     // very, very quick on average.
00071     //
00072     virtual void BeginOfTrack( const G4Track* ) {;}
00073 
00074     virtual void EndOfTrack( const G4Track* ) {;}
00075         
00076   protected:
00077 
00078     void GetCurrentTrackIndex(G4int &trackIndex, G4int &g4TrackId) const;
00079     
00080 };
00081 
00082 #endif

Generated on Tue Nov 29 23:14:33 2016 for BOSS_7.0.2 by  doxygen 1.4.7