74{
75 if ( !ROhist ) return false;
76 G4double edep = aStep-> GetTotalEnergyDeposit();
77 if ( verboseLevel > 1 )
78 G4cout << "Next step edep(MeV) = " << edep/MeV << G4endl;
79 if ( edep == 0. ) return false;
80
82
83
84 G4int copyIDinZ = ROhist-> GetReplicaNumber();
85 G4int copyIDinPhi = ROhist-> GetReplicaNumber(1);
86
87 if (
fCellID[copyIDinZ][copyIDinPhi] == -1 ) {
90 copyIDinZ, copyIDinPhi);
91 calHit-> SetEdep(edep);
93 aTrans.Invert();
94 calHit-> SetPos(aTrans.NetTranslation());
95 calHit-> SetRot(aTrans.NetRotation());
97 fCellID[copyIDinZ][copyIDinPhi] = icell - 1;
98 if(verboseLevel>0) {
99 G4cout << " New Calorimeter Hit on CellID "
100 << copyIDinZ << " " << copyIDinPhi << G4endl;
101 }
102 } else {
103 (*fCalCollection)[
fCellID[copyIDinZ][copyIDinPhi]]-> AddEdep(edep);
104 if ( verboseLevel > 0 ) {
105 G4cout << " Energy added to CellID "
106 << copyIDinZ << " " << copyIDinPhi << G4endl;
107 }
108 }
109
110 return true;
111}