66 for (
G4int i = 0 ; i <
n ; i++ )
76 for (
G4int i = 0 ; i <
n ; i++ )
97 G4bool isThisEnergyOK =
false;
99 for (
G4int ii = 0 ; ii < 4 ; ii++ )
115 for ( G4KineticTrackVector::iterator it
116 = secs->begin() ; it != secs->end() ; it++ )
131 et += (*it)->Get4Momentum().e()/
GeV;
137 et += (*it)->Get4Momentum().e()/
GeV;
161 if ( std::abs ( eini - efin ) < epse*10 )
164 isThisEnergyOK =
true;
174 for (
G4int i0i = 0 ; i0i <
id-1 ; i0i++ )
188 if ( isThisEnergyOK ==
true )
194 for (
G4int i0i = 0 ; i0i < i0 ; i0i++ )
217 for (
G4int i0i = 0 ; i0i < i0 ; i0i++ )
228 if ( isThisEnergyOK ==
true )
235 for (
G4int i0i = 0 ; i0i < i0 ; i0i++ )
270 for (
G4int j = 0 ; j < i ; j++ )
309 if ( rr2 > deltar*deltar )
continue;
314 G4double srt = std::sqrt( (p4i+p4j)*(p4i+p4j) );
321 if ( rmi < 0.94 && rmj < 0.94 )
324 cutoff = rmi + rmj + 0.02;
338 if ( srt < cutoff )
continue;
347 G4double aij = 1.0 - ( rmi*rmj /pij ) * ( rmi*rmj /pij );
348 G4double bij = pidr / rmi - pjdr*rmi/pij;
349 G4double cij = rsq + ( pidr / rmi ) * ( pidr / rmi );
350 G4double brel = std::sqrt ( std::abs ( cij - bij*bij/aij ) );
352 if ( brel > bcmax )
continue;
355 G4double bji = -pjdr/rmj + pidr * rmj /pij;
357 G4double ti = ( pidr/rmi - bij / aij ) * p4i.
e() / rmi;
358 G4double tj = (-pjdr/rmj - bji / aij ) * p4j.e() / rmj;
375 if ( std::abs ( ti + tj ) > deltaT )
continue;
386 if ( prcm <= 0.00001 )
continue;
417 if ( energetically_forbidden ==
true )
440 G4bool absorption =
false;
527 for (
G4int iitry = 0 ; iitry < 4 ; iitry++ )
538 secs = theScatterer->
Scatter( kt1 , kt2 );
548 if ( secs->size() == 2 )
550 for ( G4KineticTrackVector::iterator it
551 = secs->begin() ; it != secs->end() ; it++ )
556 p4ix_new = (*it)->Get4Momentum()/
GeV;
563 p4jx_new = (*it)->Get4Momentum()/
GeV;
571 else if ( secs->size() == 1 )
578 p4ix_new = secs->front()->Get4Momentum()/
GeV;
584 if ( secs->size() > 2 )
587 G4cout <<
"G4QMDCollision secs size > 2; " << secs->size() <<
G4endl;
589 for ( G4KineticTrackVector::iterator it
590 = secs->begin() ; it != secs->end() ; it++ )
592 G4cout <<
"G4QMDSCATTERER AFTER " << (*it)->GetDefinition()->GetParticleName() <<
" " << (*it)->Get4Momentum()/GeV <<
G4endl;
598 for ( G4KineticTrackVector::iterator it
599 = secs->begin() ; it != secs->end() ; it++ )
621 G4double efin = epot + p4ix_new.
e() + p4jx_new.
e();
632 if ( std::abs ( eini - efin ) < epse )
742 elastic = 35.0 / ( 1. + csrt * 100.0 ) + 20.0;
746 elastic = ( - std::atan( ( csrt - 0.4286 ) * 1.5 - 0.8 )
747 * 2. /
pi + 1.0 ) * 9.65 + 7.0;
754 elastic = 28.0 / ( 1. + csrt * 100.0 ) + 27.0;
758 elastic = ( - std::atan( ( csrt - 0.4286 ) * 1.5 - 0.8 )
759 * 2. /
pi + 1.0 ) * 12.34 + 10.0;
781 G4double as = std::pow ( 3.65 * asrt , 6 );
785 G4double t1 = std::log( (1-x) * std::exp(2.*a*ta) + x ) /
a;
788 if( std::abs(c1) > 1.0 ) c1 = 2.0 * x - 1.0;
801 if ( pcm.
x() == 0.0 && pcm.
y() == 0 )
807 t2 = std::atan2( pcm.
y() , pcm.
x() );
811 G4double s1 = std::sqrt ( 1.0 - c1*c1 );
812 G4double s2 = std::sqrt ( 1.0 - c2*c2 );
822 pcm.
setX( pr * ( ss*ct2 - s1*st1*st2) );
823 pcm.
setY( pr * ( ss*st2 + s1*st1*ct2) );
824 pcm.
setZ( pr * ( c1*c2 - s1*s2*ct1) );
840 for (
G4int itry = 0 ; itry < 4 ; itry++ )
843 G4double eicm = std::sqrt ( rmi*rmi + pcm*pcm );
846 G4double trans = gamma * ( gamma * pibeta / ( gamma + 1 ) + eicm );
850 G4double ejcm = std::sqrt ( rmj*rmj + pcm*pcm );
851 trans = gamma * ( gamma * pibeta / ( gamma + 1 ) + ejcm );
874 G4double efin = epot + pi_new_e + pj_new_e ;
884 if ( std::abs ( eini - efin ) < epse )
896 if ( std::abs ( eini - efin ) < epse )
return result;
898 G4double cona = ( eini - efin + etwo ) / gamma;
899 G4double fac2 = 1.0 / ( 4.0 * cona*cona * pr*
pr ) *
900 ( ( cona*cona - ( rmi*rmi + rmj*rmj ) )*( cona*cona - ( rmi*rmi + rmj*rmj ) )
901 - 4.0 * rmi*rmi * rmj*rmj );