9#include <beast/ph1sustr/simulation/SensitiveDetector.h>
10#include <beast/ph1sustr/dataobjects/Ph1sustrSimHit.h>
12#include <framework/datastore/StoreArray.h>
13#include <framework/datastore/RelationArray.h>
27 Simulation::SensitiveDetectorBase(
"Ph1sustrSensitiveDetector",
Const::invalidDetector)
49 const G4Track& track = *
step->GetTrack();
50 const int trackID = track.GetTrackID();
51 const double depEnergy =
step->GetTotalEnergyDeposit() * CLHEP::MeV;
55 if (depEnergy < CLHEP::eV)
return false;
73 relMCSimHit.
add(trackID, hitIndex, 1.0);
This class provides a set of constants for the framework.
Low-level class to create/modify relations between StoreArrays.
void add(index_type from, index_type to, weight_type weight=1.0)
Add a new element to the relation.
static void registerMCParticleRelation(const std::string &name, RelationArray::EConsolidationAction ignoreAction=RelationArray::c_negativeWeight)
Register an relation involving MCParticles.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
Accessor to arrays stored in the data store.
int getEntries() const
Get the number of objects in the array.
SensitiveDetector()
Constructor.
bool step(G4Step *step, G4TouchableHistory *) override
Step processing method.
Abstract base class for different kinds of events.