40#include "G4VPhysicalVolume.hh"
42#include "G4VTouchable.hh"
43#include "G4TouchableHistory.hh"
44#include "G4SDManager.hh"
52 fHitID(new G4int[500])
54 collectionName.insert(
"CalCollection");
69 (SensitiveDetectorName,collectionName[0]);
70 for (G4int j=0;j<1; j++) {
fHitID[j] = -1;};
77 G4double edep = step->GetTotalEnergyDeposit();
80 stepl = step->GetStepLength();
82 if ((edep == 0.) && (stepl == 0.) )
return false;
96 G4cout <<
" New Calorimeter Hit on F01: " << number << G4endl;
101 (*fCalCollection)[
fHitID[number]]->AddAbs(edep,stepl);
103 G4cout <<
" Energy added to F01: " << number << G4endl;
112 static G4int hcID = -1;
114 { hcID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]); }
Definition of the F01CalorHit class.
G4THitsCollection< F01CalorHit > F01CalorHitsCollection
Definition of the F01CalorimeterSD class.
Definition of the F01DetectorConstruction class.
F01CalorHitsCollection * fCalCollection
void Initialize(G4HCofThisEvent *) override
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override
~F01CalorimeterSD() override
F01CalorimeterSD(G4String, F01DetectorConstruction *)
void EndOfEvent(G4HCofThisEvent *) override
F01DetectorConstruction * fDetector
const G4VPhysicalVolume * GetAbsorber()