81{
82
83
84
85
86
87 G4double edep = aStep->GetTotalEnergyDeposit();
88 if(edep==0.) return false;
89
90 const G4VTouchable* ROhist = aStep->GetPreStepPoint()->GetTouchable();
91 G4int copyIDinZ = ROhist->GetReplicaNumber();
92 G4int copyIDinPhi = ROhist->GetReplicaNumber(1);
93
94 if(
fCellID[copyIDinZ][copyIDinPhi]==-1)
95 {
97 (ROhist->GetVolume()->GetLogicalVolume(),copyIDinZ,copyIDinPhi);
100 aTrans.Invert();
101 calHit->
SetPos(aTrans.NetTranslation());
102 calHit->
SetRot(aTrans.NetRotation());
105 fCellID[copyIDinZ][copyIDinPhi] = icell - 1;
106 if(verboseLevel>0)
107 { G4cout << " New Calorimeter Hit on CellID "
108 << copyIDinZ << " " << copyIDinPhi << G4endl; }
109 }
110 else
111 {
112 (*fCalCollection)[
fCellID[copyIDinZ][copyIDinPhi]]->AddEdep(edep);
113 (*fCalCollection)[
fCellID[copyIDinZ][copyIDinPhi]]
114 ->SetTrackInformation(aStep->GetTrack());
115 if(verboseLevel>0)
116 { G4cout << " Energy added to CellID "
117 << copyIDinZ << " " << copyIDinPhi << G4endl; }
118 }
119
120 return true;
121}
void SetEdep(G4double de)
void SetPos(G4ThreeVector xyz)
void SetTrackInformation(const G4Track *aTrack)
void SetRot(G4RotationMatrix rmat)