135 for( jEl = 0; jEl < numOfEl; ++jEl)
143 G4cout<<
"G4DiffuseElasticV2::Initialise() the element: "
144 <<(*theElementTable)[jEl]->GetName()<<
G4endl;
167 G4double sigma, bzero, bzero2, bonebyarg, bonebyarg2, damp, damp2;
180 bzero2 = bzero*bzero;
184 bonebyarg2 = bonebyarg*bonebyarg;
188 diffuse = 0.63*
fermi;
196 diffuse = 0.63*
fermi;
204 diffuse = 0.63*
fermi;
217 G4double sinHalfTheta = std::sin(0.5*theta);
218 G4double sinHalfTheta2 = sinHalfTheta*sinHalfTheta;
240 sigma += mode2k2*bone2;
241 sigma += e2dk3t*bzero*bone;
244 sigma += kr2*bonebyarg2;
278 G4double totElab = std::sqrt(m1*m1+p*p);
293 G4double pCMS2 = momentumCMS*momentumCMS;
294 G4double Tkin = std::sqrt(pCMS2+m1*m1)-m1;
328 G4double t = 2*p*p*( 1 - std::cos(alpha) );
344 unsigned long iAngle = 0;
362 G4double kinE = std::sqrt(momentum*momentum + m1*m1) - m1;
366 position = (*(*fEnergySumVector)[iMomentum])[0]*
G4UniformRand();
368 for(iAngle = 0; iAngle <
fAngleBin; iAngle++)
374 if (iMomentum ==
fEnergyBin -1 || iMomentum == 0 )
394 randAngle = W1*theta1 + W2*theta2;
399 if(randAngle < 0.) randAngle = 0.;
417 G4cout<<
"G4DiffuseElasticV2::InitialiseOnFly() the element with Z = "
418 <<Z<<
"; and A = "<<A<<
G4endl;
449 partMom = std::sqrt( kinE*(kinE + 2*m1) );
461 alphaCoulomb = kRcoul/kR;
466 fBeta = a/std::sqrt(1+a*a);
472 std::vector<double>* angleVector =
new std::vector<double>(
fAngleBin);
473 std::vector<double>* sumVector =
new std::vector<double>(
fAngleBin);
483 alpha2 = alpha1 + delth;
491 (*angleVector)[j] = alpha1;
492 (*sumVector)[j] =
sum;
513 randAngle = (*(*fEnergyAngleVector)[iMomentum])[iAngle];
519 iAngle = (*fEnergyAngleVector)[iMomentum]->size() - 1;
522 y1 = (*(*fEnergySumVector)[iMomentum])[iAngle-1];
523 y2 = (*(*fEnergySumVector)[iMomentum])[iAngle];
525 x1 = (*(*fEnergyAngleVector)[iMomentum])[iAngle-1];
526 x2 = (*(*fEnergyAngleVector)[iMomentum])[iAngle];
528 if ( x1 == x2 ) randAngle =
x2;
534 randAngle = x1 + ( position -
y1 )*( x2 - x1 )/( y2 -
y1 );
578 else if( cost <= -1.0)
585 sint = std::sqrt((1.0-cost)*(1.0+cost));
589 G4cout <<
"cos(tcms)=" << cost <<
" std::sin(tcms)=" << sint <<
G4endl;
632 else if( cost <= -1.0)
639 sint = std::sqrt((1.0-cost)*(1.0+cost));
643 G4cout <<
"cos(tlab)=" << cost <<
" std::sin(tlab)=" << sint <<
G4endl;