Geant4 VMC Version 6.6
|
Sensitive detector construction. More...
#include <TG4SDConstruction.h>
Public Member Functions | |
TG4SDConstruction () | |
virtual | ~TG4SDConstruction () |
virtual void | Construct () |
void | AddSelection (const G4String &selection) |
void | SetExclusiveSDScoring (G4bool value) |
void | SetSelectionFromTGeo (G4bool value) |
void | SetSensitiveVolumeLabel (const G4String &label) |
void | SetIsGflash (G4bool isGflash) |
Public Member Functions inherited from TG4Verbose | |
TG4Verbose (const G4String &cmdName) | |
TG4Verbose (const G4String &cmdName, G4int verboseLevel) | |
virtual | ~TG4Verbose () |
virtual void | VerboseLevel (G4int level) |
virtual G4int | VerboseLevel () const |
Static Public Member Functions | |
static const G4String & | GetDefaultSVLabel () |
Private Member Functions | |
void | CreateSD (G4LogicalVolume *lv, TVirtualMCSensitiveDetector *userSD) const |
void | FillSDSelectionFromTGeo () |
void | MapVolumesToInstanceIds () |
void | MapVolumesToSDIds () |
Private Attributes | |
TG4SDMessenger | fMessenger |
messenger | |
G4bool | fExclusiveSDScoring |
the flag to activate new scoring via user defined sensitive detectors | |
G4bool | fSelectionFromTGeo |
the flag to activate retrieving sensitive volumes from TGeo | |
G4String | fSVLabel |
the label used to flag sensitive volumes in TGeo | |
std::set< G4String > | fSelection |
the set of volumes names which are selected as sensitive | |
G4bool | fIsGflash |
the flag to acivate creating Gflash sensitive detectors | |
Static Private Attributes | |
static const G4String | fgkDefaultSVLabel = "SV" |
default value of the sensitive volumes label | |
Sensitive detector construction.
Class for construction of user sensitive detectors. Constructed sensitive detectors inherit from TG4VSensitiveDetector (see TG4VSensitiveDetector.h description); all cloned logical volumes (which a single G3 volume correspond to) share the same sensitive detector instance.
Definition at line 39 of file TG4SDConstruction.h.
TG4SDConstruction::TG4SDConstruction | ( | ) |
Default constructor
Definition at line 37 of file TG4SDConstruction.cxx.
|
virtual |
Destructor
Definition at line 50 of file TG4SDConstruction.cxx.
|
inlinestatic |
Get the default value of the sensitive volumes label (the string which is used to select sensitive volumes in TGeoGeometry)
Definition at line 89 of file TG4SDConstruction.h.
Referenced by TG4SDMessenger::TG4SDMessenger().
|
virtual |
Create sensitive detectors and initialize the VMC application. Sensitive detectors are set to all logical volumes
Definition at line 228 of file TG4SDConstruction.cxx.
Referenced by TG4SDManager::Initialize().
void TG4SDConstruction::AddSelection | ( | const G4String & | selection | ) |
Add the selection in the set of volume names which will be made sensitive.
Definition at line 315 of file TG4SDConstruction.cxx.
Referenced by TG4SDMessenger::SetNewValue().
|
inline |
Set option to activate new scoring via user defined sensitive detectors
Definition at line 96 of file TG4SDConstruction.h.
Referenced by TG4SDManager::SetExclusiveSDScoring(), and TG4SDMessenger::SetNewValue().
|
inline |
Set option to get the SD selection from TGeo
Definition at line 102 of file TG4SDConstruction.h.
Referenced by TG4SDMessenger::SetNewValue().
|
inline |
Set the sensitive volumes label (the string which is used to select sensitive volumes in TGeoGeometry)
Definition at line 108 of file TG4SDConstruction.h.
Referenced by TG4SDMessenger::SetNewValue().
|
inline |
Set the flag to acivate creating Gflash sensitive detectors
Definition at line 115 of file TG4SDConstruction.h.
Referenced by TG4SDMessenger::SetNewValue().
|
private |
Create/retrieve a sensitive detector for the given logical volume.
Definition at line 60 of file TG4SDConstruction.cxx.
Referenced by Construct().
|
private |
Retrieve the selection of sensitive volumes from TGeo. The volumes are marked as sensitive when there is set the TGeoVolume option to a given value (TG4SDConstruction::fgkDefaultSVLabel by default)
Definition at line 132 of file TG4SDConstruction.cxx.
Referenced by Construct().
|
private |
Define VMC volume Ids when new sensitive detectors framework is used. The volume Ids correspond to the Geant4 logical volume instance number.
A special care is needed whin combining the old way of geometry definition with the new sensitive detectors framework. Note that in this case, if geometry is defined via the VMC functions like gsposp, then the "same" volume in the context of Geant3, which is represented by more than one logical volumes in Geant4, will have several volume ids.
Definition at line 164 of file TG4SDConstruction.cxx.
Referenced by Construct().
|
private |
Define VMC volume Ids if new sensitive detectors framework is not used, The volume ID is defined via sensitive detector Id. The sensitive detector is associated with maximum one logical volume, that's why it can hold volume and medium Id.
Definition at line 191 of file TG4SDConstruction.cxx.
Referenced by Construct().
|
private |
messenger
Definition at line 66 of file TG4SDConstruction.h.
|
staticprivate |
default value of the sensitive volumes label
Definition at line 69 of file TG4SDConstruction.h.
Referenced by GetDefaultSVLabel().
|
private |
the flag to activate new scoring via user defined sensitive detectors
Definition at line 72 of file TG4SDConstruction.h.
Referenced by Construct(), CreateSD(), and SetExclusiveSDScoring().
|
private |
the flag to activate retrieving sensitive volumes from TGeo
Definition at line 75 of file TG4SDConstruction.h.
Referenced by Construct(), and SetSelectionFromTGeo().
|
private |
the label used to flag sensitive volumes in TGeo
Definition at line 78 of file TG4SDConstruction.h.
Referenced by FillSDSelectionFromTGeo(), and SetSensitiveVolumeLabel().
|
private |
the set of volumes names which are selected as sensitive
Definition at line 81 of file TG4SDConstruction.h.
Referenced by AddSelection(), Construct(), and FillSDSelectionFromTGeo().
|
private |
the flag to acivate creating Gflash sensitive detectors
Definition at line 84 of file TG4SDConstruction.h.
Referenced by CreateSD(), and SetIsGflash().