154 for (
size_t i=0;i<
n;i++) {
163 degain = DEDX_before*dlength;
176 const G4int iimax = 100;
177 while (std::abs(x-x1)>0.01*x) {
183 if(ii >= iimax) {
break; }
211 SampleFluctuations(
currentCouple,dynParticle,tmax,dlength,degain)-degain;
215 if (egain <=0) egain=degain;
235 G4double weight_correction=DEDX_after/DEDX_before;
295 maxE=
std::min(emax_model*1.001,maxE);
G4double GetKineticEnergy() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4ContinuousGainOfEnergy(const G4String &name="EnergyGain", G4ProcessType type=fElectromagnetic)
G4double GetRange(G4double &kineticEnergy, const G4MaterialCutsCouple *)
G4double preStepChargeSqRatio
G4double GetDEDX(G4double &kineticEnergy, const G4MaterialCutsCouple *)
G4ParticleDefinition * theDirectPartDef
virtual ~G4ContinuousGainOfEnergy()
void SetKineticEnergy(G4double aEnergy)
void SetDirectParticle(G4ParticleDefinition *p)
static constexpr double mm
G4double MaxSecondaryKinEnergy(const G4DynamicParticle *dynParticle)
virtual G4double GetChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
Float_t x1[n_points_granero]
G4double preStepScaledKinEnergy
size_t currentMaterialIndex
const G4String & GetParticleType() const
G4double preStepKinEnergy
G4double GetPDGCharge() const
virtual G4double GetContinuousStepLimit(const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double ¤tSafety)
void SetDynamicMassCharge(G4double massratio, G4double charge2ratio)
G4double EffectiveChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double GetPDGMass() const
G4ParticleChange aParticleChange
static constexpr double proton_mass_c2
G4EmCorrections * EmCorrections()
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
virtual void Initialize(const G4Track &)
const G4MaterialCutsCouple * currentCouple
G4double GetStepLength() const
G4VEmFluctuationModel * GetModelOfFluctuations()
void SetLossFluctuations(G4bool val)
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double &eloss, G4double &niel, G4double length)
G4bool lossFluctuationArePossible
G4double GetKineticEnergy(G4double &range, const G4MaterialCutsCouple *)
G4VEmModel * currentModel
G4StepPoint * GetPostStepPoint() const
void ProposeEnergy(G4double finalEnergy)
void PreparePhysicsTable(const G4ParticleDefinition &)
size_t currentCoupleIndex
void SetParentWeightByProcess(G4bool)
G4bool lossFluctuationFlag
void ProposeParentWeight(G4double finalWeight)
G4double GetKineticEnergy() const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
G4VEnergyLossProcess * theDirectEnergyLossProcess
static G4LossTableManager * Instance()
void BuildPhysicsTable(const G4ParticleDefinition &)
void DefineMaterial(const G4MaterialCutsCouple *couple)
G4double GetWeight() const
G4VEmModel * SelectModelForMaterial(G4double kinEnergy, size_t &idx) const
G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &)
G4double HighEnergyLimit() const
G4double currentCutInRange
const G4Material * currentMaterial
const G4DynamicParticle * GetDynamicParticle() const
void SetDynamicMassCharge(const G4Track &track, G4double energy)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments