9#ifndef VXD_SENSITIVEDETECTORBASE_H
10#define VXD_SENSITIVEDETECTORBASE_H
16#include <simulation/kernel/SensitiveDetectorBase.h>
17#include <vxd/simulation/SensorTraversal.h>
18#include <vxd/geometry/SensorInfoBase.h>
60 void setOptions(
bool seeNeutrons,
bool onlyPrimaryTrueHits,
float distanceTolerance,
61 float electronTolerance,
float minimumElectrons)
111 std::vector<std::pair<unsigned int, float>> simHitIndices) = 0;
144 bool step(G4Step*
step, G4TouchableHistory*)
override;
This class provides a set of constants for the framework.
Class to keep track of the traversal of the sensitive volume for one track.
std::pair< iterator, iterator > range
Iterator pair for a set of points.
Base class for all Sensitive Detectors to create hits during simulation.
Base class for Sensitive Detector implementation of PXD and SVD.
void setOptions(bool seeNeutrons, bool onlyPrimaryTrueHits, float distanceTolerance, float electronTolerance, float minimumElectrons)
Set all common options.
float m_minimumElectrons
minimum number of electrons a track must deposit for SimHit/TrueHits to be created
SensitiveDetectorBase(SensorInfoBase *info)
Constructor.
StepInformation findMidPoint(const SensorTraversal &traversal)
Find the mid-point of the track traversal.
virtual ~SensitiveDetectorBase() override
Destructor freeing the sensor Info.
bool finishTrack()
Process a track once all steps are known.
SensorInfoBase * m_info
Pointer to the SensorInfo associated with this instance.
float m_distanceTolerance
maximum distance between step point and linear interpolation of sensor traversal before a new simhit ...
virtual int saveSimHit(const SensorTraversal &traversal, const SensorTraversal::range &points)=0
Save a SimHit for this track including the given points.
bool m_onlyPrimaryTrueHits
only create TrueHits for primary particles
std::stack< SensorTraversal > m_tracks
stack of SensorTraversal information for all tracks not finished so far
std::vector< std::pair< unsigned int, float > > createSimHits()
Determine which SimHits to create.
virtual void saveRelations(const SensorTraversal &traversal, int trueHitIndex, std::vector< std::pair< unsigned int, float > > simHitIndices)=0
Save the relations between MCParticle, TrueHit and SimHits.
SensorInfoBase * getSensorInfo()
Return a pointer to the SensorInfo associated with this instance.
float m_electronTolerance
maximum relative difference between electron density of two steps where they can be considered simila...
VxdID getSensorID() const
Return the VxdID belonging to this sensitive detector.
virtual int saveTrueHit(const SensorTraversal &traversal)=0
Save the actual TrueHit for this sensor traversal.
bool m_seeNeutrons
also create SimHit/TrueHit objects for neutrons (or charged particles which deposit less than m_minim...
std::vector< unsigned int > simplifyEnergyDeposit(const SensorTraversal::range &points)
Simplify the energy deposition profile using Douglas-Peuker-Algorithm We normally force a Geant4 step...
bool step(G4Step *step, G4TouchableHistory *) override
Process a single Geant4 Step.
Base class to provide Sensor Information for PXD and SVD.
VxdID getID() const
Return the ID of the Sensor.
Class to uniquely identify a any structure of the PXD and SVD.
int getID(const std::vector< double > &breaks, double t)
get id of the time point t
Abstract base class for different kinds of events.