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;
344 unsigned long iAngle = 0;
362 G4double kinE = std::sqrt(momentum*momentum + m1*m1) - m1;
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 = "
439 G4double alpha1,
alpha2, alphaMax, alphaCoulomb, delta = 0., sum = 0.;
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);
491 (*angleVector)[j] = alpha1;
492 (*sumVector)[j] = sum;
509 G4double x1, x2, y1, y2, randAngle = 0;
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;
531 if ( y1 == y2 ) randAngle = x1 + ( x2 - x1 )*
G4UniformRand();
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;
591 G4ThreeVector v1(sint*std::cos(phi),sint*std::sin(phi),cost);
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;
645 G4ThreeVector v1(sint*std::cos(phi),sint*std::sin(phi),cost);
static const G4double e1[44]
static const G4double e2[44]
std::vector< G4Element * > G4ElementTable
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
static const G4double alpha
static constexpr double twopi
static constexpr double keV
static constexpr double fermi
static constexpr double GeV
static constexpr double MeV
static constexpr double pi
G4GLOB_DLL std::ostream G4cout
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
G4double lowEnergyRecoilLimit
G4double BesselJzero(G4double z)
std::vector< G4String > fElementNameVector
std::vector< std::vector< std::vector< double > * > * > fEnergyAngleVectorBank
G4double SampleTableT(const G4ParticleDefinition *aParticle, G4double p, G4double Z, G4double A)
G4double CalculateNuclearRad(G4double A)
G4ParticleDefinition * theProton
G4double SampleTableThetaCMS(const G4ParticleDefinition *aParticle, G4double p, G4double Z, G4double A)
G4double lowestEnergyLimit
const G4ParticleDefinition * fParticle
G4double BesselJone(G4double z)
G4double CalculateZommerfeld(G4double beta, G4double Z1, G4double Z2)
G4ParticleDefinition * theNeutron
G4PhysicsLogVector * fEnergyVector
std::vector< std::vector< double > * > * fEnergyAngleVector
G4double GetScatteringAngle(G4int iMomentum, unsigned long iAngle, G4double position)
G4double DampFactor(G4double z)
G4double CalculateAm(G4double momentum, G4double n, G4double Z)
virtual ~G4DiffuseElasticV2()
G4double GetIntegrandFunction(G4double theta)
G4double ThetaLabToThetaCMS(const G4DynamicParticle *aParticle, G4double tmass, G4double thetaLab)
G4double BesselOneByArg(G4double z)
virtual G4double SampleInvariantT(const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
G4double lowEnergyLimitHE
std::vector< std::vector< std::vector< double > * > * > fEnergySumVectorBank
void InitialiseOnFly(G4double Z, G4double A)
G4double NeutronTuniform(G4int Z)
G4double ThetaCMStoThetaLab(const G4DynamicParticle *aParticle, G4double tmass, G4double thetaCMS)
std::vector< std::vector< double > * > * fEnergySumVector
std::vector< G4double > fElementNumberVector
G4double GetDiffElasticSumProbA(G4double alpha)
G4ParticleDefinition * GetDefinition() const
G4LorentzVector Get4Momentum() const
G4double GetTotalMomentum() const
static G4ElementTable * GetElementTable()
static size_t GetNumberOfElements()
void SetMinEnergy(G4double anEnergy)
void SetMaxEnergy(const G4double anEnergy)
G4double GetMaxEnergy() const
static G4HadronicParameters * Instance()
static G4Neutron * Neutron()
static G4NistManager * Instance()
G4double GetAtomicMassAmu(const G4String &symb) const
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4double GetPDGMass() const
G4double GetPDGCharge() const
G4double Energy(const std::size_t index) const
std::size_t FindBin(const G4double energy, std::size_t idx) const
static G4Proton * Proton()
static constexpr double pi