105{
106
108 {
109
110 G4cout << G4endl;
111 G4cout << "Tracks in tracking region have been processed. -- Stage 0 over."
112 << G4endl;
113 G4cout << G4endl;
114 }
115 else
116 {
117
118
119
120
121
122
125 if(CHC)
126 {
127 int n_hit = CHC->entries();
128 G4double totE = 0;
129 G4int n_hitByATrack = 0;
130 for(int i=0;i<n_hit;i++)
131 {
132 G4double edepByATrack = (*CHC)[i]->GetEdepByATrack();
133 if(edepByATrack>0.)
134 {
135 totE += edepByATrack;
136 if(n_hitByATrack==0)
137 { (*CHC)[i]->GetTrackInformation()->Print(); }
138 n_hitByATrack++;
139 G4cout << "Cell[" << (*CHC)[i]->GetZ() << ","
140 << (*CHC)[i]->GetPhi() << "] "
141 << edepByATrack/GeV << " [GeV]" << G4endl;
142 (*CHC)[i]->ClearEdepByATrack();
143 }
144 }
145 if(n_hitByATrack>0)
146 {
147 G4cout <<
148 "### Total energy deposition in calorimeter by a source track in "
149 << n_hitByATrack << " cells : " << totE / GeV << " (GeV)"
150 << G4endl;
151 G4cout << G4endl;
152 }
153 }
154 }
155
156 if(stackManager->GetNUrgentTrack())
157 {
158
159
160
161 stackManager->TransferStackedTracks(fUrgent,fWaiting);
162
163
164 stackManager->TransferOneStackedTrack(fWaiting,fUrgent);
165
167 }
168}
G4THitsCollection< RE01CalorimeterHit > RE01CalorimeterHitsCollection
G4VHitsCollection * GetCalCollection()