32 #include "G4HCofThisEvent.hh"
45 fHitsCollection(nullptr),
91 if (
edep==0. && stepLength == 0. )
return false;
96 auto layerNumber = touchable->GetReplicaNumber(1);
99 auto hit = (*fHitsCollection)[layerNumber];
102 msg <<
"Cannot access hit " << layerNumber;
112 hit->Add(
edep, stepLength);
113 hitTotal->Add(
edep, stepLength);
126 <<
"-------->Hits Collection: in this event they are " <<
nofHits
127 <<
" hits in the tracker chambers: " <<
G4endl;
G4int GetCollectionID(G4String colName)
const G4VTouchable * GetTouchable() const
std::ostringstream G4ExceptionDescription
G4StepPoint * GetPreStepPoint() const
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
G4double GetPDGCharge() const
G4String SensitiveDetectorName
G4ParticleDefinition * GetDefinition() const
virtual ~B4cCalorimeterSD()
B4cCalorHitsCollection * fHitsCollection
void insert(G4String str)
G4double GetStepLength() const
Definition of the B4cCalorimeterSD class.
G4Track * GetTrack() const
G4double GetTotalEnergyDeposit() const
G4THitsCollection< B4cCalorHit > B4cCalorHitsCollection
B4cCalorimeterSD(const G4String &name, const G4String &hitsCollectionName, G4int nofCells)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
static G4SDManager * GetSDMpointer()
G4CollectionNameVector collectionName
virtual void EndOfEvent(G4HCofThisEvent *hitCollection)
G4GLOB_DLL std::ostream G4cout
virtual G4bool ProcessHits(G4Step *step, G4TouchableHistory *history)
virtual void Initialize(G4HCofThisEvent *hitCollection)