67std::vector<G4double>* G4mplIonisationModel::dedx0 =
nullptr;
72 twoln10(
G4Log(100.0)),
75 beta2lim(betalim*betalim),
76 bg2lim(beta2lim*(1.0 + beta2lim))
78 nmpl =
G4int(std::abs(magCharge) * 2 * CLHEP::fine_structure_const + 0.5);
79 if(nmpl > 6) { nmpl = 6; }
80 else if(nmpl < 1) { nmpl = 1; }
81 pi_hbarc2_over_mc2 = CLHEP::pi*CLHEP::hbarc*CLHEP::hbarc/CLHEP::electron_mass_c2;
82 chargeSquare = magCharge * magCharge;
83 dedxlim = 45.*nmpl*nmpl*CLHEP::GeV*CLHEP::cm2/CLHEP::g;
100 std::min(
LowEnergyLimit(),0.1*mass*(1./std::sqrt(1. - betalow*betalow) - 1.));
102 std::max(
HighEnergyLimit(),10.*mass*(1./std::sqrt(1. - beta2lim) - 1.));
115 if(
nullptr == dedx0) { dedx0 =
new std::vector<G4double>; }
120 if(n < numOfCouples) { dedx0->resize(numOfCouples); }
125 for(
G4int i=0; i<numOfCouples; ++i) {
130 G4double vF2 = 2*electron_Compton_length*g4calc->
A13(3.*pi*pi*eDensity);
131 (*dedx0)[i] = pi_hbarc2_over_mc2*eDensity*nmpl*nmpl*
132 (
G4Log(vF2/fine_structure_const) - 0.5)/vF2;
145 G4double tau = kineticEnergy / mass;
159 if(beta >= betalim) {
160 dedx = ComputeDEDXAhlen(material, bg2);
166 G4double dedx2 = ComputeDEDXAhlen(material, bg2lim);
171 dedx = (kapa1*dedx1 + kapa2*dedx2)/(kapa1 + kapa2);
191 G4double dedx = std::log(2.0 * electron_mass_c2 * bg2 / eexc) - 0.5;
195 if(nmpl > 1) k = 0.346;
198 const G4double B[7] = { 0.0, 0.248, 0.672, 1.022, 1.243, 1.464, 1.685};
200 dedx += 0.5 * k -
B[nmpl];
204 G4double x = std::log(bg2) / twoln10;
206 deltam = twoln10 * x - cden;
207 if ( x < x1den ) deltam += aden * std::pow((x1den-x), mden);
208 dedx -= 0.5 * deltam;
212 dedx *= pi_hbarc2_over_mc2 * eDensity * nmpl * nmpl;
214 if (dedx < 0.0) dedx = 0.;
239 siga = std::sqrt(siga);
240 G4double twomeanLoss = meanLoss + meanLoss;
242 if(twomeanLoss < siga) {
246 x = (loss - meanLoss)/siga;
251 loss = G4RandGauss::shoot(meanLoss,siga);
253 }
while (0.0 > loss || loss > twomeanLoss);
270 siga = (tmax/(beta*beta) - 0.5*tcut) * twopi_mc2_rcl2 * length
G4double B(G4double temperature)
G4double G4Log(G4double x)
G4double GetKineticEnergy() const
G4double GetMdensity() const
G4double GetX1density() const
G4double GetX0density() const
G4double GetCdensity() const
G4double GetMeanExcitationEnergy() const
G4double GetAdensity() const
const G4Material * GetMaterial() const
G4IonisParamMat * GetIonisation() const
G4double GetElectronDensity() const
G4double GetPDGMass() const
static G4Pow * GetInstance()
G4double A13(G4double A) const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
std::size_t GetTableSize() const
static G4ProductionCutsTable * GetProductionCutsTable()
void SetHighEnergyLimit(G4double)
G4double LowEnergyLimit() const
G4double HighEnergyLimit() const
void SetLowEnergyLimit(G4double)
const G4MaterialCutsCouple * CurrentCouple() const
G4ParticleChangeForLoss * GetParticleChangeForLoss()
~G4mplIonisationModel() override
G4mplIonisationModel(G4double mCharge, const G4String &nam="mplIonisation")
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override
void SetParticle(const G4ParticleDefinition *p)
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4double SampleFluctuations(const G4MaterialCutsCouple *, const G4DynamicParticle *, const G4double tcut, const G4double tmax, const G4double length, const G4double meanLoss) override
G4double Dispersion(const G4Material *, const G4DynamicParticle *, const G4double tcut, const G4double tmax, const G4double length) override