1#ifndef SIMCORE_HCALSD_H
2#define SIMCORE_HCALSD_H
15#include "SimCore/SensitiveDetector.h"
16#include "SimCore/TrackMap.h"
49 bool isSensDet(G4LogicalVolume* volume)
const override {
50 auto region = volume->GetRegion();
51 if (region and region->GetName().contains(
"CalorimeterRegion")) {
52 const auto name{volume->GetName()};
53 return std::find_if(std::begin(gdmlIdentifiers_),
54 std::end(gdmlIdentifiers_),
55 [&name](
const auto& identifier) {
56 return name.contains(identifier);
57 }) != std::end(gdmlIdentifiers_);
70 const G4ThreeVector& localPosition,
81 G4TouchableHistory* ROhist)
override;
98 std::vector<std::string> gdmlIdentifiers_;
106 std::vector<ldmx::SimCalorimeterHit> hits_;
Class that defines an HCal sensitive detector.
Class which represents a maximally-packed index of up to four fields.
Class which stores simulated calorimeter hit information.
Class which implements the user tracking action.
Implements an event buffer system for storing event data.
Class encapsulating parameters for configuring a processor.
Implements detector ids for HCal subdetector.
Handle to the conditions system, provided at construction to classes which require it.
Class defining a sensitive detector of type HCal.
virtual void OnFinishedEvent() override
Cleanup SD and prepare a new-event state.
ldmx::HcalID decodeCopyNumber(const std::uint32_t copyNumber, const G4ThreeVector &localPosition, const G4Box *scint)
Decode copy number of scintillator bar.
bool isSensDet(G4LogicalVolume *volume) const override
Check if the input logical volume is a part of the hcal sensitive volumes.
static const std::string COLLECTION_NAME
name of collection to be added to event bus
virtual G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist) override
Create a hit out of the energy deposition deposited during a step.
virtual ~HcalSD()=default
Destructor.
virtual void saveHits(framework::Event &event) override
Add our hits to the event bus and then reset the container.
Dynamically loaded Geant4 SensitiveDetector for saving hits in specific volumes within the simulation...