72 #ifdef debugFTFparticipant
78 if ( betta_z < 1.0e-10 ) betta_z = 1.0e-10;
82 for (
unsigned int i = 0; i < theInteractions.size(); i++ )
delete theInteractions[i];
83 theInteractions.clear();
89 G4double impactX( 0.0 ), impactY( 0.0 );
93 #ifdef debugFTFparticipant
94 G4cout <<
"Hadron-nucleus or anti-baryon-nucleus interactions" <<
G4endl;
100 const G4int maxNumberOfLoops = 1000;
101 G4int loopCounter = 0;
104 std::pair< G4double, G4double > theImpactParameter;
106 impactX = theImpactParameter.first;
107 impactY = theImpactParameter.second;
109 #ifdef debugFTFparticipant
110 G4cout <<
"New interaction list," <<
" b= "
111 << std::sqrt(
sqr(impactX ) +
sqr( impactY ) )/fermi <<
G4endl;
120 #ifdef debugFTFparticipant
126 G4double impact2 =
sqr( impactX - nucleon->GetPosition().x() ) +
127 sqr( impactY - nucleon->GetPosition().y() );
133 if ( ! nucleon->AreYouHit() ) {
135 nucleon->Hit( targetSplitable );
138 #ifdef debugFTFparticipant
139 G4cout <<
"Participated nucleons #, " << TrN <<
" " <<
"Splitable Pr* Tr* "
140 << primarySplitable <<
" " << targetSplitable <<
G4endl;
147 aInteraction->
SetTarget( targetSplitable );
151 nucleon->GetPosition().z() ) / betta_z );
152 theInteractions.push_back( aInteraction );
155 #ifdef debugFTFparticipant
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;
170 #ifdef debugFTFparticipant
171 G4cout <<
"Number of Hit nucleons " << theInteractions.size() <<
"\t Bx " << impactX/fermi
172 <<
"\t By " << impactY/fermi <<
"\t B "
184 #ifdef debugFTFparticipant
194 G4double impactX( 0.0 ), impactY( 0.0 );
196 const G4int maxNumberOfLoops = 1000;
197 G4int loopCounter = 0;
200 std::pair< G4double, G4double > theImpactParameter;
202 impactX = theImpactParameter.first;
203 impactY = theImpactParameter.second;
205 #ifdef debugFTFparticipant
206 G4cout <<
"New interaction list, " <<
"b "
207 << std::sqrt(
sqr( impactX ) +
sqr( impactY ) )/fermi <<
G4endl;
215 #ifdef debugFTFparticipant
225 #ifdef debugFTFparticipant
239 #ifdef debugFTFparticipant
240 G4cout <<
G4endl <<
"An Interaction has happend" <<
G4endl <<
"Proj N mom " << PrNuclN
243 <<
"PrN TrN Z coords " << ProjectileNucleon->
GetPosition().
z()/fermi
249 if ( ! ProjectileNucleon->
AreYouHit() ) {
252 ProjectileNucleon->
Hit( ProjectileSplitable );
260 TargetNucleon->
Hit( TargetSplitable );
267 anInteraction->
SetTarget( TargetSplitable );
274 #ifdef debugFTFparticipant
275 G4cout <<
"Part anInteraction->GetInteractionTime() "
277 <<
"Splitable Pr* Tr* " << ProjectileSplitable <<
" "
278 << TargetSplitable <<
G4endl;
281 theInteractions.push_back( anInteraction );
285 #ifdef debugFTFparticipant
291 #ifdef debugFTFparticipant
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;
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;
332 if ( theInteractions.size() < 2 )
return;
340 G4double InitialTime = theInteractions[0]->GetInteractionTime();
341 for (
unsigned int i = 1; i < theInteractions.size(); i++ ) {
342 G4double InterTime = theInteractions[i]->GetInteractionTime() - InitialTime;
343 theInteractions[i]->SetInteractionTime( InterTime );
360 for (
size_t i = 0; i < theInteractions.size(); i++ ) {
361 if ( theInteractions[ i ] ) {
362 delete theInteractions[ i ];
363 theInteractions[ i ] = 0;
366 theInteractions.clear();
367 currentInteraction = -1;
bool G4FTFPartHelperForSortInT(const G4InteractionContent *Int1, const G4InteractionContent *Int2)
G4GLOB_DLL std::ostream G4cout
G4double GetProbabilityOfInteraction(const G4double impactsquare)
void ShiftInteractionTime()
void GetList(const G4ReactionProduct &thePrimary, G4FTFParameters *theParameters)
void SortInteractionsIncT()
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)
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 SetTimeOfCreation(G4double aTime)
void SetStatus(const G4int aStatus)
const G4ThreeVector & GetPosition() const
void SetPosition(const G4ThreeVector &aPosition)