 |
DD4hep
1.34.0
Detector Description Toolkit for High Energy Physics
|
Go to the documentation of this file.
23 #include <G4VSensitiveDetector.hh>
69 G4LogicalVolume* vol = track->GetVolume()->GetLogicalVolume();
78 using PropertyMask = dd4hep::detail::ReferenceBitMask<int>;
82 auto nam = sens_det->
name();
84 if( it->first == nam || it->first ==
"*" ) {
85 print(
"+++ Detector: name: %s Masking track %d with mask: %08X",
86 nam.c_str(), curr_track->id, it->second);
95 if( it->first == nam || it->first ==
"*" ) {
96 print(
"+++ Detector: type: %s Masking track %d with mask: %08X",
97 nam.c_str(), curr_track->id, it->second);
bool m_needsControl
Default property: Flag to create control instance.
Geant4ParticleMaskAction(Geant4Context *ctxt, const std::string &nam)
Standard constructor.
virtual const std::string & sensitiveType() const
Access to the sensitive type of the detector.
#define DECLARE_GEANT4ACTION(name)
Plugin defintion to create Geant4Action objects.
void mark_track(const G4Track *track, Particle *curr_track) override final
User overload to handle particle settings when processing the track in the Geant4ParticleHandler.
std::map< std::string, int32_t > m_nameMasks
Map of Subdetector names to trigger setting of the mask : Bit mask to be set to particle.
Geant4ParticleHandler user extension action called by the particle handler.
Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference.
Geant4Action & declareProperty(const std::string &nam, T &val)
Declare property.
const std::string & name() const
Access name of the action.
Interface class to access properties of the underlying Geant4 sensitive detector structure.
void print(const char *fmt,...) const
Support for messages with variable output level using output level.
Namespace for the Geant4 based simulation part of the AIDA detector description toolkit.
The sequencer to host Geant4 sensitive actions called if particles interact with sensitive elements.
std::map< std::string, int32_t > m_typeMasks
Map of Subdetector types to trigger setting of the mask : Bit mask to be set to particle.
Namespace for the AIDA detector description toolkit.
Data structure to store the MC particle information.
dd4hep::detail::ReferenceBitMask< int > PropertyMask
Geant4ParticleHandler user extension action to modify the particle reason mask.
Generic context to extend user, run and event information.
virtual Geant4SensDetActionSequence * sequence() const =0
Access the DDG4 action sequence.