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;
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);
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;
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);
size_t FindBin(G4double energy, size_t idx) const
G4double Energy(size_t index) const
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
std::vector< std::vector< double > * > * fEnergySumVector
std::vector< std::vector< std::vector< double > * > * > fEnergyAngleVectorBank
void SetMinEnergy(G4double anEnergy)
G4double BesselJzero(G4double z)
std::vector< ExP01TrackerHit * > a
void SetMaxEnergy(const G4double anEnergy)
static constexpr double MeV
std::vector< std::vector< double > * > * fEnergyAngleVector
Float_t y1[n_points_granero]
G4double lowEnergyLimitHE
static constexpr double keV
G4double BesselJone(G4double z)
Float_t x1[n_points_granero]
static constexpr double hbarc
G4double GetDiffElasticSumProbA(G4double alpha)
G4double CalculateZommerfeld(G4double beta, G4double Z1, G4double Z2)
G4double GetPDGCharge() const
void InitialiseOnFly(G4double Z, G4double A)
G4double SampleTableThetaCMS(const G4ParticleDefinition *aParticle, G4double p, G4double Z, G4double A)
static G4Proton * Proton()
G4ParticleDefinition * theNeutron
G4double GetAtomicMassAmu(const G4String &symb) const
G4double GetPDGMass() const
G4double CalculateAm(G4double momentum, G4double n, G4double Z)
Float_t y2[n_points_geant4]
static constexpr double TeV
G4double BesselOneByArg(G4double z)
static constexpr double fermi
G4ParticleDefinition * GetDefinition() const
std::vector< std::vector< std::vector< double > * > * > fEnergySumVectorBank
G4double GetScatteringAngle(G4int iMomentum, unsigned long iAngle, G4double position)
virtual ~G4DiffuseElasticV2()
G4double ThetaCMStoThetaLab(const G4DynamicParticle *aParticle, G4double tmass, G4double thetaCMS)
const G4ParticleDefinition * fParticle
std::vector< G4Element * > G4ElementTable
static const G4double alpha
static constexpr double twopi
G4LorentzVector Get4Momentum() const
double A(double temperature)
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4double G4ParticleHPJENDLHEData::G4double result
G4double lowestEnergyLimit
G4double SampleTableT(const G4ParticleDefinition *aParticle, G4double p, G4double Z, G4double A)
G4ParticleDefinition * theProton
static G4Neutron * Neutron()
G4double ThetaLabToThetaCMS(const G4DynamicParticle *aParticle, G4double tmass, G4double thetaLab)
G4double DampFactor(G4double z)
G4GLOB_DLL std::ostream G4cout
Hep3Vector boostVector() const
G4double NeutronTuniform(G4int Z)
static size_t GetNumberOfElements()
G4double GetTotalMomentum() const
static constexpr double pi
G4double CalculateNuclearRad(G4double A)
Float_t x2[n_points_geant4]
virtual G4double SampleInvariantT(const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
G4double Legendre10(T &typeT, F f, G4double a, G4double b)
static constexpr double GeV
G4double GetIntegrandFunction(G4double theta)
static constexpr double pi
std::vector< G4String > fElementNameVector
G4PhysicsLogVector * fEnergyVector
HepLorentzVector & boost(double, double, double)
std::vector< G4double > fElementNumberVector
G4double lowEnergyRecoilLimit
static G4NistManager * Instance()
static G4ElementTable * GetElementTable()