56 out <<
"Continuous process acting on adjoint particles to compute the "
57 "continuous gain of energy of charged particles when they are "
68 fMassRatio = proton_mass_c2 / fDirectPartDef->
GetPDGMass();
90 fDirectEnergyLossProcess->
GetDEDX(fPreStepKinEnergy, fCurrentCouple);
101 if(Tkin != fPreStepKinEnergy && fIsIon)
104 fDirectPartDef, fCurrentMaterial, Tkin);
109 if(dlength <= fLinLossLimit * r)
111 degain = DEDX_before * dlength;
120 fDirectPartDef, fCurrentMaterial, E);
125 constexpr G4int iimax = 100;
126 while(std::abs(x - x1) > 0.01 * x)
130 fDirectPartDef, fCurrentMaterial, E);
133 x1 = fDirectEnergyLossProcess->
GetRange(E, fCurrentCouple);
145 fCurrentTcut = std::min(fCurrentTcut, tmax);
154 if(fLossFluctuationFlag)
157 fCurrentCouple, dynParticle, fCurrentTcut, tmax, dlength, degain)
172 fDirectPartDef, fCurrentMaterial, Tkin);
176 G4double DEDX_after = fDirectEnergyLossProcess->
GetDEDX(Tkin, fCurrentCouple);
177 G4double weight_correction = DEDX_after / DEDX_before;
196 if(val && !fLossFluctuationArePossible)
198 fLossFluctuationFlag = val;
216 fDirectPartDef, fCurrentMaterial, fPreStepKinEnergy);
217 preStepChargeSqRatio = chargeSqRatio;
219 preStepChargeSqRatio);
222 G4double maxE = 1.1 * fPreStepKinEnergy;
224 if(fPreStepKinEnergy < fCurrentTcut)
225 maxE = std::min(fCurrentTcut, maxE);
227 maxE = std::min(emax_model * 1.001, maxE);
230 fDirectEnergyLossProcess->
GetRange(fPreStepKinEnergy, fCurrentCouple);
235 fDirectPartDef, fCurrentMaterial, maxE);
237 chargeSqRatioAtEmax);
244 preStepChargeSqRatio);
246 return std::max(r1 - preStepRange, 0.001 * mm);
250void G4ContinuousGainOfEnergy::SetDynamicMassCharge(
const G4Track&,
255 fDirectPartDef, fCurrentMaterial, energy);
256 if(fDirectEnergyLossProcess)
void SetLossFluctuations(G4bool val)
~G4ContinuousGainOfEnergy() override
void SetDirectParticle(G4ParticleDefinition *p)
G4double GetContinuousStepLimit(const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double ¤tSafety) override
G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &) override
void ProcessDescription(std::ostream &) const override
G4ContinuousGainOfEnergy(const G4String &name="EnergyGain", G4ProcessType type=fElectromagnetic)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
G4double GetKineticEnergy() const
void SetKineticEnergy(G4double aEnergy)
G4double EffectiveChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy)
static G4LossTableManager * Instance()
G4EmCorrections * EmCorrections()
void Initialize(const G4Track &) override
void ProposeEnergy(G4double finalEnergy)
const G4String & GetParticleType() const
G4double GetPDGMass() const
G4double GetWeight() const
G4double GetStepLength() const
G4StepPoint * GetPostStepPoint() const
const G4DynamicParticle * GetDynamicParticle() const
G4double GetKineticEnergy() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
virtual G4double SampleFluctuations(const G4MaterialCutsCouple *, const G4DynamicParticle *, const G4double tcut, const G4double tmax, const G4double length, const G4double meanLoss)=0
G4VEmFluctuationModel * GetModelOfFluctuations()
G4double HighEnergyLimit() const
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple *, const G4DynamicParticle *, const G4double &length, G4double &eloss)
virtual G4double GetChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double MaxSecondaryKinEnergy(const G4DynamicParticle *dynParticle)
G4double GetKineticEnergy(G4double range, const G4MaterialCutsCouple *)
void SetDynamicMassCharge(G4double massratio, G4double charge2ratio)
G4double GetDEDX(G4double kineticEnergy, const G4MaterialCutsCouple *)
G4double GetRange(G4double kineticEnergy, const G4MaterialCutsCouple *)
G4VEmModel * SelectModelForMaterial(G4double kinEnergy, std::size_t &idxCouple) const
void SetParentWeightByProcess(G4bool)
void ProposeParentWeight(G4double finalWeight)
G4ParticleChange aParticleChange