85 adjointPrimKinEnergy, projectileKinEnergy,
92 G4double projectileTotalEnergy = projectileM0 + projectileKinEnergy;
94 projectileTotalEnergy * projectileTotalEnergy - projectileM0 * projectileM0;
103 companionM0 + projectileKinEnergy - adjointPrimKinEnergy;
105 companionTotalEnergy * companionTotalEnergy - companionM0 * companionM0;
109 (adjointPrimP * adjointPrimP + projectileP2 - companionP2) /
111 G4double P_perp = std::sqrt(projectileP2 - P_parallel * P_parallel);
115 G4ThreeVector(P_perp * std::cos(phi), P_perp * std::sin(phi), P_parallel);
116 projectileMomentum.
rotateUz(dir_parallel);
118 if(!isScatProjToProj)
141 G4double kinEnergyProjScaled = fMassRatio * kinEnergyProj;
145 if(kinEnergyProj > Emin_proj && kinEnergyProj <= Emax_proj)
150 G4double E2 = kinEnergyProd * 1.000001;
154 if(kinEnergyProjScaled > 2. * MeV && !fUseOnlyBragg)
161 dSigmadEprod = (sigma1 - sigma2) / dE;
163 if(dSigmadEprod > 1.)
165 G4cout <<
"sigma1 " << kinEnergyProj / MeV <<
'\t' << kinEnergyProd / MeV
166 <<
'\t' << sigma1 <<
G4endl;
167 G4cout <<
"sigma2 " << kinEnergyProj / MeV <<
'\t' << kinEnergyProd / MeV
168 <<
'\t' << sigma2 <<
G4endl;
169 G4cout <<
"dsigma " << kinEnergyProj / MeV <<
'\t' << kinEnergyProd / MeV
170 <<
'\t' << dSigmadEprod <<
G4endl;
181 G4double deltaKinEnergy = kinEnergyProd;
183 G4double x = fFormFact * deltaKinEnergy;
186 G4double totEnergy = kinEnergyProj + fMass;
187 G4double etot2 = totEnergy * totEnergy;
188 G4double beta2 = kinEnergyProj * (kinEnergyProj + 2.0 * fMass) / etot2;
190 G4double f = 1.0 - beta2 * deltaKinEnergy / Tmax;
193 f1 = 0.5 * deltaKinEnergy * deltaKinEnergy / etot2;
201 0.5 * electron_mass_c2 * deltaKinEnergy / (fMass * fMass);
202 gg *= (1.0 + fMagMoment2 * (x2 - f1 / f) / (1.0 + x2));
206 G4cout <<
"### G4BetheBlochModel in Adjoint Sim WARNING: gg= " << gg
224 DefineProjectileProperty();
245 G4double kinEnergyProjScaled = fMassRatio * projectileKinEnergy;
247 if(kinEnergyProjScaled > 2. * MeV && !fUseOnlyBragg)
252 if(fChargeSquare > 1.)
262 new_weight *= CorrectFwdCS / UsedFwdCS;
270 new_weight *= projectileKinEnergy / adjointPrimKinEnergy;
278void G4AdjointIonIonisationModel::DefineProjectileProperty()
287 fChargeSquare = q * q;
288 fRatio = electron_mass_c2 / fMass;
289 fOnePlusRatio2 = (1. + fRatio) * (1. + fRatio);
290 fOneMinusRatio2 = (1. - fRatio) * (1. - fRatio);
292 (0.5 * eplus * hbar_Planck * c_squared);
293 fMagMoment2 = magmom * magmom - 1.0;
297 if(fSpin == 0.0 && fMass < GeV)
305 fFormFact = 2.0 * electron_mass_c2 / (x * x);
313 return primAdjEnergy * fOnePlusRatio2 /
314 (fOneMinusRatio2 - 2. * fRatio * primAdjEnergy / fMass);
321 return primAdjEnergy + tcut;
335 return (2. * primAdjEnergy - 4. * fMass +
336 std::sqrt(4. * primAdjEnergy * primAdjEnergy + 16. * fMass * fMass +
337 8. * primAdjEnergy * fMass * (1. / fRatio + fRatio))) /
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
Hep3Vector & rotateUz(const Hep3Vector &)
G4double GetPostStepWeightCorrection()
static G4AdjointCSManager * GetAdjointCSManager()
static G4AdjointElectron * AdjointElectron()
G4AdjointIonIonisationModel()
void CorrectPostStepWeight(G4ParticleChange *fParticleChange, G4double old_weight, G4double adjointPrimKinEnergy, G4double projectileKinEnergy, G4bool isScatProjToProj) override
G4double DiffCrossSectionPerAtomPrimToSecond(G4double kinEnergyProj, G4double kinEnergyProd, G4double Z, G4double A=0.) override
G4double GetSecondAdjEnergyMaxForProdToProj(G4double primAdjEnergy) override
void SampleSecondaries(const G4Track &aTrack, G4bool isScatProjToProj, G4ParticleChange *fParticleChange) override
~G4AdjointIonIonisationModel() override
G4double GetSecondAdjEnergyMinForProdToProj(G4double primAdjEnergy) override
G4double GetSecondAdjEnergyMaxForScatProjToProj(G4double primAdjEnergy) override
void SetIon(G4ParticleDefinition *adj_ion, G4ParticleDefinition *fwd_ion)
G4double GetSecondAdjEnergyMinForScatProjToProj(G4double primAdjEnergy, G4double tcut=0.) override
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
G4double GetTotalMomentum() const
static G4GenericIon * GenericIon()
G4double GetZ13(G4double Z) const
static G4NistManager * Instance()
void AddSecondary(G4Track *aSecondary)
void ProposeEnergy(G4double finalEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
G4double GetPDGMagneticMoment() const
G4double GetPDGMass() const
G4int GetLeptonNumber() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
G4double GetPDGSpin() const
G4double GetWeight() const
const G4DynamicParticle * GetDynamicParticle() const
G4bool fSecondPartSameType
G4double fCsBiasingFactor
G4ParticleDefinition * fAdjEquivDirectSecondPart
G4ParticleDefinition * fAdjEquivDirectPrimPart
G4Material * fCurrentMaterial
G4bool fUseMatrixPerElement
G4VEmModel * fDirectModel
G4ParticleDefinition * fDirectPrimaryPart
G4bool fOneMatrixForAllElements
G4double SampleAdjSecEnergyFromCSMatrix(std::size_t MatrixIndex, G4double prim_energy, G4bool isScatProjToProj)
G4double GetHighEnergyLimit()
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
virtual G4double GetChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
void ProposeTrackStatus(G4TrackStatus status)
void SetSecondaryWeightByProcess(G4bool)
void SetParentWeightByProcess(G4bool)
void ProposeParentWeight(G4double finalWeight)