BesSensitiveDetector Class Reference

#include <BesSensitiveDetector.hh>

Inheritance diagram for BesSensitiveDetector:

BesEmcSD BesMdcSD BesMucSD BesTofSD List of all members.

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 ( const G4String  name  ) 

Definition at line 21 of file BesSensitiveDetector.cc.

References BesSensitiveManager::AddSensitiveDetector(), and BesSensitiveManager::GetSensitiveManager().

00022         : G4VSensitiveDetector(name)
00023 {
00024         BesSensitiveManager* manager = BesSensitiveManager::GetSensitiveManager();
00025   manager->AddSensitiveDetector(this);
00026 }

virtual BesSensitiveDetector::~BesSensitiveDetector (  )  [inline, virtual]

Definition at line 49 of file BesSensitiveDetector.hh.

00049 {;}


Member Function Documentation

virtual void BesSensitiveDetector::BeginOfTrack ( const G4Track *   )  [inline, virtual]

Definition at line 72 of file BesSensitiveDetector.hh.

00072 {;}

virtual void BesSensitiveDetector::BeginOfTruthEvent ( const G4Event *   )  [inline, virtual]

Reimplemented in BesEmcSD, BesMdcSD, BesMucSD, and BesTofSD.

Definition at line 59 of file BesSensitiveDetector.hh.

00059 {;}

virtual void BesSensitiveDetector::EndOfTrack ( const G4Track *   )  [inline, virtual]

Definition at line 74 of file BesSensitiveDetector.hh.

00074 {;}

virtual void BesSensitiveDetector::EndOfTruthEvent ( const G4Event *   )  [inline, virtual]

Reimplemented in BesEmcSD, BesMdcSD, BesMucSD, and BesTofSD.

Definition at line 60 of file BesSensitiveDetector.hh.

00060 {;}

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

Definition at line 30 of file BesSensitiveDetector.cc.

References BesSensitiveManager::GetCurrentTrackIndex(), BesSensitiveManager::GetSensitiveManager(), BesSensitiveManager::GetTrackList(), genRecEmupikp::i, and delete_small_size::size.

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

00031 {
00032   BesSensitiveManager* manager = BesSensitiveManager::GetSensitiveManager();
00033   if(manager)
00034   {
00035     trackIndex = manager->GetCurrentTrackIndex();
00036     std::vector<BesTruthTrack*>* trackList = manager->GetTrackList();
00037     if(trackList)
00038     {
00039       G4int size = trackList->size();
00040       if(size>0)
00041       {
00042         for(G4int i=0;i<size;i++)
00043         {
00044           if( (*trackList)[i]->GetIndex() == trackIndex )
00045           {
00046             g4TrackId = (*trackList)[i]->GetG4TrackId();
00047             break;
00048           }
00049         }
00050       } 
00051     }
00052   }
00053 }


Generated on Tue Nov 29 23:17:35 2016 for BOSS_7.0.2 by  doxygen 1.4.7