128 for (
G4int i = 0 ; i < n ; i++ )
138 for (
G4int i = 0 ; i < n ; i++ )
159 G4bool isThisEnergyOK =
false;
161 G4int maximumNumberOfTrial=4;
162 for (
G4int ii = 0 ; ii < maximumNumberOfTrial ; ii++ )
178 for ( G4KineticTrackVector::iterator it
179 = secs->begin() ; it != secs->end() ; it++ )
224 if ( std::abs ( eini - efin ) < fepse*10 )
227 isThisEnergyOK =
true;
239 for (
G4int i0i =
id-2 ; 0 <= i0i ; i0i-- ) {
252 if ( isThisEnergyOK ==
true )
258 for (
G4int i0i = 0 ; i0i < i0 ; i0i++ )
281 for (
G4int i0i = 0 ; i0i < i0 ; i0i++ )
292 if ( isThisEnergyOK ==
true )
299 for (
G4int i0i = 0 ; i0i < i0 ; i0i++ )
336 for (
G4int j = 0 ; j < i ; j++ )
375 if ( rr2 > fdeltar*fdeltar )
continue;
380 G4double srt = std::sqrt( (p4i+p4j)*(p4i+p4j) );
387 if ( rmi < 0.94 && rmj < 0.94 )
390 cutoff = rmi + rmj + 0.02;
404 if ( srt < cutoff )
continue;
413 G4double aij = 1.0 - ( rmi*rmj /pij ) * ( rmi*rmj /pij );
414 G4double bij = pidr / rmi - pjdr*rmi/pij;
415 G4double cij = rsq + ( pidr / rmi ) * ( pidr / rmi );
416 G4double brel = std::sqrt ( std::abs ( cij - bij*bij/aij ) );
418 if ( brel > fbcmax )
continue;
421 G4double bji = -pjdr/rmj + pidr * rmj /pij;
423 G4double ti = ( pidr/rmi - bij / aij ) * p4i.
e() / rmi;
424 G4double tj = (-pjdr/rmj - bji / aij ) * p4j.
e() / rmj;
441 if ( std::abs ( ti + tj ) > deltaT )
continue;
452 if ( prcm <= 0.00001 )
continue;
483 if ( energetically_forbidden ==
true )
506 G4bool absorption =
false;
597 for (
G4int iitry = 0 ; iitry < 4 ; iitry++ )
609 secs = theScatterer->
Scatter( kt1 , kt2 );
619 if ( secs->size() == 2 )
621 for ( G4KineticTrackVector::iterator it
622 = secs->begin() ; it != secs->end() ; it++ )
627 p4ix_new = (*it)->Get4Momentum()/GeV;
639 if((*it)->GetDefinition()->IsShortLived())
644 for(G4KineticTrackVector::iterator jter=dec->begin(); jter != dec->end(); jter++)
657 p4kx_new = (*jter)->Get4Momentum()/GeV;
665 p4jx_new = (*jter)->Get4Momentum()/GeV;
675 std::cout <<
"************ Multi-particle decay ************" << std::endl;
691 p4jx_new = (*it)->Get4Momentum()/GeV;
701 else if ( secs->size() == 1 )
708 if(secs->front()->GetDefinition()->IsShortLived())
712 for(G4KineticTrackVector::iterator jter=dec->begin(); jter != dec->end(); jter++)
718 p4ix_new = (*jter)->Get4Momentum()/GeV;
724 p4jx_new = (*jter)->Get4Momentum()/GeV;
731 std::cout <<
"************ Multi-particle decay ************" << std::endl;
740 p4ix_new = secs->front()->Get4Momentum()/GeV;
757 if ( secs->size() > 2 )
760 G4cout <<
"G4LightIonQMDCollision secs size > 2; " << secs->size() <<
G4endl;
762 for ( G4KineticTrackVector::iterator it
763 = secs->begin() ; it != secs->end() ; it++ )
765 G4cout <<
"G4QMDSCATTERER AFTER " << (*it)->GetDefinition()->GetParticleName() <<
" " << (*it)->Get4Momentum()/GeV <<
G4endl;
771 for ( G4KineticTrackVector::iterator it
772 = secs->begin() ; it != secs->end() ; it++ )
809 if ( std::abs ( eini - efin ) < fepse )
867 else if ( pion_prod )
933 else if ( pion_prod )
998 elastic = 35.0 / ( 1. + csrt * 100.0 ) + 20.0;
1002 elastic = ( - std::atan( ( csrt - 0.4286 ) * 1.5 - 0.8 )
1003 * 2. / pi + 1.0 ) * 9.65 + 7.0;
1008 if ( csrt < 0.4286 )
1010 elastic = 28.0 / ( 1. + csrt * 100.0 ) + 27.0;
1014 elastic = ( - std::atan( ( csrt - 0.4286 ) * 1.5 - 0.8 )
1015 * 2. / pi + 1.0 ) * 12.34 + 10.0;
1038 G4double a = 6.0 * as / (1.0 + as);
1044 if( std::abs(c1) > 1.0 ) c1 = 2.0 * x - 1.0;
1057 if ( pcm.
x() == 0.0 && pcm.
y() == 0 )
1063 t2 = std::atan2( pcm.
y() , pcm.
x() );
1067 G4double s1 = std::sqrt ( 1.0 - c1*c1 );
1068 G4double s2 = std::sqrt ( 1.0 - c2*c2 );
1078 pcm.
setX( pr * ( ss*ct2 - s1*st1*st2) );
1079 pcm.
setY( pr * ( ss*st2 + s1*st1*ct2) );
1080 pcm.
setZ( pr * ( c1*c2 - s1*s2*ct1) );
1096 for (
G4int itry = 0 ; itry < 4 ; itry++ )
1099 G4double eicm = std::sqrt ( rmi*rmi + pcm*pcm );
1102 G4double trans = gamma * ( gamma * pibeta / ( gamma + 1 ) + eicm );
1106 G4double ejcm = std::sqrt ( rmj*rmj + pcm*pcm );
1107 trans = gamma * ( gamma * pibeta / ( gamma + 1 ) + ejcm );
1139 if ( std::abs ( eini - efin ) < fepse )
1151 if ( std::abs ( eini - efin ) < fepse )
return result;
1153 G4double cona = ( eini - efin + etwo ) / gamma;
1154 G4double fac2 = 1.0 / ( 4.0 * cona*cona * pr*pr ) *
1155 ( ( cona*cona - ( rmi*rmi + rmj*rmj ) )*( cona*cona - ( rmi*rmi + rmj*rmj ) )
1156 - 4.0 * rmi*rmi * rmj*rmj );
1160 G4double fact = std::sqrt ( fac2 );
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
HepLorentzVector & boost(double, double, double)
Hep3Vector findBoostToCM() const
G4KineticTrackVector * Decay()
~G4LightIonQMDCollision()
void CalKinematicsOfBinaryCollisions(G4double)
G4bool CalFinalStateOfTheBinaryCollision(G4int, G4int)
G4bool CalFinalStateOfTheBinaryCollisionJQMD(G4double, G4double, G4ThreeVector, G4double, G4double, G4ThreeVector, G4double, G4int, G4int)
void Cal2BodyQuantities()
G4double GetTotalPotential()
G4double GetTotalEnergy()
G4double GetRR2(G4int i, G4int j)
G4bool IsPauliBlocked(G4int)
G4bool IsShortLived() const
G4double GetPDGMass() const
static G4Pow * GetInstance()
G4double powN(G4double x, G4int n) const
G4ThreeVector GetPosition()
const G4ParticleDefinition * GetDefinition()
void SetPosition(G4ThreeVector r)
G4LorentzVector Get4Momentum()
G4int GetChargeInUnitOfEplus()
void SetDefinition(const G4ParticleDefinition *pd)
G4ThreeVector GetMomentum()
G4bool IsThisProjectile()
void SetMomentum(G4ThreeVector p)
void InsertParticipant(G4QMDParticipant *particle, G4int j)
G4QMDParticipant * GetParticipant(G4int i)
G4int GetTotalNumberOfParticipant()
void DeleteParticipant(G4int i)
void SetParticipant(G4QMDParticipant *particle)
void IncrementCollisionCounter()
G4QMDParticipant * EraseParticipant(G4int i)
virtual G4KineticTrackVector * Scatter(const G4KineticTrack &trk1, const G4KineticTrack &trk2) const