87 G4double edep = aStep->GetTotalEnergyDeposit();
88 if(edep==0.)
return false;
90 const G4VTouchable* ROhist = aStep->GetPreStepPoint()->GetTouchable();
91 G4int copyIDinZ = ROhist->GetReplicaNumber();
92 G4int copyIDinPhi = ROhist->GetReplicaNumber(1);
94 if(
fCellID[copyIDinZ][copyIDinPhi]==-1)
97 (ROhist->GetVolume()->GetLogicalVolume(),copyIDinZ,copyIDinPhi);
101 calHit->
SetPos(aTrans.NetTranslation());
102 calHit->
SetRot(aTrans.NetRotation());
105 fCellID[copyIDinZ][copyIDinPhi] = icell - 1;
107 { G4cout <<
" New Calorimeter Hit on CellID "
108 << copyIDinZ <<
" " << copyIDinPhi << G4endl; }
112 (*fCalCollection)[
fCellID[copyIDinZ][copyIDinPhi]]->AddEdep(edep);
113 (*fCalCollection)[
fCellID[copyIDinZ][copyIDinPhi]]
114 ->SetTrackInformation(aStep->GetTrack());
116 { G4cout <<
" Energy added to CellID "
117 << copyIDinZ <<
" " << copyIDinPhi << G4endl; }