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