BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
BesSensitiveDetector Class Reference

#include <BesSensitiveDetector.hh>

+ Inheritance diagram for BesSensitiveDetector:

Public Member Functions

 BesSensitiveDetector (const G4String name)
 
virtual ~BesSensitiveDetector ()
 
virtual void BeginOfTruthEvent (const G4Event *)
 
virtual void EndOfTruthEvent (const G4Event *)
 
virtual void BeginOfTrack (const G4Track *)
 
virtual void EndOfTrack (const G4Track *)
 

Protected Member Functions

void GetCurrentTrackIndex (G4int &trackIndex, G4int &g4TrackId) const
 

Detailed Description

Definition at line 44 of file BesSensitiveDetector.hh.

Constructor & Destructor Documentation

◆ BesSensitiveDetector()

BesSensitiveDetector::BesSensitiveDetector ( const G4String  name)

Definition at line 21 of file BesSensitiveDetector.cc.

22 : G4VSensitiveDetector(name)
23{
25 manager->AddSensitiveDetector(this);
26}
void AddSensitiveDetector(BesSensitiveDetector *detector)
static BesSensitiveManager * GetSensitiveManager()

◆ ~BesSensitiveDetector()

virtual BesSensitiveDetector::~BesSensitiveDetector ( )
inlinevirtual

Definition at line 49 of file BesSensitiveDetector.hh.

49{;}

Member Function Documentation

◆ BeginOfTrack()

virtual void BesSensitiveDetector::BeginOfTrack ( const G4Track *  )
inlinevirtual

Definition at line 72 of file BesSensitiveDetector.hh.

72{;}

◆ BeginOfTruthEvent()

virtual void BesSensitiveDetector::BeginOfTruthEvent ( const G4Event *  )
inlinevirtual

Reimplemented in BesEmcSD, BesMdcSD, BesMucSD, and BesTofSD.

Definition at line 59 of file BesSensitiveDetector.hh.

59{;}

◆ EndOfTrack()

virtual void BesSensitiveDetector::EndOfTrack ( const G4Track *  )
inlinevirtual

Definition at line 74 of file BesSensitiveDetector.hh.

74{;}

◆ EndOfTruthEvent()

virtual void BesSensitiveDetector::EndOfTruthEvent ( const G4Event *  )
inlinevirtual

Reimplemented in BesEmcSD, BesMdcSD, BesMucSD, and BesTofSD.

Definition at line 60 of file BesSensitiveDetector.hh.

60{;}

◆ GetCurrentTrackIndex()

void BesSensitiveDetector::GetCurrentTrackIndex ( G4int &  trackIndex,
G4int &  g4TrackId 
) const
protected

Definition at line 30 of file BesSensitiveDetector.cc.

31{
33 if(manager)
34 {
35 trackIndex = manager->GetCurrentTrackIndex();
36 std::vector<BesTruthTrack*>* trackList = manager->GetTrackList();
37 if(trackList)
38 {
39 G4int size = trackList->size();
40 if(size>0)
41 {
42 for(G4int i=0;i<size;i++)
43 {
44 if( (*trackList)[i]->GetIndex() == trackIndex )
45 {
46 g4TrackId = (*trackList)[i]->GetG4TrackId();
47 break;
48 }
49 }
50 }
51 }
52 }
53}
G4int GetCurrentTrackIndex() const
std::vector< BesTruthTrack * > * GetTrackList()

Referenced by BesEmcSD::ProcessHits(), BesMdcSD::ProcessHits(), BesMucSD::ProcessHits(), and BesTofSD::ProcessHits().


The documentation for this class was generated from the following files: