44 , fbcmax0 ( 1.323142 )
125 for (
G4int i = 0 ; i <
n ; i++ )
135 for (
G4int i = 0 ; i <
n ; i++ )
156 G4bool isThisEnergyOK =
false;
158 G4int maximumNumberOfTrial=4;
159 for (
G4int ii = 0 ; ii < maximumNumberOfTrial ; ii++ )
175 for ( G4KineticTrackVector::iterator
it
176 = secs->begin() ;
it != secs->end() ;
it++ )
191 et += (*it)->Get4Momentum().e()/
GeV;
197 et += (*it)->Get4Momentum().e()/
GeV;
224 isThisEnergyOK =
true;
236 for (
G4int i0i =
id-2 ; 0 <= i0i ; i0i-- ) {
249 if ( isThisEnergyOK ==
true )
255 for (
G4int i0i = 0 ; i0i < i0 ; i0i++ )
278 for (
G4int i0i = 0 ; i0i < i0 ; i0i++ )
289 if ( isThisEnergyOK ==
true )
296 for (
G4int i0i = 0 ; i0i < i0 ; i0i++ )
332 for (
G4int j = 0 ; j < i ; j++ )
376 G4double srt = std::sqrt( (p4i+p4j)*(p4i+p4j) );
383 if ( rmi < 0.94 && rmj < 0.94 )
386 cutoff = rmi + rmj + 0.02;
400 if ( srt < cutoff )
continue;
409 G4double aij = 1.0 - ( rmi*rmj /pij ) * ( rmi*rmj /pij );
410 G4double bij = pidr / rmi - pjdr*rmi/pij;
411 G4double cij = rsq + ( pidr / rmi ) * ( pidr / rmi );
414 if ( brel > fbcmax )
continue;
417 G4double bji = -pjdr/rmj + pidr * rmj /pij;
419 G4double ti = ( pidr/rmi - bij / aij ) * p4i.
e() / rmi;
420 G4double tj = (-pjdr/rmj - bji / aij ) * p4j.e() / rmj;
437 if (
std::abs ( ti + tj ) > deltaT )
continue;
448 if ( prcm <= 0.00001 )
continue;
479 if ( energetically_forbidden ==
true )
502 G4bool absorption =
false;
589 for (
G4int iitry = 0 ; iitry < 4 ; iitry++ )
610 if ( secs->size() == 2 )
612 for ( G4KineticTrackVector::iterator
it
613 = secs->begin() ;
it != secs->end() ;
it++ )
618 p4ix_new = (*it)->Get4Momentum()/
GeV;
625 p4jx_new = (*it)->Get4Momentum()/
GeV;
633 else if ( secs->size() == 1 )
640 p4ix_new = secs->front()->Get4Momentum()/
GeV;
646 if ( secs->size() > 2 )
649 G4cout <<
"G4QMDCollision secs size > 2; " << secs->size() <<
G4endl;
651 for ( G4KineticTrackVector::iterator
it
652 = secs->begin() ;
it != secs->end() ;
it++ )
654 G4cout <<
"G4QMDSCATTERER AFTER " << (*it)->GetDefinition()->GetParticleName() <<
" " << (*it)->Get4Momentum()/GeV <<
G4endl;
660 for ( G4KineticTrackVector::iterator
it
661 = secs->begin() ;
it != secs->end() ;
it++ )
683 G4double efin = epot + p4ix_new.
e() + p4jx_new.
e();
804 elastic = 35.0 / ( 1. + csrt * 100.0 ) + 20.0;
808 elastic = ( - std::atan( ( csrt - 0.4286 ) * 1.5 - 0.8 )
809 * 2. /
pi + 1.0 ) * 9.65 + 7.0;
816 elastic = 28.0 / ( 1. + csrt * 100.0 ) + 27.0;
820 elastic = ( - std::atan( ( csrt - 0.4286 ) * 1.5 - 0.8 )
821 * 2. /
pi + 1.0 ) * 12.34 + 10.0;
850 if(
std::abs(c1) > 1.0 ) c1 = 2.0 * x - 1.0;
863 if ( pcm.
x() == 0.0 && pcm.
y() == 0 )
869 t2 = std::atan2( pcm.
y() , pcm.
x() );
874 G4double s2 = std::sqrt ( 1.0 - c2*c2 );
884 pcm.
setX( pr * ( ss*ct2 - s1*st1*st2) );
885 pcm.
setY( pr * ( ss*st2 + s1*st1*ct2) );
886 pcm.
setZ( pr * ( c1*c2 - s1*s2*ct1) );
902 for (
G4int itry = 0 ; itry < 4 ; itry++ )
905 G4double eicm = std::sqrt ( rmi*rmi + pcm*pcm );
908 G4double trans = gamma * ( gamma * pibeta / ( gamma + 1 ) + eicm );
912 G4double ejcm = std::sqrt ( rmj*rmj + pcm*pcm );
913 trans = gamma * ( gamma * pibeta / ( gamma + 1 ) + ejcm );
936 G4double efin = epot + pi_new_e + pj_new_e ;
960 G4double cona = ( eini - efin + etwo ) / gamma;
961 G4double fac2 = 1.0 / ( 4.0 * cona*cona * pr*
pr ) *
962 ( ( cona*cona - ( rmi*rmi + rmj*rmj ) )*( cona*cona - ( rmi*rmi + rmj*rmj ) )
963 - 4.0 * rmi*rmi * rmj*rmj );