75 {
76
77 #ifdef debugFTFparticipant
80 #endif
81
83 if ( betta_z < 1.0e-10 ) betta_z = 1.0e-10;
84
86
87 for ( unsigned int i = 0; i < theInteractions.size(); i++ ) delete theInteractions[i];
88 theInteractions.clear();
89
91
93
94 G4double impactX( 0.0 ), impactY( 0.0 );
96
98
99 #ifdef debugFTFparticipant
100 G4cout <<
"Hadron-nucleus or anti-baryon-nucleus interactions" <<
G4endl;
101 #endif
102
104
105 const G4int maxNumberOfLoops = 1000;
106 G4int loopCounter = 0;
107 do {
108
109 std::pair< G4double, G4double > theImpactParameter;
112 B = B2 > 0.0 ? std::sqrt( B2 ) : 0.0;
114 impactX =
B * std::cos( Phi );
115 impactY =
B * std::sin( Phi );
117 } else {
119 impactX = theImpactParameter.first;
120 impactY = theImpactParameter.second;
122 }
123
124 #ifdef debugFTFparticipant
125 G4cout <<
"New interaction list," <<
" b[fm]= "
126 << std::sqrt(
sqr(impactX ) +
sqr( impactY ) )/fermi <<
G4endl;
127 #endif
128
131
134
135 #ifdef debugFTFparticipant
137 #endif
138
140
143
148 if ( !
nucleon->AreYouHit() ) {
150 nucleon->Hit( targetSplitable );
152
153 #ifdef debugFTFparticipant
154 G4cout <<
"Participated nucleons #, " << TrN <<
" " <<
"Splitable Pr* Tr* "
155 << primarySplitable <<
" " << targetSplitable <<
G4endl;
156 #endif
157
158 }
162 aInteraction->
SetTarget( targetSplitable );
166 nucleon->GetPosition().z() ) / betta_z );
167 theInteractions.push_back( aInteraction );
168 }
169
170 #ifdef debugFTFparticipant
171 TrN++;
172 #endif
173
174 }
175
176 } while ( ( theInteractions.size() == 0 ) &&
177 ++loopCounter < maxNumberOfLoops );
178 if ( loopCounter >= maxNumberOfLoops ) {
179 #ifdef debugFTFparticipant
180 G4cout <<
"BAD situation: forced exit from the while loop!" <<
G4endl;
181 #endif
182 return;
183 }
184
185 #ifdef debugFTFparticipant
186 G4cout <<
"Number of Hit nucleons " << theInteractions.size() <<
"\t Bx[fm] " << impactX/fermi
187 << "\t By[fm] " << impactY/fermi << "\t B[fm] "
189 #endif
190
191
193 return;
194
195 }
196
197
198
199 #ifdef debugFTFparticipant
201 #endif
202
203
204
205
207
208 G4double impactX( 0.0 ), impactY( 0.0 );
210
211 const G4int maxNumberOfLoops = 1000;
212 G4int loopCounter = 0;
213 do {
214
215 std::pair< G4double, G4double > theImpactParameter;
218 B = B2 > 0.0 ? std::sqrt( B2 ) : 0.0;
220 impactX =
B * std::cos( Phi );
221 impactY =
B * std::sin( Phi );
223 } else {
225 impactX = theImpactParameter.first;
226 impactY = theImpactParameter.second;
228 }
229
230 #ifdef debugFTFparticipant
231 G4cout <<
"New interaction list, " <<
"b[fm] "
232 << std::sqrt(
sqr( impactX ) +
sqr( impactY ) )/fermi <<
G4endl;
233 #endif
234
236
239
240 #ifdef debugFTFparticipant
242 #endif
243
245
249
250 #ifdef debugFTFparticipant
252 #endif
253
255
263
264 #ifdef debugFTFparticipant
265 G4cout <<
G4endl <<
"An Interaction has happend" <<
G4endl <<
"Proj N mom " << PrNuclN
268 <<
"PrN TrN Z coords [fm]" << ProjectileNucleon->
GetPosition().
z()/fermi
272 #endif
273
274 if ( ! ProjectileNucleon->
AreYouHit() ) {
275
277 ProjectileNucleon->
Hit( ProjectileSplitable );
279 } else {
281 }
282
285 TargetNucleon->
Hit( TargetSplitable );
287 } else {
289 }
290
292 anInteraction->
SetTarget( TargetSplitable );
298
299 #ifdef debugFTFparticipant
300 G4cout <<
"Part anInteraction->GetInteractionTime() [fm] "
302 << "Splitable Pr* Tr* " << ProjectileSplitable << " "
303 << TargetSplitable <<
G4endl;
304 #endif
305
306 theInteractions.push_back( anInteraction );
307
308 }
309
310 #ifdef debugFTFparticipant
311 TrNuclN++;
312 #endif
313
314 }
315
316 #ifdef debugFTFparticipant
317 PrNuclN++;
318 #endif
319
320 }
321
323
324 } while ( ( theInteractions.size() == 0 ) &&
325 ++loopCounter < maxNumberOfLoops );
326 if ( loopCounter >= maxNumberOfLoops ) {
327 #ifdef debugFTFparticipant
328 G4cout <<
"BAD situation: forced exit from the while loop!" <<
G4endl;
329 #endif
330 return;
331 }
332
335
336 #ifdef debugFTFparticipant
337 G4cout <<
G4endl <<
"Number of primary collisions " << theInteractions.size()
338 << "\t Bx[fm] " << impactX/fermi << "\t By[fm] " << impactY/fermi
339 <<
"\t B[fm] " << std::sqrt(
sqr( impactX ) +
sqr( impactY ) )/fermi <<
G4endl
340 <<
"FTF participant End. #######################" <<
G4endl <<
G4endl;
341 #endif
342 return;
343}
G4double B(G4double temperature)
G4GLOB_DLL std::ostream G4cout
G4double GetProbabilityOfInteraction(const G4double impactsquare)
void ShiftInteractionTime()
G4double GetBmin2() const
G4bool SampleBinInterval() const
void SortInteractionsIncT()
void SetImpactParameter(const G4double b_value)
G4double GetBmax2() const
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)