16#include "G4EventManager.hh"
21 const std::string& CaloCellContainerName)
22 : G4VSensitiveDetector(name)
35 G4Exception(
"CaloCellContainerSD",
"UndefinedProcessHitsCall", FatalException,
"CaloCellContainerSD: Call to undefined ProcessHits.");
49 G4Exception(
"CaloCellContainerSD",
"MissingCaloCellContainer", FatalException,
"CaloCellContainerSD: Failed to retrieve the event-owned CaloCellContainer.");
54 for(
const auto& icell : simState.
cells()) {
63 auto* eventManager = G4EventManager::GetEventManager();
75 auto* builder = hitCollections
78 return builder ? builder->container.get() :
nullptr;
This class is attached to G4Event objects as UserInformation.
std::shared_ptr< HitCollectionMap > GetHitCollectionMap() const
Get the HitCollectionMap object with shared ownership.
Event-owned holder for the FastCaloSim CaloCellContainer.
void Initialize(G4HCofThisEvent *) override final
CaloCellContainer * m_caloCellContainer
std::string m_caloCellContainerName
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override final
CaloCellContainer * getCaloCellContainer() const
void recordCells(TFCSSimulationState &)
CaloCellContainerSD(const std::string &name, const std::string &CaloCellContainerName)
Container class for CaloCell.
Data object for each calorimeter readout cell.
void addEnergy(float energy)
add energy