41 #include "ExN04CalorimeterSD.hh"
42 #include "ExN04CalorimeterHit.hh"
75 if ( !ROhist )
return false;
79 if ( edep == 0. )
return false;
84 G4int copyIDinZ = ROhist-> GetReplicaNumber();
85 G4int copyIDinPhi = ROhist-> GetReplicaNumber(1);
87 if (
fCellID[copyIDinZ][copyIDinPhi] == -1 ) {
90 copyIDinZ, copyIDinPhi);
91 calHit-> SetEdep(edep);
97 fCellID[copyIDinZ][copyIDinPhi] = icell - 1;
99 G4cout <<
" New Calorimeter Hit on CellID "
100 << copyIDinZ <<
" " << copyIDinPhi <<
G4endl;
103 (*fCalCollection)[
fCellID[copyIDinZ][copyIDinPhi]]-> AddEdep(edep);
105 G4cout <<
" Energy added to CellID "
106 << copyIDinZ <<
" " << copyIDinPhi <<
G4endl;
116 static G4int HCID = -1;
virtual G4int GetCollectionID(G4int i)
virtual G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist)
G4LogicalVolume * GetLogicalVolume() const
static constexpr double MeV
const int fnumberOfCellsInPhi
G4String SensitiveDetectorName
ExN04CalorimeterHitsCollection * fCalCollection
virtual void EndOfEvent(G4HCofThisEvent *HCE)
G4THitsCollection< ExN04CalorimeterHit > ExN04CalorimeterHitsCollection
ExN04CalorimeterSD(G4String name)
const G4NavigationHistory * GetHistory() const
void insert(G4String str)
const G4AffineTransform & GetTopTransform() const
G4CollectionNameVector collectionName
G4GLOB_DLL std::ostream G4cout
virtual void Initialize(G4HCofThisEvent *HCE)
const int fnumberOfCellsInZ