Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4BetheBlochModel Class Reference

#include <G4BetheBlochModel.hh>

+ Inheritance diagram for G4BetheBlochModel:

Public Member Functions

 G4BetheBlochModel (const G4ParticleDefinition *p=nullptr, const G4String &nam="BetheBloch")
 
virtual ~G4BetheBlochModel ()
 
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &) override
 
virtual G4double MinEnergyCut (const G4ParticleDefinition *, const G4MaterialCutsCouple *couple) override
 
virtual G4double ComputeCrossSectionPerElectron (const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
 
virtual G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kineticEnergy, G4double Z, G4double A, G4double cutEnergy, G4double maxEnergy) override
 
virtual G4double CrossSectionPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy) override
 
virtual G4double ComputeDEDXPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override
 
virtual G4double GetChargeSquareRatio (const G4ParticleDefinition *p, const G4Material *mat, G4double kineticEnergy) override
 
virtual G4double GetParticleCharge (const G4ParticleDefinition *p, const G4Material *mat, G4double kineticEnergy) override
 
virtual void CorrectionsAlongStep (const G4MaterialCutsCouple *couple, const G4DynamicParticle *dp, G4double &eloss, G4double &, G4double length) override
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
 
- Public Member Functions inherited from G4VEmModel
 G4VEmModel (const G4String &nam)
 
virtual ~G4VEmModel ()
 
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &)=0
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double tmax=DBL_MAX)=0
 
virtual void InitialiseLocal (const G4ParticleDefinition *, G4VEmModel *masterModel)
 
virtual void InitialiseForMaterial (const G4ParticleDefinition *, const G4Material *)
 
virtual void InitialiseForElement (const G4ParticleDefinition *, G4int Z)
 
virtual G4double ComputeDEDXPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
virtual G4double CrossSectionPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double GetPartialCrossSection (const G4Material *, G4int level, const G4ParticleDefinition *, G4double kineticEnergy)
 
virtual G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double ComputeCrossSectionPerShell (const G4ParticleDefinition *, G4int Z, G4int shellIdx, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double ChargeSquareRatio (const G4Track &)
 
virtual G4double GetChargeSquareRatio (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual G4double GetParticleCharge (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void StartTracking (G4Track *)
 
virtual void CorrectionsAlongStep (const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double &eloss, G4double &niel, G4double length)
 
virtual G4double Value (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy)
 
virtual G4double MinPrimaryEnergy (const G4Material *, const G4ParticleDefinition *, G4double cut=0.0)
 
virtual G4double MinEnergyCut (const G4ParticleDefinition *, const G4MaterialCutsCouple *)
 
virtual void SetupForMaterial (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void DefineForRegion (const G4Region *)
 
virtual void ModelDescription (std::ostream &outFile) const
 
void InitialiseElementSelectors (const G4ParticleDefinition *, const G4DataVector &)
 
std::vector< G4EmElementSelector * > * GetElementSelectors ()
 
void SetElementSelectors (std::vector< G4EmElementSelector * > *)
 
virtual G4double ComputeDEDX (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
G4double CrossSection (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeMeanFreePath (const G4ParticleDefinition *, G4double kineticEnergy, const G4Material *, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, const G4Element *, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectRandomAtom (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectTargetAtom (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double logKineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectRandomAtom (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4int SelectRandomAtomNumber (const G4Material *)
 
G4int SelectIsotopeNumber (const G4Element *)
 
void SetParticleChange (G4VParticleChange *, G4VEmFluctuationModel *f=nullptr)
 
void SetCrossSectionTable (G4PhysicsTable *, G4bool isLocal)
 
G4ElementDataGetElementData ()
 
G4PhysicsTableGetCrossSectionTable ()
 
G4VEmFluctuationModelGetModelOfFluctuations ()
 
G4VEmAngularDistributionGetAngularDistribution ()
 
G4VEmModelGetTripletModel ()
 
void SetTripletModel (G4VEmModel *)
 
void SetAngularDistribution (G4VEmAngularDistribution *)
 
G4double HighEnergyLimit () const
 
G4double LowEnergyLimit () const
 
G4double HighEnergyActivationLimit () const
 
G4double LowEnergyActivationLimit () const
 
G4double PolarAngleLimit () const
 
G4double SecondaryThreshold () const
 
G4bool LPMFlag () const
 
G4bool DeexcitationFlag () const
 
G4bool ForceBuildTableFlag () const
 
G4bool UseAngularGeneratorFlag () const
 
void SetAngularGeneratorFlag (G4bool)
 
void SetHighEnergyLimit (G4double)
 
void SetLowEnergyLimit (G4double)
 
void SetActivationHighEnergyLimit (G4double)
 
void SetActivationLowEnergyLimit (G4double)
 
G4bool IsActive (G4double kinEnergy) const
 
void SetPolarAngleLimit (G4double)
 
void SetSecondaryThreshold (G4double)
 
void SetLPMFlag (G4bool val)
 
void SetDeexcitationFlag (G4bool val)
 
void SetForceBuildTable (G4bool val)
 
void SetFluctuationFlag (G4bool val)
 
void SetMasterThread (G4bool val)
 
G4bool IsMaster () const
 
void SetUseBaseMaterials (G4bool val)
 
G4bool UseBaseMaterials () const
 
G4double MaxSecondaryKinEnergy (const G4DynamicParticle *dynParticle)
 
const G4StringGetName () const
 
void SetCurrentCouple (const G4MaterialCutsCouple *)
 
const G4ElementGetCurrentElement () const
 
const G4IsotopeGetCurrentIsotope () const
 
G4bool IsLocked () const
 
void SetLocked (G4bool)
 
G4VEmModeloperator= (const G4VEmModel &right)=delete
 
 G4VEmModel (const G4VEmModel &)=delete
 

Protected Member Functions

virtual G4double MaxSecondaryEnergy (const G4ParticleDefinition *, G4double kinEnergy) override
 
G4double GetChargeSquareRatio () const
 
void SetChargeSquareRatio (G4double val)
 
- Protected Member Functions inherited from G4VEmModel
G4ParticleChangeForLossGetParticleChangeForLoss ()
 
G4ParticleChangeForGammaGetParticleChangeForGamma ()
 
virtual G4double MaxSecondaryEnergy (const G4ParticleDefinition *, G4double kineticEnergy)
 
const G4MaterialCutsCoupleCurrentCouple () const
 
void SetCurrentElement (const G4Element *)
 

Additional Inherited Members

- Protected Attributes inherited from G4VEmModel
G4ElementDatafElementData
 
G4VParticleChangepParticleChange
 
G4PhysicsTablexSectionTable
 
const G4MaterialpBaseMaterial
 
const std::vector< G4double > * theDensityFactor
 
const std::vector< G4int > * theDensityIdx
 
size_t idxTable
 
G4bool lossFlucFlag
 
G4double inveplus
 
G4double pFactor
 

Detailed Description

Definition at line 62 of file G4BetheBlochModel.hh.

Constructor & Destructor Documentation

◆ G4BetheBlochModel()

G4BetheBlochModel::G4BetheBlochModel ( const G4ParticleDefinition p = nullptr,
const G4String nam = "BetheBloch" 
)
explicit

Definition at line 74 of file G4BetheBlochModel.cc.

76 : G4VEmModel(nam),
77 particle(nullptr),
78 fICRU90(nullptr),
79 currentMaterial(nullptr),
80 baseMaterial(nullptr),
81 tlimit(DBL_MAX),
82 twoln10(2.0*G4Log(10.0)),
83 fAlphaTlimit(CLHEP::GeV),
84 fProtonTlimit(10*CLHEP::GeV),
85 iICRU90(-1),
86 isIon(false)
87{
88 fParticleChange = nullptr;
89 theElectron = G4Electron::Electron();
90 SetParticle(theElectron);
93 SetLowEnergyLimit(2.0*MeV);
94}
G4double G4Log(G4double x)
Definition: G4Log.hh:226
static G4Electron * Electron()
Definition: G4Electron.cc:93
static G4LossTableManager * Instance()
G4EmCorrections * EmCorrections()
static G4NistManager * Instance()
void SetLowEnergyLimit(G4double)
Definition: G4VEmModel.hh:764
#define DBL_MAX
Definition: templates.hh:62

◆ ~G4BetheBlochModel()

G4BetheBlochModel::~G4BetheBlochModel ( )
virtual

Definition at line 98 of file G4BetheBlochModel.cc.

99{}

Member Function Documentation

◆ ComputeCrossSectionPerAtom()

G4double G4BetheBlochModel::ComputeCrossSectionPerAtom ( const G4ParticleDefinition p,
G4double  kineticEnergy,
G4double  Z,
G4double  A,
G4double  cutEnergy,
G4double  maxEnergy 
)
overridevirtual

Reimplemented from G4VEmModel.

Definition at line 223 of file G4BetheBlochModel.cc.

229{
230 return
231 Z*ComputeCrossSectionPerElectron(p,kineticEnergy,cutEnergy,maxEnergy);
232}
virtual G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)

◆ ComputeCrossSectionPerElectron()

G4double G4BetheBlochModel::ComputeCrossSectionPerElectron ( const G4ParticleDefinition p,
G4double  kineticEnergy,
G4double  cutEnergy,
G4double  maxEnergy 
)
virtual

Definition at line 192 of file G4BetheBlochModel.cc.

196{
197 G4double cross = 0.0;
198 G4double tmax = MaxSecondaryEnergy(p, kineticEnergy);
199 G4double maxEnergy = std::min(tmax,maxKinEnergy);
200 if(cutEnergy < maxEnergy) {
201
202 G4double totEnergy = kineticEnergy + mass;
203 G4double energy2 = totEnergy*totEnergy;
204 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/energy2;
205
206 cross = (maxEnergy - cutEnergy)/(cutEnergy*maxEnergy)
207 - beta2*G4Log(maxEnergy/cutEnergy)/tmax;
208
209 // +term for spin=1/2 particle
210 if( 0.0 < spin ) { cross += 0.5*(maxEnergy - cutEnergy)/energy2; }
211
212 cross *= twopi_mc2_rcl2*chargeSquare/beta2;
213 }
214
215 // G4cout << "BB: e= " << kineticEnergy << " tmin= " << cutEnergy
216 // << " tmax= " << tmax << " cross= " << cross << G4endl;
217
218 return cross;
219}
double G4double
Definition: G4Types.hh:83
virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy) override

Referenced by ComputeCrossSectionPerAtom(), and CrossSectionPerVolume().

◆ ComputeDEDXPerVolume()

G4double G4BetheBlochModel::ComputeDEDXPerVolume ( const G4Material material,
const G4ParticleDefinition p,
G4double  kineticEnergy,
G4double  cutEnergy 
)
overridevirtual

Reimplemented from G4VEmModel.

Reimplemented in G4BetheBlochNoDeltaModel.

Definition at line 249 of file G4BetheBlochModel.cc.

253{
254 G4double tmax = MaxSecondaryEnergy(p, kineticEnergy);
255 G4double cutEnergy = std::min(cut,tmax);
256
257 G4double tau = kineticEnergy/mass;
258 G4double gam = tau + 1.0;
259 G4double bg2 = tau * (tau+2.0);
260 G4double beta2 = bg2/(gam*gam);
261 G4double xc = cutEnergy/tmax;
262
263 G4double eexc = material->GetIonisation()->GetMeanExcitationEnergy();
264 G4double eexc2 = eexc*eexc;
265
266 G4double eDensity = material->GetElectronDensity();
267
268 // added ICRU90 stopping data for limited list of materials
269 if(fICRU90) {
270 if(material != currentMaterial) {
271 currentMaterial = material;
272 baseMaterial = material->GetBaseMaterial()
273 ? material->GetBaseMaterial() : material;
274 iICRU90 = fICRU90->GetIndex(baseMaterial);
275 }
276 if(iICRU90 >= 0) {
277 G4double e = kineticEnergy*proton_mass_c2/mass;
278 G4double dedx = 0.0;
279 if(chargeSquare > 1.1 && e < fAlphaTlimit) {
280 dedx = fICRU90->GetElectronicDEDXforAlpha(iICRU90, e)
281 *material->GetDensity()*0.25;
282 } else if(chargeSquare < 1.1 && e < fProtonTlimit) {
283 dedx = fICRU90->GetElectronicDEDXforProton(iICRU90, e)
284 *material->GetDensity();
285 }
286 if(cutEnergy < tmax) {
287 dedx += (G4Log(xc) + (1.0 - xc)*beta2)*twopi_mc2_rcl2
288 *eDensity/beta2;
289 return std::max(chargeSquare*dedx, 0.0);
290 }
291 }
292 }
293 // general Bethe-Bloch formula
294 G4double dedx = G4Log(2.0*electron_mass_c2*bg2*cutEnergy/eexc2)
295 - (1.0 + xc)*beta2;
296
297 if(0.0 < spin) {
298 G4double del = 0.5*cutEnergy/(kineticEnergy + mass);
299 dedx += del*del;
300 }
301
302 // density correction
303 G4double x = G4Log(bg2)/twoln10;
304 dedx -= material->GetIonisation()->DensityCorrection(x);
305
306 // shell correction
307 dedx -= 2.0*corr->ShellCorrection(p,material,kineticEnergy);
308
309 // now compute the total ionization loss
310 dedx *= twopi_mc2_rcl2*chargeSquare*eDensity/beta2;
311
312 //High order correction different for hadrons and ions
313 if(isIon) {
314 dedx += corr->IonBarkasCorrection(p,material,kineticEnergy);
315 } else {
316 dedx += corr->HighOrderCorrections(p,material,kineticEnergy,cutEnergy);
317 }
318
319 dedx = std::max(dedx, 0.0);
320
321 //G4cout << "E(MeV)= " << kineticEnergy/MeV << " dedx= " << dedx
322 // << " " << material->GetName() << G4endl;
323
324 return dedx;
325}
G4double IonBarkasCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double HighOrderCorrections(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy, G4double cutEnergy)
G4double ShellCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double GetElectronicDEDXforProton(const G4Material *, G4double kinEnergy) const
G4int GetIndex(const G4Material *) const
G4double GetElectronicDEDXforAlpha(const G4Material *, G4double scaledKinEnergy) const
G4double GetMeanExcitationEnergy() const
G4double DensityCorrection(G4double x)
G4double GetDensity() const
Definition: G4Material.hh:178
const G4Material * GetBaseMaterial() const
Definition: G4Material.hh:231
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:224
G4double GetElectronDensity() const
Definition: G4Material.hh:215

Referenced by G4BetheBlochNoDeltaModel::ComputeDEDXPerVolume().

◆ CorrectionsAlongStep()

void G4BetheBlochModel::CorrectionsAlongStep ( const G4MaterialCutsCouple couple,
const G4DynamicParticle dp,
G4double eloss,
G4double ,
G4double  length 
)
overridevirtual

Reimplemented from G4VEmModel.

Definition at line 329 of file G4BetheBlochModel.cc.

334{
335 if(isIon) {
336 const G4Material* mat = couple->GetMaterial();
337 const G4ParticleDefinition* p = dp->GetDefinition();
338 G4double preKinEnergy = dp->GetKineticEnergy();
339 G4double e = preKinEnergy - eloss*0.5;
340 if(e < preKinEnergy*0.75) { e = preKinEnergy*0.75; }
341
342 G4double q2 = corr->EffectiveChargeSquareRatio(p,mat,e);
344 G4double qfactor = q2*corr->EffectiveChargeCorrection(p,mat,e)/corrFactor;
345
346 // no high order correction for ICRU90 data
347 baseMaterial = mat->GetBaseMaterial() ? mat->GetBaseMaterial() : mat;
348 G4double highOrder = 0.0;
349 if(!fICRU90 || fICRU90->GetIndex(baseMaterial) < 0) {
350 highOrder = length*corr->IonHighOrderCorrections(p,couple,e);
351 }
352 G4double elossnew = eloss*qfactor + highOrder;
353 eloss = std::max(std::min(elossnew,preKinEnergy),eloss*0.5);
354 //G4cout << "G4BetheBlochModel::CorrectionsAlongStep: e= " << preKinEnergy
355 // << " qfactor= " << qfactor
356 // << " highOrder= " << highOrder << " ("
357 // << highOrder/eloss << ")" << G4endl;
358 }
359}
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
G4double EffectiveChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double IonHighOrderCorrections(const G4ParticleDefinition *, const G4MaterialCutsCouple *, G4double kineticEnergy)
G4double EffectiveChargeCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
const G4Material * GetMaterial() const
virtual void SetParticleAndCharge(const G4ParticleDefinition *, G4double q2)
G4VEmFluctuationModel * GetModelOfFluctuations()
Definition: G4VEmModel.hh:604

◆ CrossSectionPerVolume()

G4double G4BetheBlochModel::CrossSectionPerVolume ( const G4Material material,
const G4ParticleDefinition p,
G4double  kineticEnergy,
G4double  cutEnergy,
G4double  maxEnergy 
)
overridevirtual

Reimplemented from G4VEmModel.

Reimplemented in G4BetheBlochNoDeltaModel.

Definition at line 236 of file G4BetheBlochModel.cc.

242{
243 return material->GetElectronDensity()
244 *ComputeCrossSectionPerElectron(p,kineticEnergy,cutEnergy,maxEnergy);
245}

◆ GetChargeSquareRatio() [1/2]

G4double G4BetheBlochModel::GetChargeSquareRatio ( ) const
inlineprotected

Definition at line 189 of file G4BetheBlochModel.hh.

190{
191 return chargeSquare;
192}

◆ GetChargeSquareRatio() [2/2]

G4double G4BetheBlochModel::GetChargeSquareRatio ( const G4ParticleDefinition p,
const G4Material mat,
G4double  kineticEnergy 
)
overridevirtual

Reimplemented from G4VEmModel.

Definition at line 131 of file G4BetheBlochModel.cc.

134{
135 // this method is called only for ions
136 G4double q2 = corr->EffectiveChargeSquareRatio(p,mat,kineticEnergy);
137 corrFactor = q2*corr->EffectiveChargeCorrection(p,mat,kineticEnergy);
138 return corrFactor;
139}

◆ GetParticleCharge()

G4double G4BetheBlochModel::GetParticleCharge ( const G4ParticleDefinition p,
const G4Material mat,
G4double  kineticEnergy 
)
overridevirtual

Reimplemented from G4VEmModel.

Reimplemented in G4BetheBlochIonGasModel.

Definition at line 143 of file G4BetheBlochModel.cc.

146{
147 //G4cout<<"G4BetheBlochModel::GetParticleCharge e= "<<kineticEnergy <<
148 // " q= " << corr->GetParticleCharge(p,mat,kineticEnergy) <<G4endl;
149 // this method is called only for ions, so no check if it is an ion
150 return corr->GetParticleCharge(p,mat,kineticEnergy);
151}
G4double GetParticleCharge(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)

◆ Initialise()

void G4BetheBlochModel::Initialise ( const G4ParticleDefinition p,
const G4DataVector  
)
overridevirtual

Implements G4VEmModel.

Definition at line 103 of file G4BetheBlochModel.cc.

105{
106 SetGenericIon(p);
107 SetParticle(p);
108
109 //G4cout << "G4BetheBlochModel::Initialise for " << p->GetParticleName()
110 // << " isIon= " << isIon
111 // << G4endl;
112
113 // always false before the run
114 SetDeexcitationFlag(false);
115
116 if(IsMaster() && G4EmParameters::Instance()->UseICRU90Data()) {
117 if(!fICRU90) { fICRU90 = nist->GetICRU90StoppingData(); }
118 else if(particle->GetPDGMass() < GeV) { fICRU90->Initialise(); }
119 }
120
121 if(nullptr == fParticleChange) {
122 fParticleChange = GetParticleChangeForLoss();
125 }
126 }
127}
static G4EmParameters * Instance()
G4ICRU90StoppingData * GetICRU90StoppingData()
G4VEmAngularDistribution * GetAngularDistribution()
Definition: G4VEmModel.hh:611
G4bool IsMaster() const
Definition: G4VEmModel.hh:736
void SetDeexcitationFlag(G4bool val)
Definition: G4VEmModel.hh:813
void SetAngularDistribution(G4VEmAngularDistribution *)
Definition: G4VEmModel.hh:618
G4bool UseAngularGeneratorFlag() const
Definition: G4VEmModel.hh:708
G4ParticleChangeForLoss * GetParticleChangeForLoss()
Definition: G4VEmModel.cc:118

◆ MaxSecondaryEnergy()

G4double G4BetheBlochModel::MaxSecondaryEnergy ( const G4ParticleDefinition pd,
G4double  kinEnergy 
)
overrideprotectedvirtual

Reimplemented from G4VEmModel.

Definition at line 479 of file G4BetheBlochModel.cc.

481{
482 // here particle type is checked for any method
483 SetParticle(pd);
484 G4double tau = kinEnergy/mass;
485 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /
486 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);
487 return std::min(tmax,tlimit);
488}

Referenced by ComputeCrossSectionPerElectron(), ComputeDEDXPerVolume(), and SampleSecondaries().

◆ MinEnergyCut()

G4double G4BetheBlochModel::MinEnergyCut ( const G4ParticleDefinition ,
const G4MaterialCutsCouple couple 
)
overridevirtual

Reimplemented from G4VEmModel.

Definition at line 183 of file G4BetheBlochModel.cc.

185{
187}

◆ SampleSecondaries()

void G4BetheBlochModel::SampleSecondaries ( std::vector< G4DynamicParticle * > *  vdp,
const G4MaterialCutsCouple couple,
const G4DynamicParticle dp,
G4double  tmin,
G4double  maxEnergy 
)
overridevirtual

Implements G4VEmModel.

Definition at line 363 of file G4BetheBlochModel.cc.

368{
369 G4double kineticEnergy = dp->GetKineticEnergy();
370 G4double tmax = MaxSecondaryEnergy(dp->GetDefinition(),kineticEnergy);
371
372 G4double maxKinEnergy = std::min(maxEnergy,tmax);
373 if(minKinEnergy >= maxKinEnergy) { return; }
374
375 //G4cout << "G4BetheBlochModel::SampleSecondaries Emin= " << minKinEnergy
376 // << " Emax= " << maxKinEnergy << G4endl;
377
378 G4double totEnergy = kineticEnergy + mass;
379 G4double etot2 = totEnergy*totEnergy;
380 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/etot2;
381
382 G4double deltaKinEnergy, f;
383 G4double f1 = 0.0;
384 G4double fmax = 1.0;
385 if( 0.0 < spin ) { fmax += 0.5*maxKinEnergy*maxKinEnergy/etot2; }
386
387 CLHEP::HepRandomEngine* rndmEngineMod = G4Random::getTheEngine();
388 G4double rndm[2];
389
390 // sampling without nuclear size effect
391 do {
392 rndmEngineMod->flatArray(2, rndm);
393 deltaKinEnergy = minKinEnergy*maxKinEnergy
394 /(minKinEnergy*(1.0 - rndm[0]) + maxKinEnergy*rndm[0]);
395
396 f = 1.0 - beta2*deltaKinEnergy/tmax;
397 if( 0.0 < spin ) {
398 f1 = 0.5*deltaKinEnergy*deltaKinEnergy/etot2;
399 f += f1;
400 }
401
402 // Loop checking, 03-Aug-2015, Vladimir Ivanchenko
403 } while( fmax*rndm[1] > f);
404
405 // projectile formfactor - suppresion of high energy
406 // delta-electron production at high energy
407
408 G4double x = formfact*deltaKinEnergy*(deltaKinEnergy + 2*electron_mass_c2);
409 if(x > 1.e-6) {
410
411 G4double x1 = 1.0 + x;
412 G4double grej = 1.0/(x1*x1);
413 if( 0.0 < spin ) {
414 G4double x2 = 0.5*electron_mass_c2*deltaKinEnergy/(mass*mass);
415 grej *= (1.0 + magMoment2*(x2 - f1/f)/(1.0 + x2));
416 }
417 if(grej > 1.1) {
418 G4cout << "### G4BetheBlochModel WARNING: grej= " << grej
419 << " " << dp->GetDefinition()->GetParticleName()
420 << " Ekin(MeV)= " << kineticEnergy
421 << " delEkin(MeV)= " << deltaKinEnergy
422 << G4endl;
423 }
424 if(rndmEngineMod->flat() > grej) { return; }
425 }
426
427 G4ThreeVector deltaDirection;
428
430
431 const G4Material* mat = couple->GetMaterial();
433
434 deltaDirection =
435 GetAngularDistribution()->SampleDirection(dp, deltaKinEnergy, Z, mat);
436
437 } else {
438
439 G4double deltaMomentum =
440 sqrt(deltaKinEnergy * (deltaKinEnergy + 2.0*electron_mass_c2));
441 G4double cost = deltaKinEnergy * (totEnergy + electron_mass_c2) /
442 (deltaMomentum * dp->GetTotalMomentum());
443 if(cost > 1.0) { cost = 1.0; }
444 G4double sint = sqrt((1.0 - cost)*(1.0 + cost));
445
446 G4double phi = twopi*rndmEngineMod->flat();
447
448 deltaDirection.set(sint*cos(phi),sint*sin(phi), cost) ;
449 deltaDirection.rotateUz(dp->GetMomentumDirection());
450 }
451 /*
452 G4cout << "### G4BetheBlochModel "
453 << dp->GetDefinition()->GetParticleName()
454 << " Ekin(MeV)= " << kineticEnergy
455 << " delEkin(MeV)= " << deltaKinEnergy
456 << " tmin(MeV)= " << minKinEnergy
457 << " tmax(MeV)= " << maxKinEnergy
458 << " dir= " << dp->GetMomentumDirection()
459 << " dirDelta= " << deltaDirection
460 << G4endl;
461 */
462 // create G4DynamicParticle object for delta ray
463 G4DynamicParticle* delta =
464 new G4DynamicParticle(theElectron,deltaDirection,deltaKinEnergy);
465
466 vdp->push_back(delta);
467
468 // Change kinematics of primary particle
469 kineticEnergy -= deltaKinEnergy;
470 G4ThreeVector finalP = dp->GetMomentum() - delta->GetMomentum();
471 finalP = finalP.unit();
472
473 fParticleChange->SetProposedKineticEnergy(kineticEnergy);
474 fParticleChange->SetProposedMomentumDirection(finalP);
475}
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
Hep3Vector unit() const
void set(double x, double y, double z)
Hep3Vector & rotateUz(const Hep3Vector &)
Definition: ThreeVector.cc:33
virtual double flat()=0
virtual void flatArray(const int size, double *vect)=0
const G4ThreeVector & GetMomentumDirection() const
G4ThreeVector GetMomentum() const
G4double GetTotalMomentum() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void SetProposedMomentumDirection(const G4ThreeVector &dir)
const G4String & GetParticleName() const
virtual G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, const G4Material *)=0
G4int SelectRandomAtomNumber(const G4Material *)
Definition: G4VEmModel.cc:315

◆ SetChargeSquareRatio()

void G4BetheBlochModel::SetChargeSquareRatio ( G4double  val)
inlineprotected

Definition at line 196 of file G4BetheBlochModel.hh.

197{
198 chargeSquare = val;
199}

Referenced by G4BetheBlochIonGasModel::ChargeSquareRatio().


The documentation for this class was generated from the following files: