77 #ifdef debugFTFparticipant
83 if ( betta_z < 1.0e-10 ) betta_z = 1.0e-10;
87 for (
unsigned int i = 0; i < theInteractions.size(); i++ )
delete theInteractions[i];
88 theInteractions.clear();
94 G4double impactX( 0.0 ), impactY( 0.0 );
99 #ifdef debugFTFparticipant
100 G4cout <<
"Hadron-nucleus or anti-baryon-nucleus interactions" <<
G4endl;
105 const G4int maxNumberOfLoops = 1000;
106 G4int loopCounter = 0;
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 );
119 impactX = theImpactParameter.first;
120 impactY = theImpactParameter.second;
124 #ifdef debugFTFparticipant
125 G4cout <<
"New interaction list," <<
" b[fm]= "
126 << std::sqrt(
sqr(impactX ) +
sqr( impactY ) )/fermi <<
G4endl;
135 #ifdef debugFTFparticipant
141 G4double impact2 =
sqr( impactX - nucleon->GetPosition().x() ) +
142 sqr( impactY - nucleon->GetPosition().y() );
148 if ( ! nucleon->AreYouHit() ) {
150 nucleon->Hit( targetSplitable );
153 #ifdef debugFTFparticipant
154 G4cout <<
"Participated nucleons #, " << TrN <<
" " <<
"Splitable Pr* Tr* "
155 << primarySplitable <<
" " << targetSplitable <<
G4endl;
162 aInteraction->
SetTarget( targetSplitable );
166 nucleon->GetPosition().z() ) / betta_z );
167 theInteractions.push_back( aInteraction );
170 #ifdef debugFTFparticipant
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;
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] "
199 #ifdef debugFTFparticipant
208 G4double impactX( 0.0 ), impactY( 0.0 );
211 const G4int maxNumberOfLoops = 1000;
212 G4int loopCounter = 0;
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 );
225 impactX = theImpactParameter.first;
226 impactY = theImpactParameter.second;
230 #ifdef debugFTFparticipant
231 G4cout <<
"New interaction list, " <<
"b[fm] "
232 << std::sqrt(
sqr( impactX ) +
sqr( impactY ) )/fermi <<
G4endl;
240 #ifdef debugFTFparticipant
250 #ifdef debugFTFparticipant
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
274 if ( ! ProjectileNucleon->
AreYouHit() ) {
277 ProjectileNucleon->
Hit( ProjectileSplitable );
285 TargetNucleon->
Hit( TargetSplitable );
292 anInteraction->
SetTarget( TargetSplitable );
299 #ifdef debugFTFparticipant
300 G4cout <<
"Part anInteraction->GetInteractionTime() [fm] "
302 <<
"Splitable Pr* Tr* " << ProjectileSplitable <<
" "
303 << TargetSplitable <<
G4endl;
306 theInteractions.push_back( anInteraction );
310 #ifdef debugFTFparticipant
316 #ifdef debugFTFparticipant
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;
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;
G4double GetInteractionTime() const
void SetTargetNucleon(G4Nucleon *aNucleon)
G4VSplitableHadron * GetProjectile() const
void SetTarget(G4VSplitableHadron *aTarget)
void SetStatus(G4int aValue)
void SetInteractionTime(G4double aValue)
G4VSplitableHadron * GetTarget() const
void SetProjectileNucleon(G4Nucleon *aNucleon)