 |
Belle II Software
release-05-02-19
|
11 #ifndef SENSITIVEDETECTOR_H_
12 #define SENSITIVEDETECTOR_H_
14 #include <framework/datastore/RelationArray.h>
15 #include <mdst/dataobjects/MCParticle.h>
16 #include <simulation/kernel/UserInfo.h>
17 #include <G4VSensitiveDetector.hh>
29 namespace Simulation {
83 virtual bool step(G4Step*
step, G4TouchableHistory* ROhist) = 0;
89 virtual bool ProcessHits(G4Step* aStep, G4TouchableHistory* aROhist);
91 static std::map<std::string, RelationArray::EConsolidationAction>
s_mcRelations;
101 bool result =
step(aStep, aROhist);
Low-level class to create/modify relations between StoreArrays.
Const::EDetector m_subdetector
Subdetector the class belongs to.
@ c_negativeWeight
Flip the sign of the weight to become negative if the original element got re-attributed.
static Payload getInfo(Carrier &obj)
Static function to just return UserInformation attached to the obj of type Carrier.
virtual bool ProcessHits(G4Step *aStep, G4TouchableHistory *aROhist)
Check if recording hits is enabled and if so call step() and set the correct MCParticle flag.
static bool s_active
Static bool which indicates wether recording of hits is enabled.
const std::string & getName() const
Return name under which the object is saved in the DataStore.
EConsolidationAction
Modification actions for the consolidate member.
Base class for all Sensitive Detectors to create hits during simulation.
static std::map< std::string, RelationArray::EConsolidationAction > s_mcRelations
Static set holding all relations which have to be updated at the end of the Event.
static void registerMCParticleRelation(const std::string &name, RelationArray::EConsolidationAction ignoreAction=RelationArray::c_negativeWeight)
Register an relation involving MCParticles.
EDetector
Enum for identifying the detector components (detector and subdetector).
Abstract base class for different kinds of events.
SensitiveDetectorBase(const std::string &name, Const::EDetector subdetector)
Create a new Sensitive detecor with a given name and belonging to a given subdetector.
static void registerMCParticleRelation(const RelationArray &relation, RelationArray::EConsolidationAction ignoreAction=RelationArray::c_negativeWeight)
Overload to make it easer to register MCParticle relations.
static void setActive(bool activeStatus)
Enable/Disable all Sensitive Detectors.
virtual ~SensitiveDetectorBase()
virtual destructor for inheritance
static const std::map< std::string, RelationArray::EConsolidationAction > & getMCParticleRelations()
Return a list of all registered Relations with MCParticles.
virtual bool step(G4Step *step, G4TouchableHistory *ROhist)=0
Process a Geant4 step in any of the sensitive volumes attached to this sensitive detector.