GEMC  1.8
Geant4 Monte-Carlo Framework
Public Member Functions | Data Fields
MSensitiveDetector Class Reference

#include <MSensitiveDetector.h>

+ Inheritance diagram for MSensitiveDetector:
+ Collaboration diagram for MSensitiveDetector:

Public Member Functions

 MSensitiveDetector (G4String, gemc_opts)
 Constructor. More...
 
virtual ~MSensitiveDetector ()
 
virtual void Initialize (G4HCofThisEvent *)
 Virtual Method called at the beginning of each hit event. More...
 
virtual G4bool ProcessHits (G4Step *, G4TouchableHistory *)
 Virtual Method called for each step of each hit. More...
 
virtual void EndOfEvent (G4HCofThisEvent *)
 Virtual Method called at the end of each hit event. More...
 
vector< identifierGetDetectorIdentifier (string name)
 returns detector identity More...
 
string GetDetectorHitType (string name)
 returns detector hitType More...
 
MHitCollectionGetMHitCollection ()
 returns hit collection More...
 
MHitfind_existing_hit (vector< identifier >)
 returns hit collection hit inside identifer More...
 

Data Fields

G4String HCname
 Sensitive Detector/Hit Collection Name. More...
 
map< string, detector > * Hall_Map
 detector map More...
 
map< string, MPHB_Factory > * MProcessHit_Map
 Hit Process Routine Factory Map. More...
 
set< vector< identifier > > Id_Set
 Identifier Set. Used to determine if a step is inside a new/existing element. More...
 
gemc_opts gemcOpt
 gemc option class More...
 
SDId SDID
 SDId used for identification. More...
 

Detailed Description

MSensitiveDetector

This is the gemc Sensitive Detector.
When a track enters a volume associated with this SD, the ProcessHits routine is called. ProcessHits builds the MHit and adds it in the MHitCollection.
At the end of event, each MHitCollection instantiate the MPHB_Factory relative to the Hit Process and calls its method ProcessHit.

Definition at line 60 of file MSensitiveDetector.h.

Constructor & Destructor Documentation

MSensitiveDetector::MSensitiveDetector ( G4String  name,
gemc_opts  opt 
)

Definition at line 16 of file MSensitiveDetector.cc.

MSensitiveDetector::~MSensitiveDetector ( )
virtual

Definition at line 33 of file MSensitiveDetector.cc.

Member Function Documentation

void MSensitiveDetector::EndOfEvent ( G4HCofThisEvent *  HCE)
virtual

Definition at line 233 of file MSensitiveDetector.cc.

MHit * MSensitiveDetector::find_existing_hit ( vector< identifier PID)
Parameters
PIDreturns hit collection hit inside identifer

Definition at line 263 of file MSensitiveDetector.cc.

string MSensitiveDetector::GetDetectorHitType ( string  name)
inline

Definition at line 95 of file MSensitiveDetector.h.

vector<identifier> MSensitiveDetector::GetDetectorIdentifier ( string  name)
inline

Definition at line 94 of file MSensitiveDetector.h.

MHitCollection* MSensitiveDetector::GetMHitCollection ( )
inline

Definition at line 96 of file MSensitiveDetector.h.

void MSensitiveDetector::Initialize ( G4HCofThisEvent *  HCE)
virtual

Definition at line 36 of file MSensitiveDetector.cc.

G4bool MSensitiveDetector::ProcessHits ( G4Step *  aStep,
G4TouchableHistory *   
)
virtual

< Hit informations The hit position is taken from PostStepPoint (inside the sensitive volume) Transformation to local coordinates has to be done with prestep

< Volume name

< Global Coordinates of interaction

< Local Coordinates of interaction

< Time of step

< Track Momentum (before entering the volume)

< Track Energy (before entering the volume)

< Track ID

< Track PID

< Track Charge

< Identifier at the geant4 level

< Check on the ProcessHitRoutine to calculate the new vector<identifier>

< Checking if it's new hit or existing hit. Use the overloaded "=="

Definition at line 47 of file MSensitiveDetector.cc.

Field Documentation

gemc_opts MSensitiveDetector::gemcOpt

Definition at line 75 of file MSensitiveDetector.h.

map<string, detector>* MSensitiveDetector::Hall_Map

Definition at line 71 of file MSensitiveDetector.h.

G4String MSensitiveDetector::HCname

Definition at line 70 of file MSensitiveDetector.h.

set<vector<identifier> > MSensitiveDetector::Id_Set

Definition at line 73 of file MSensitiveDetector.h.

map<string, MPHB_Factory>* MSensitiveDetector::MProcessHit_Map

Definition at line 72 of file MSensitiveDetector.h.

SDId MSensitiveDetector::SDID

Definition at line 76 of file MSensitiveDetector.h.