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 F02: " << number << G4endl;
101 (*fCalCollection)[
fHitID[number]]->AddAbs(edep,stepl);
103 G4cout <<
" Energy added to F02: " << number << G4endl;
113 static G4int hcID = -1;
115 { hcID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]); }
Definition of the F02CalorHit class.
G4THitsCollection< F02CalorHit > F02CalorHitsCollection
Definition of the F02CalorimeterSD class.
Definition of the F02DetectorConstruction class.
F02CalorHitsCollection * fCalCollection
F02CalorimeterSD(G4String, F02DetectorConstruction *)
F02DetectorConstruction * fDetector
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override
void EndOfEvent(G4HCofThisEvent *) override
~F02CalorimeterSD() override
void Initialize(G4HCofThisEvent *) override
const G4VPhysicalVolume * GetAbsorber()