70 {
71
72 #ifdef debugFTFparticipant
75 #endif
76
78 if ( betta_z < 1.0e-10 ) betta_z = 1.0e-10;
79
81
82 for ( unsigned int i = 0; i < theInteractions.size(); i++ ) delete theInteractions[i];
83 theInteractions.clear();
84
86
88
89 G4double impactX( 0.0 ), impactY( 0.0 );
90
92
93 #ifdef debugFTFparticipant
94 G4cout <<
"Hadron-nucleus or anti-baryon-nucleus interactions" <<
G4endl;
95 #endif
96
99
100 const G4int maxNumberOfLoops = 1000;
101 G4int loopCounter = 0;
102 do {
103
104 std::pair< G4double, G4double > theImpactParameter;
106 impactX = theImpactParameter.first;
107 impactY = theImpactParameter.second;
108
109 #ifdef debugFTFparticipant
110 G4cout <<
"New interaction list," <<
" b= "
111 << std::sqrt(
sqr(impactX ) +
sqr( impactY ) )/fermi <<
G4endl;
112 #endif
113
116
119
120 #ifdef debugFTFparticipant
122 #endif
123
125
128
133 if ( !
nucleon->AreYouHit() ) {
135 nucleon->Hit( targetSplitable );
137
138 #ifdef debugFTFparticipant
139 G4cout <<
"Participated nucleons #, " << TrN <<
" " <<
"Splitable Pr* Tr* "
140 << primarySplitable <<
" " << targetSplitable <<
G4endl;
141 #endif
142
143 }
147 aInteraction->
SetTarget( targetSplitable );
151 nucleon->GetPosition().z() ) / betta_z );
152 theInteractions.push_back( aInteraction );
153 }
154
155 #ifdef debugFTFparticipant
156 TrN++;
157 #endif
158
159 }
160
161 } while ( ( theInteractions.size() == 0 ) &&
162 ++loopCounter < maxNumberOfLoops );
163 if ( loopCounter >= maxNumberOfLoops ) {
164 #ifdef debugFTFparticipant
165 G4cout <<
"BAD situation: forced exit from the while loop!" <<
G4endl;
166 #endif
167 return;
168 }
169
170 #ifdef debugFTFparticipant
171 G4cout <<
"Number of Hit nucleons " << theInteractions.size() <<
"\t Bx " << impactX/fermi
172 << "\t By " << impactY/fermi << "\t B "
174 #endif
175
176
178 return;
179
180 }
181
182
183
184 #ifdef debugFTFparticipant
186 #endif
187
188
189
193
194 G4double impactX( 0.0 ), impactY( 0.0 );
195
196 const G4int maxNumberOfLoops = 1000;
197 G4int loopCounter = 0;
198 do {
199
200 std::pair< G4double, G4double > theImpactParameter;
202 impactX = theImpactParameter.first;
203 impactY = theImpactParameter.second;
204
205 #ifdef debugFTFparticipant
206 G4cout <<
"New interaction list, " <<
"b "
207 << std::sqrt(
sqr( impactX ) +
sqr( impactY ) )/fermi <<
G4endl;
208 #endif
209
211
214
215 #ifdef debugFTFparticipant
217 #endif
218
220
224
225 #ifdef debugFTFparticipant
227 #endif
228
230
238
239 #ifdef debugFTFparticipant
240 G4cout <<
G4endl <<
"An Interaction has happend" <<
G4endl <<
"Proj N mom " << PrNuclN
243 <<
"PrN TrN Z coords " << ProjectileNucleon->
GetPosition().
z()/fermi
247 #endif
248
249 if ( ! ProjectileNucleon->
AreYouHit() ) {
250
252 ProjectileNucleon->
Hit( ProjectileSplitable );
254 } else {
256 }
257
260 TargetNucleon->
Hit( TargetSplitable );
262 } else {
264 }
265
267 anInteraction->
SetTarget( TargetSplitable );
273
274 #ifdef debugFTFparticipant
275 G4cout <<
"Part anInteraction->GetInteractionTime() "
277 << "Splitable Pr* Tr* " << ProjectileSplitable << " "
278 << TargetSplitable <<
G4endl;
279 #endif
280
281 theInteractions.push_back( anInteraction );
282
283 }
284
285 #ifdef debugFTFparticipant
286 TrNuclN++;
287 #endif
288
289 }
290
291 #ifdef debugFTFparticipant
292 PrNuclN++;
293 #endif
294
295 }
296
298
299 } while ( ( theInteractions.size() == 0 ) &&
300 ++loopCounter < maxNumberOfLoops );
301 if ( loopCounter >= maxNumberOfLoops ) {
302 #ifdef debugFTFparticipant
303 G4cout <<
"BAD situation: forced exit from the while loop!" <<
G4endl;
304 #endif
305 return;
306 }
307
310
311 #ifdef debugFTFparticipant
312 G4cout <<
G4endl <<
"Number of primary collisions " << theInteractions.size()
313 << "\t Bx " << impactX/fermi << "\t By " << impactY/fermi
314 <<
"\t B " << std::sqrt(
sqr( impactX ) +
sqr( impactY ) )/fermi <<
G4endl
315 <<
"FTF participant End. #######################" <<
G4endl <<
G4endl;
316 #endif
317 return;
318}
G4GLOB_DLL std::ostream G4cout
G4double GetProbabilityOfInteraction(const G4double impactsquare)
void ShiftInteractionTime()
void SortInteractionsIncT()
G4double GetInteractionTime() const
void SetTargetNucleon(G4Nucleon *aNucleon)
void SetTarget(G4VSplitableHadron *aTarget)
void SetStatus(G4int aValue)
void SetInteractionTime(G4double aValue)
void SetProjectileNucleon(G4Nucleon *aNucleon)
const G4ThreeVector & GetPosition() const
G4VSplitableHadron * GetSplitableHadron() const
virtual const G4LorentzVector & Get4Momentum() const
void Hit(G4VSplitableHadron *aHit)
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
virtual G4double GetOuterRadius()=0
virtual G4Nucleon * GetNextNucleon()=0
virtual G4bool StartLoop()=0
virtual void DoTranslation(const G4ThreeVector &theShift)=0
std::pair< G4double, G4double > ChooseImpactXandY(G4double maxImpact)
G4V3DNucleus * theProjectileNucleus
G4V3DNucleus * theNucleus
void SetStatus(const G4int aStatus)
const G4ThreeVector & GetPosition() const
void SetPosition(const G4ThreeVector &aPosition)
G4bool nucleon(G4int ityp)