8#ifndef SIMCORE_ECALSD_H_
9#define SIMCORE_ECALSD_H_
14#include "SimCore/SDs/SensitiveDetector.h"
53 virtual bool isSensDet(G4LogicalVolume* vol)
const override {
54 auto region = vol->GetRegion();
55 if (region and region->GetName().contains(
"CalorimeterRegion")) {
56 return vol->GetName().contains(
"Si");
66 G4bool
ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist)
override;
80 std::map<ldmx::EcalID, ldmx::SimCalorimeterHit>
hits_;
Class that defines an ECal detector ID with a cell number.
Class which stores simulated calorimeter hit information.
Implements an event buffer system for storing event data.
Class encapsulating parameters for configuring a processor.
Handle to the conditions system, provided at construction to classes which require it.
ECal sensitive detector that uses an EcalHexReadout to create the hits_.
static const std::string COLLECTION_NAME
Name of output collection of hits_.
std::map< ldmx::EcalID, ldmx::SimCalorimeterHit > hits_
map of hits to add to the event (will be squashed)
virtual void onFinishedEvent() override
Clear the map of hits we have accumulated.
virtual bool isSensDet(G4LogicalVolume *vol) const override
Should the input volume be consider apart of this sensitive detector?
EcalSD(const std::string &name, simcore::ConditionsInterface &ci, const framework::config::Parameters &p)
Class constructor.
virtual void saveHits(framework::Event &event) override
Add our hits to the event bus.
int max_origin_track_id_
maximum track ID to be considered an "origin"
bool enable_hit_contribs_
enable hit contribs
G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist) override
Process steps to create hits_.
bool compress_hit_contribs_
compress hit contribs
virtual ~EcalSD()=default
Class destructor.
Dynamically loaded Geant4 SensitiveDetector for saving hits in specific volumes within the simulation...
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...