Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4SensitiveDetector Class Reference

Sensitive detector class for calling a user defined stepping function. More...

#include <TG4SensitiveDetector.h>

Inheritance diagram for TG4SensitiveDetector:

Public Member Functions

 TG4SensitiveDetector (G4String sdName, G4int mediumID)
 
 TG4SensitiveDetector (TVirtualMCSensitiveDetector *userSD, G4int mediumID, G4bool exclusiveSD)
 
virtual ~TG4SensitiveDetector ()
 
virtual G4bool ProcessHits (G4Step *step, G4TouchableHistory *history)
 
virtual G4bool ProcessHitsOnBoundary (G4Step *step)
 
virtual void ProcessHitsOnTrackStart ()
 
G4int GetID () const
 
G4int GetMediumID () const
 
TVirtualMCSensitiveDetector * GetUserSD () const
 

Static Public Member Functions

static G4int GetTotalNofSensitiveDetectors ()
 

Protected Member Functions

void UserProcessHits ()
 

Protected Attributes

TG4StepManagerfStepManager
 Cached pointer to thread-local step manager.
 
TVirtualMCApplication * fMCApplication
 Cached pointer to thread-local VMC application.
 
TVirtualMCSensitiveDetector * fUserSD
 User sensitive detector.
 

Private Member Functions

 TG4SensitiveDetector ()
 Not implemented.
 
 TG4SensitiveDetector (const TG4SensitiveDetector &right)
 Not implemented.
 
TG4SensitiveDetectoroperator= (const TG4SensitiveDetector &right)
 Not implemented.
 

Private Attributes

G4int fID
 sensitive detector ID
 
G4int fMediumID
 
std::map< G4LogicalVolume *, G4int > fLVToVolIdMap
 map logical volume -> volume id
 

Static Private Attributes

static G4ThreadLocal G4int fgSDCounter = 0
 sensitive detector counter
 

Detailed Description

Sensitive detector class for calling a user defined stepping function.

This class adds the integer identifier data member to G4VSensitiveDetector and keeps the medium ID of the associated volume. It also takes care of setting the step status (kBoundary, kNormalStep) and passing G4Step to TG4StepManager and for calling a user defined stepping function either via a user MC application stepping function or a user defined VMC sensitive detector (new).

Author
I. Hrivnacova; IPN, Orsay

Definition at line 39 of file TG4SensitiveDetector.h.

Constructor & Destructor Documentation

◆ TG4SensitiveDetector() [1/4]

TG4SensitiveDetector::TG4SensitiveDetector ( G4String sdName,
G4int mediumID )

Standard constructor with the specified name

Definition at line 24 of file TG4SensitiveDetector.cxx.

◆ TG4SensitiveDetector() [2/4]

TG4SensitiveDetector::TG4SensitiveDetector ( TVirtualMCSensitiveDetector * userSD,
G4int mediumID,
G4bool exclusiveSD )

Standard constructor with the specified name

Definition at line 36 of file TG4SensitiveDetector.cxx.

◆ ~TG4SensitiveDetector()

TG4SensitiveDetector::~TG4SensitiveDetector ( )
virtual

Destructor

Definition at line 53 of file TG4SensitiveDetector.cxx.

◆ TG4SensitiveDetector() [3/4]

TG4SensitiveDetector::TG4SensitiveDetector ( )
private

Not implemented.

◆ TG4SensitiveDetector() [4/4]

TG4SensitiveDetector::TG4SensitiveDetector ( const TG4SensitiveDetector & right)
private

Not implemented.

Member Function Documentation

◆ ProcessHits()

G4bool TG4SensitiveDetector::ProcessHits ( G4Step * step,
G4TouchableHistory * history )
virtual

Call user defined sensitive detector.

Reimplemented in TG4GflashSensitiveDetector.

Definition at line 81 of file TG4SensitiveDetector.cxx.

◆ ProcessHitsOnBoundary()

G4bool TG4SensitiveDetector::ProcessHitsOnBoundary ( G4Step * step)
virtual

Call user defined sensitive detector when crossing a geometrical boundary.

Definition at line 93 of file TG4SensitiveDetector.cxx.

Referenced by TG4SteppingAction::ProcessTrackOnBoundary().

◆ ProcessHitsOnTrackStart()

void TG4SensitiveDetector::ProcessHitsOnTrackStart ( )
virtual

Call VMC application stepping function.

Definition at line 106 of file TG4SensitiveDetector.cxx.

Referenced by TG4TrackingAction::UserProcessHits().

◆ GetTotalNofSensitiveDetectors()

G4int TG4SensitiveDetector::GetTotalNofSensitiveDetectors ( )
inlinestatic

Returns the total number of sensitive detectors.

Definition at line 92 of file TG4SensitiveDetector.h.

Referenced by TG4SDConstruction::MapVolumesToSDIds(), and TG4SDServices::NofSensitiveDetectors().

◆ GetID()

G4int TG4SensitiveDetector::GetID ( ) const
inline

Returns sensitive detector ID.

Definition at line 98 of file TG4SensitiveDetector.h.

Referenced by TG4SDConstruction::CreateSD(), TG4SDServices::GetVolumeID(), and TG4SDConstruction::MapVolumesToSDIds().

◆ GetMediumID()

G4int TG4SensitiveDetector::GetMediumID ( ) const
inline

Returns medium ID

Definition at line 104 of file TG4SensitiveDetector.h.

Referenced by TG4SDConstruction::CreateSD(), and TG4SDServices::GetMediumID().

◆ GetUserSD()

TVirtualMCSensitiveDetector * TG4SensitiveDetector::GetUserSD ( ) const
inline

Returns user SD

Definition at line 110 of file TG4SensitiveDetector.h.

Referenced by TG4SDServices::PrintUserSensitiveDetectors().

◆ UserProcessHits()

void TG4SensitiveDetector::UserProcessHits ( )
protected

Call user SD and/or VMC application stepping function.

Definition at line 63 of file TG4SensitiveDetector.cxx.

Referenced by ProcessHits(), ProcessHitsOnBoundary(), and ProcessHitsOnTrackStart().

◆ operator=()

TG4SensitiveDetector & TG4SensitiveDetector::operator= ( const TG4SensitiveDetector & right)
private

Not implemented.

Member Data Documentation

◆ fStepManager

TG4StepManager* TG4SensitiveDetector::fStepManager
protected

Cached pointer to thread-local step manager.

Definition at line 66 of file TG4SensitiveDetector.h.

Referenced by TG4GflashSensitiveDetector::ProcessHits(), ProcessHits(), and ProcessHitsOnBoundary().

◆ fMCApplication

TVirtualMCApplication* TG4SensitiveDetector::fMCApplication
protected

Cached pointer to thread-local VMC application.

Definition at line 68 of file TG4SensitiveDetector.h.

Referenced by TG4GflashSensitiveDetector::ProcessHits(), and UserProcessHits().

◆ fUserSD

TVirtualMCSensitiveDetector* TG4SensitiveDetector::fUserSD
protected

User sensitive detector.

Definition at line 70 of file TG4SensitiveDetector.h.

Referenced by GetUserSD(), and UserProcessHits().

◆ fgSDCounter

G4ThreadLocal G4int TG4SensitiveDetector::fgSDCounter = 0
staticprivate

sensitive detector counter

Definition at line 81 of file TG4SensitiveDetector.h.

Referenced by GetTotalNofSensitiveDetectors().

◆ fID

G4int TG4SensitiveDetector::fID
private

sensitive detector ID

Definition at line 84 of file TG4SensitiveDetector.h.

Referenced by GetID().

◆ fMediumID

G4int TG4SensitiveDetector::fMediumID
private

medium ID

Definition at line 85 of file TG4SensitiveDetector.h.

Referenced by GetMediumID().

◆ fLVToVolIdMap

std::map<G4LogicalVolume*, G4int> TG4SensitiveDetector::fLVToVolIdMap
private

map logical volume -> volume id

Definition at line 87 of file TG4SensitiveDetector.h.


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