Geant4  10.02.p03
G4BetheBlochModel Class Reference

#include <G4BetheBlochModel.hh>

Inheritance diagram for G4BetheBlochModel:
Collaboration diagram for G4BetheBlochModel:

Public Member Functions

 G4BetheBlochModel (const G4ParticleDefinition *p=nullptr, const G4String &nam="BetheBloch")
 
virtual ~G4BetheBlochModel ()
 
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &)
 
virtual G4double MinEnergyCut (const G4ParticleDefinition *, const G4MaterialCutsCouple *couple)
 
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)
 
virtual G4double CrossSectionPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
 
virtual G4double ComputeDEDXPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy)
 
virtual G4double GetChargeSquareRatio (const G4ParticleDefinition *p, const G4Material *mat, G4double kineticEnergy)
 
virtual G4double GetParticleCharge (const G4ParticleDefinition *p, const G4Material *mat, G4double kineticEnergy)
 
virtual void CorrectionsAlongStep (const G4MaterialCutsCouple *couple, const G4DynamicParticle *dp, G4double &eloss, G4double &, G4double length)
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle *> *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
 
- Public Member Functions inherited from G4VEmModel
 G4VEmModel (const G4String &nam)
 
virtual ~G4VEmModel ()
 
virtual void InitialiseLocal (const G4ParticleDefinition *, G4VEmModel *masterModel)
 
virtual void InitialiseForMaterial (const G4ParticleDefinition *, const G4Material *)
 
virtual void InitialiseForElement (const G4ParticleDefinition *, G4int Z)
 
virtual G4double GetPartialCrossSection (const G4Material *, G4int, const G4ParticleDefinition *, G4double)
 
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 void StartTracking (G4Track *)
 
virtual G4double Value (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy)
 
virtual G4double MinPrimaryEnergy (const G4Material *, const G4ParticleDefinition *, G4double cut=0.0)
 
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 *> *)
 
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)
 
G4int SelectIsotopeNumber (const G4Element *)
 
const G4ElementSelectRandomAtom (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, 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 *)
 
void SetParticleChange (G4VParticleChange *, G4VEmFluctuationModel *f=0)
 
void SetCrossSectionTable (G4PhysicsTable *, G4bool isLocal)
 
G4ElementDataGetElementData ()
 
G4PhysicsTableGetCrossSectionTable ()
 
G4VEmFluctuationModelGetModelOfFluctuations ()
 
G4VEmAngularDistributionGetAngularDistribution ()
 
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)
 
void SetPolarAngleLimit (G4double)
 
void SetSecondaryThreshold (G4double)
 
void SetLPMFlag (G4bool val)
 
void SetDeexcitationFlag (G4bool val)
 
void SetForceBuildTable (G4bool val)
 
void SetMasterThread (G4bool val)
 
G4bool IsMaster () 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)
 

Protected Member Functions

virtual G4double MaxSecondaryEnergy (const G4ParticleDefinition *, G4double kinEnergy)
 
G4double GetChargeSquareRatio () const
 
void SetChargeSquareRatio (G4double val)
 
- Protected Member Functions inherited from G4VEmModel
G4ParticleChangeForLoss * GetParticleChangeForLoss ()
 
G4ParticleChangeForGamma * GetParticleChangeForGamma ()
 
const G4MaterialCutsCoupleCurrentCouple () const
 
void SetCurrentElement (const G4Element *)
 

Private Member Functions

void SetupParameters ()
 
void SetParticle (const G4ParticleDefinition *p)
 
void SetGenericIon (const G4ParticleDefinition *p)
 
G4BetheBlochModeloperator= (const G4BetheBlochModel &right)
 
 G4BetheBlochModel (const G4BetheBlochModel &)
 

Private Attributes

const G4ParticleDefinitionparticle
 
G4ParticleDefinitiontheElectron
 
G4EmCorrectionscorr
 
G4ParticleChangeForLoss * fParticleChange
 
G4NistManagernist
 
G4double mass
 
G4double tlimit
 
G4double spin
 
G4double magMoment2
 
G4double chargeSquare
 
G4double ratio
 
G4double formfact
 
G4double twoln10
 
G4double bg2lim
 
G4double taulim
 
G4double corrFactor
 
G4bool isIon
 
G4bool isInitialised
 

Additional Inherited Members

- Protected Attributes inherited from G4VEmModel
G4ElementDatafElementData
 
G4VParticleChange * pParticleChange
 
G4PhysicsTablexSectionTable
 
const std::vector< G4double > * theDensityFactor
 
const std::vector< G4int > * theDensityIdx
 
size_t idxTable
 
- Static Protected Attributes inherited from G4VEmModel
static const G4double inveplus = 1.0/CLHEP::eplus
 

Detailed Description

Definition at line 72 of file G4BetheBlochModel.hh.

Constructor & Destructor Documentation

◆ G4BetheBlochModel() [1/2]

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

Definition at line 75 of file G4BetheBlochModel.cc.

77  : G4VEmModel(nam),
78  particle(nullptr),
79  tlimit(DBL_MAX),
80  twoln10(2.0*G4Log(10.0)),
81  bg2lim(0.0169),
82  taulim(8.4146e-3),
83  isIon(false),
84  isInitialised(false)
85 {
86  fParticleChange = nullptr;
88  if(p) {
89  SetGenericIon(p);
90  SetParticle(p);
91  } else {
93  }
97 }
static const double MeV
Definition: G4SIunits.hh:211
static G4LossTableManager * Instance()
static G4NistManager * Instance()
const G4ParticleDefinition * particle
G4VEmModel(const G4String &nam)
Definition: G4VEmModel.cc:69
void SetGenericIon(const G4ParticleDefinition *p)
G4NistManager * nist
G4EmCorrections * corr
G4EmCorrections * EmCorrections()
G4double G4Log(G4double x)
Definition: G4Log.hh:230
void SetParticle(const G4ParticleDefinition *p)
G4ParticleChangeForLoss * fParticleChange
static G4Electron * Electron()
Definition: G4Electron.cc:94
G4ParticleDefinition * theElectron
void SetLowEnergyLimit(G4double)
Definition: G4VEmModel.hh:732
#define DBL_MAX
Definition: templates.hh:83
Here is the call graph for this function:

◆ ~G4BetheBlochModel()

G4BetheBlochModel::~G4BetheBlochModel ( )
virtual

Definition at line 101 of file G4BetheBlochModel.cc.

102 {}

◆ G4BetheBlochModel() [2/2]

G4BetheBlochModel::G4BetheBlochModel ( const G4BetheBlochModel )
private

Member Function Documentation

◆ ComputeCrossSectionPerAtom()

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

Reimplemented from G4VEmModel.

Definition at line 226 of file G4BetheBlochModel.cc.

232 {
234  (p,kineticEnergy,cutEnergy,maxEnergy);
235  return cross;
236 }
Float_t Z
virtual G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:

◆ ComputeCrossSectionPerElectron()

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

Definition at line 189 of file G4BetheBlochModel.cc.

193 {
194  G4double cross = 0.0;
195  G4double tmax = MaxSecondaryEnergy(p, kineticEnergy);
196  G4double maxEnergy = min(tmax,maxKinEnergy);
197  if(cutEnergy < maxEnergy) {
198 
199  G4double totEnergy = kineticEnergy + mass;
200  G4double energy2 = totEnergy*totEnergy;
201  G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/energy2;
202 
203  cross = (maxEnergy - cutEnergy)/(cutEnergy*maxEnergy)
204  - beta2*G4Log(maxEnergy/cutEnergy)/tmax;
205 
206  // +term for spin=1/2 particle
207  if( 0.0 < spin ) { cross += 0.5*(maxEnergy - cutEnergy)/energy2; }
208 
209  // High order correction different for hadrons and ions
210  // nevetheless they are applied to reduce high energy transfers
211  // if(!isIon)
212  //cross += corr->FiniteSizeCorrectionXS(p,currentMaterial,
213  // kineticEnergy,cutEnergy);
214 
215  cross *= twopi_mc2_rcl2*chargeSquare/beta2;
216  }
217 
218  // G4cout << "BB: e= " << kineticEnergy << " tmin= " << cutEnergy
219  // << " tmax= " << tmax << " cross= " << cross << G4endl;
220 
221  return cross;
222 }
int twopi_mc2_rcl2
Definition: hepunit.py:294
virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy)
G4double G4Log(G4double x)
Definition: G4Log.hh:230
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeDEDXPerVolume()

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

Reimplemented from G4VEmModel.

Reimplemented in G4BetheBlochNoDeltaModel.

Definition at line 255 of file G4BetheBlochModel.cc.

259 {
260  G4double tmax = MaxSecondaryEnergy(p, kineticEnergy);
261  G4double cutEnergy = std::min(cut,tmax);
262 
263  G4double tau = kineticEnergy/mass;
264  G4double gam = tau + 1.0;
265  G4double bg2 = tau * (tau+2.0);
266  G4double beta2 = bg2/(gam*gam);
267 
268  G4double eexc = material->GetIonisation()->GetMeanExcitationEnergy();
269  G4double eexc2 = eexc*eexc;
270 
271  G4double eDensity = material->GetElectronDensity();
272 
273  G4double dedx = G4Log(2.0*electron_mass_c2*bg2*cutEnergy/eexc2)
274  - (1.0 + cutEnergy/tmax)*beta2;
275 
276  if(0.0 < spin) {
277  G4double del = 0.5*cutEnergy/(kineticEnergy + mass);
278  dedx += del*del;
279  }
280 
281  // density correction
282  G4double x = G4Log(bg2)/twoln10;
283  dedx -= material->GetIonisation()->DensityCorrection(x);
284 
285  // shell correction
286  dedx -= 2.0*corr->ShellCorrection(p,material,kineticEnergy);
287 
288  // now compute the total ionization loss
289  dedx *= twopi_mc2_rcl2*chargeSquare*eDensity/beta2;
290 
291  //High order correction different for hadrons and ions
292  if(isIon) {
293  dedx += corr->IonBarkasCorrection(p,material,kineticEnergy);
294  } else {
295  dedx += corr->HighOrderCorrections(p,material,kineticEnergy,cutEnergy);
296  }
297 
298  if (dedx < 0.0) { dedx = 0.0; }
299 
300  //G4cout << "E(MeV)= " << kineticEnergy/MeV << " dedx= " << dedx
301  // << " " << material->GetName() << G4endl;
302 
303  return dedx;
304 }
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:226
G4double HighOrderCorrections(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy, G4double cutEnergy)
int twopi_mc2_rcl2
Definition: hepunit.py:294
virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy)
G4EmCorrections * corr
G4double GetMeanExcitationEnergy() const
G4double IonBarkasCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
float electron_mass_c2
Definition: hepunit.py:274
G4double G4Log(G4double x)
Definition: G4Log.hh:230
G4double ShellCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double DensityCorrection(G4double x)
G4double GetElectronDensity() const
Definition: G4Material.hh:217
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CorrectionsAlongStep()

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

Reimplemented from G4VEmModel.

Definition at line 308 of file G4BetheBlochModel.cc.

313 {
314  if(isIon) {
315  const G4ParticleDefinition* p = dp->GetDefinition();
316  const G4Material* mat = couple->GetMaterial();
317  G4double preKinEnergy = dp->GetKineticEnergy();
318  G4double e = preKinEnergy - eloss*0.5;
319  if(e < preKinEnergy*0.75) { e = preKinEnergy*0.75; }
320 
323  G4double qfactor = q2*corr->EffectiveChargeCorrection(p,mat,e)/corrFactor;
324  G4double highOrder = length*corr->IonHighOrderCorrections(p,couple,e);
325  G4double elossnew = eloss*qfactor + highOrder;
326  if(elossnew > preKinEnergy) { elossnew = preKinEnergy; }
327  else if(elossnew < eloss*0.5) { elossnew = eloss*0.5; }
328  eloss = elossnew;
329  //G4cout << "G4BetheBlochModel::CorrectionsAlongStep: e= " << preKinEnergy
330  // << " qfactor= " << qfactor
331  // << " highOrder= " << highOrder << " ("
332  // << highOrder/eloss << ")" << G4endl;
333  }
334 }
const G4Material * GetMaterial() const
G4double EffectiveChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double EffectiveChargeCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4VEmFluctuationModel * GetModelOfFluctuations()
Definition: G4VEmModel.hh:610
G4EmCorrections * corr
Float_t mat
G4double GetKineticEnergy() const
G4double IonHighOrderCorrections(const G4ParticleDefinition *, const G4MaterialCutsCouple *, G4double kineticEnergy)
G4ParticleDefinition * GetDefinition() const
double G4double
Definition: G4Types.hh:76
virtual void SetParticleAndCharge(const G4ParticleDefinition *, G4double q2)
Here is the call graph for this function:

◆ CrossSectionPerVolume()

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

Reimplemented from G4VEmModel.

Reimplemented in G4BetheBlochNoDeltaModel.

Definition at line 240 of file G4BetheBlochModel.cc.

246 {
247  G4double eDensity = material->GetElectronDensity();
249  (p,kineticEnergy,cutEnergy,maxEnergy);
250  return cross;
251 }
G4double GetElectronDensity() const
Definition: G4Material.hh:217
virtual G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:

◆ GetChargeSquareRatio() [1/2]

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

Reimplemented from G4VEmModel.

Definition at line 130 of file G4BetheBlochModel.cc.

133 {
134  // this method is called only for ions
135  G4double q2 = corr->EffectiveChargeSquareRatio(p,mat,kineticEnergy);
136  corrFactor = q2*corr->EffectiveChargeCorrection(p,mat,kineticEnergy);
137  return corrFactor;
138 }
G4double EffectiveChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double EffectiveChargeCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4EmCorrections * corr
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:

◆ GetChargeSquareRatio() [2/2]

G4double G4BetheBlochModel::GetChargeSquareRatio ( ) const
inlineprotected

Definition at line 196 of file G4BetheBlochModel.hh.

197 {
198  return chargeSquare;
199 }

◆ GetParticleCharge()

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

Reimplemented from G4VEmModel.

Reimplemented in G4BetheBlochIonGasModel.

Definition at line 142 of file G4BetheBlochModel.cc.

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

◆ Initialise()

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

Implements G4VEmModel.

Definition at line 106 of file G4BetheBlochModel.cc.

108 {
109  SetGenericIon(p);
110  SetParticle(p);
111 
112  //G4cout << "G4BetheBlochModel::Initialise for " << p->GetParticleName()
113  // << " isIon= " << isIon
114  // << G4endl;
115 
116  // always false before the run
117  SetDeexcitationFlag(false);
118 
119  if(!isInitialised) {
120  isInitialised = true;
124  }
125  }
126 }
G4ParticleChangeForLoss * GetParticleChangeForLoss()
Definition: G4VEmModel.cc:120
G4bool UseAngularGeneratorFlag() const
Definition: G4VEmModel.hh:697
G4VEmAngularDistribution * GetAngularDistribution()
Definition: G4VEmModel.hh:617
void SetGenericIon(const G4ParticleDefinition *p)
void SetParticle(const G4ParticleDefinition *p)
void SetAngularDistribution(G4VEmAngularDistribution *)
Definition: G4VEmModel.hh:624
G4ParticleChangeForLoss * fParticleChange
void SetDeexcitationFlag(G4bool val)
Definition: G4VEmModel.hh:781
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MaxSecondaryEnergy()

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

Reimplemented from G4VEmModel.

Definition at line 454 of file G4BetheBlochModel.cc.

456 {
457  // here particle type is checked for any method
458  SetParticle(pd);
459  G4double tau = kinEnergy/mass;
460  G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /
461  (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);
462  return std::min(tmax,tlimit);
463 }
float electron_mass_c2
Definition: hepunit.py:274
void SetParticle(const G4ParticleDefinition *p)
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MinEnergyCut()

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

Reimplemented from G4VEmModel.

Definition at line 180 of file G4BetheBlochModel.cc.

182 {
183  return couple->GetMaterial()->GetIonisation()->GetMeanExcitationEnergy();
184 }
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:226
const G4Material * GetMaterial() const
G4double GetMeanExcitationEnergy() const
Here is the call graph for this function:

◆ operator=()

G4BetheBlochModel& G4BetheBlochModel::operator= ( const G4BetheBlochModel right)
private

◆ SampleSecondaries()

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

Implements G4VEmModel.

Definition at line 338 of file G4BetheBlochModel.cc.

343 {
344  G4double kineticEnergy = dp->GetKineticEnergy();
345  G4double tmax = MaxSecondaryEnergy(dp->GetDefinition(),kineticEnergy);
346 
347  G4double maxKinEnergy = std::min(maxEnergy,tmax);
348  if(minKinEnergy >= maxKinEnergy) { return; }
349 
350  //G4cout << "G4BetheBlochModel::SampleSecondaries Emin= " << minKinEnergy
351  // << " Emax= " << maxKinEnergy << G4endl;
352 
353  G4double totEnergy = kineticEnergy + mass;
354  G4double etot2 = totEnergy*totEnergy;
355  G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/etot2;
356 
357  G4double deltaKinEnergy, f;
358  G4double f1 = 0.0;
359  G4double fmax = 1.0;
360  if( 0.0 < spin ) { fmax += 0.5*maxKinEnergy*maxKinEnergy/etot2; }
361 
362  CLHEP::HepRandomEngine* rndmEngineMod = G4Random::getTheEngine();
363  G4double rndm[2];
364 
365  // sampling without nuclear size effect
366  do {
367  rndmEngineMod->flatArray(2, rndm);
368  deltaKinEnergy = minKinEnergy*maxKinEnergy
369  /(minKinEnergy*(1.0 - rndm[0]) + maxKinEnergy*rndm[0]);
370 
371  f = 1.0 - beta2*deltaKinEnergy/tmax;
372  if( 0.0 < spin ) {
373  f1 = 0.5*deltaKinEnergy*deltaKinEnergy/etot2;
374  f += f1;
375  }
376 
377  // Loop checking, 03-Aug-2015, Vladimir Ivanchenko
378  } while( fmax*rndm[1] > f);
379 
380  // projectile formfactor - suppresion of high energy
381  // delta-electron production at high energy
382 
383  G4double x = formfact*deltaKinEnergy;
384  if(x > 1.e-6) {
385 
386  G4double x1 = 1.0 + x;
387  G4double grej = 1.0/(x1*x1);
388  if( 0.0 < spin ) {
389  G4double x2 = 0.5*electron_mass_c2*deltaKinEnergy/(mass*mass);
390  grej *= (1.0 + magMoment2*(x2 - f1/f)/(1.0 + x2));
391  }
392  if(grej > 1.1) {
393  G4cout << "### G4BetheBlochModel WARNING: grej= " << grej
394  << " " << dp->GetDefinition()->GetParticleName()
395  << " Ekin(MeV)= " << kineticEnergy
396  << " delEkin(MeV)= " << deltaKinEnergy
397  << G4endl;
398  }
399  if(rndmEngineMod->flat() > grej) { return; }
400  }
401 
402  G4ThreeVector deltaDirection;
403 
405 
406  const G4Material* mat = couple->GetMaterial();
408 
409  deltaDirection =
410  GetAngularDistribution()->SampleDirection(dp, deltaKinEnergy, Z, mat);
411 
412  } else {
413 
414  G4double deltaMomentum =
415  sqrt(deltaKinEnergy * (deltaKinEnergy + 2.0*electron_mass_c2));
416  G4double cost = deltaKinEnergy * (totEnergy + electron_mass_c2) /
417  (deltaMomentum * dp->GetTotalMomentum());
418  if(cost > 1.0) { cost = 1.0; }
419  G4double sint = sqrt((1.0 - cost)*(1.0 + cost));
420 
421  G4double phi = twopi*rndmEngineMod->flat();
422 
423  deltaDirection.set(sint*cos(phi),sint*sin(phi), cost) ;
424  deltaDirection.rotateUz(dp->GetMomentumDirection());
425  }
426  /*
427  G4cout << "### G4BetheBlochModel "
428  << dp->GetDefinition()->GetParticleName()
429  << " Ekin(MeV)= " << kineticEnergy
430  << " delEkin(MeV)= " << deltaKinEnergy
431  << " tmin(MeV)= " << minKinEnergy
432  << " tmax(MeV)= " << maxKinEnergy
433  << " dir= " << dp->GetMomentumDirection()
434  << " dirDelta= " << deltaDirection
435  << G4endl;
436  */
437  // create G4DynamicParticle object for delta ray
438  G4DynamicParticle* delta =
439  new G4DynamicParticle(theElectron,deltaDirection,deltaKinEnergy);
440 
441  vdp->push_back(delta);
442 
443  // Change kinematics of primary particle
444  kineticEnergy -= deltaKinEnergy;
445  G4ThreeVector finalP = dp->GetMomentum() - delta->GetMomentum();
446  finalP = finalP.unit();
447 
448  fParticleChange->SetProposedKineticEnergy(kineticEnergy);
449  fParticleChange->SetProposedMomentumDirection(finalP);
450 }
void set(double x, double y, double z)
Double_t x2[nxs]
const G4Material * GetMaterial() const
G4bool UseAngularGeneratorFlag() const
Definition: G4VEmModel.hh:697
G4VEmAngularDistribution * GetAngularDistribution()
Definition: G4VEmModel.hh:617
G4double GetTotalMomentum() const
virtual double flat()=0
int G4int
Definition: G4Types.hh:78
virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy)
Float_t mat
Float_t f1
G4double GetKineticEnergy() const
G4ThreeVector GetMomentum() const
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
virtual G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, const G4Material *)=0
Float_t Z
Hep3Vector unit() const
Hep3Vector & rotateUz(const Hep3Vector &)
Definition: ThreeVector.cc:38
static const double twopi
Definition: G4SIunits.hh:75
Double_t x1[nxs]
float electron_mass_c2
Definition: hepunit.py:274
const G4ThreeVector & GetMomentumDirection() const
G4ParticleChangeForLoss * fParticleChange
G4ParticleDefinition * GetDefinition() const
#define G4endl
Definition: G4ios.hh:61
G4ParticleDefinition * theElectron
double G4double
Definition: G4Types.hh:76
virtual void flatArray(const int size, double *vect)=0
G4int SelectRandomAtomNumber(const G4Material *)
Definition: G4VEmModel.hh:564
Here is the call graph for this function:

◆ SetChargeSquareRatio()

void G4BetheBlochModel::SetChargeSquareRatio ( G4double  val)
inlineprotected

Definition at line 203 of file G4BetheBlochModel.hh.

204 {
205  chargeSquare = val;
206 }
Here is the caller graph for this function:

◆ SetGenericIon()

void G4BetheBlochModel::SetGenericIon ( const G4ParticleDefinition p)
inlineprivate

Definition at line 187 of file G4BetheBlochModel.hh.

188 {
189  if(p && particle != p) {
190  if(p->GetParticleName() == "GenericIon") { isIon = true; }
191  }
192 }
const G4ParticleDefinition * particle
const G4String & GetParticleName() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetParticle()

void G4BetheBlochModel::SetParticle ( const G4ParticleDefinition p)
inlineprivate

Definition at line 175 of file G4BetheBlochModel.hh.

176 {
177  if(particle != p) {
178  particle = p;
179  if(p->GetBaryonNumber() > 3 || p->GetPDGCharge() > 1.5*CLHEP::eplus)
180  { isIon = true; }
181  SetupParameters();
182  }
183 }
const G4ParticleDefinition * particle
static const double eplus
G4double GetPDGCharge() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetupParameters()

void G4BetheBlochModel::SetupParameters ( )
private

Definition at line 154 of file G4BetheBlochModel.cc.

155 {
156  mass = particle->GetPDGMass();
157  spin = particle->GetPDGSpin();
159  chargeSquare = q*q;
162  G4double magmom =
164  magMoment2 = magmom*magmom - 1.0;
165  formfact = 0.0;
166  if(particle->GetLeptonNumber() == 0) {
167  G4double x = 0.8426*GeV;
168  if(spin == 0.0 && mass < GeV) {x = 0.736*GeV;}
169  else if(mass > GeV) {
171  // tlimit = 51.2*GeV*A13[iz]*A13[iz];
172  }
173  formfact = 2.0*electron_mass_c2/(x*x);
174  tlimit = 2.0/formfact;
175  }
176 }
float c_squared
Definition: hepunit.py:258
G4double GetZ13(G4double Z)
const G4ParticleDefinition * particle
G4NistManager * nist
G4double GetPDGMagneticMoment() const
float proton_mass_c2
Definition: hepunit.py:275
static const double GeV
Definition: G4SIunits.hh:214
float electron_mass_c2
Definition: hepunit.py:274
float hbar_Planck
Definition: hepunit.py:264
double G4double
Definition: G4Types.hh:76
static const double eplus
Definition: G4SIunits.hh:196
G4double GetPDGCharge() const
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ bg2lim

G4double G4BetheBlochModel::bg2lim
private

Definition at line 166 of file G4BetheBlochModel.hh.

◆ chargeSquare

G4double G4BetheBlochModel::chargeSquare
private

Definition at line 162 of file G4BetheBlochModel.hh.

◆ corr

G4EmCorrections* G4BetheBlochModel::corr
private

Definition at line 154 of file G4BetheBlochModel.hh.

◆ corrFactor

G4double G4BetheBlochModel::corrFactor
private

Definition at line 168 of file G4BetheBlochModel.hh.

◆ formfact

G4double G4BetheBlochModel::formfact
private

Definition at line 164 of file G4BetheBlochModel.hh.

◆ fParticleChange

G4ParticleChangeForLoss* G4BetheBlochModel::fParticleChange
private

Definition at line 155 of file G4BetheBlochModel.hh.

◆ isInitialised

G4bool G4BetheBlochModel::isInitialised
private

Definition at line 170 of file G4BetheBlochModel.hh.

◆ isIon

G4bool G4BetheBlochModel::isIon
private

Definition at line 169 of file G4BetheBlochModel.hh.

◆ magMoment2

G4double G4BetheBlochModel::magMoment2
private

Definition at line 161 of file G4BetheBlochModel.hh.

◆ mass

G4double G4BetheBlochModel::mass
private

Definition at line 158 of file G4BetheBlochModel.hh.

◆ nist

G4NistManager* G4BetheBlochModel::nist
private

Definition at line 156 of file G4BetheBlochModel.hh.

◆ particle

const G4ParticleDefinition* G4BetheBlochModel::particle
private

Definition at line 152 of file G4BetheBlochModel.hh.

◆ ratio

G4double G4BetheBlochModel::ratio
private

Definition at line 163 of file G4BetheBlochModel.hh.

◆ spin

G4double G4BetheBlochModel::spin
private

Definition at line 160 of file G4BetheBlochModel.hh.

◆ taulim

G4double G4BetheBlochModel::taulim
private

Definition at line 167 of file G4BetheBlochModel.hh.

◆ theElectron

G4ParticleDefinition* G4BetheBlochModel::theElectron
private

Definition at line 153 of file G4BetheBlochModel.hh.

◆ tlimit

G4double G4BetheBlochModel::tlimit
private

Definition at line 159 of file G4BetheBlochModel.hh.

◆ twoln10

G4double G4BetheBlochModel::twoln10
private

Definition at line 165 of file G4BetheBlochModel.hh.


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