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

#include <G4LindhardSorensenIonModel.hh>

+ Inheritance diagram for G4LindhardSorensenIonModel:

Public Member Functions

 G4LindhardSorensenIonModel (const G4ParticleDefinition *p=nullptr, const G4String &nam="LindhardSorensen")
 
 ~G4LindhardSorensenIonModel () override
 
void Initialise (const G4ParticleDefinition *, const G4DataVector &) override
 
G4double MinEnergyCut (const G4ParticleDefinition *, const G4MaterialCutsCouple *couple) override
 
G4double ComputeCrossSectionPerElectron (const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
 
G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kineticEnergy, G4double Z, G4double A, G4double cutEnergy, G4double maxEnergy) override
 
G4double CrossSectionPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy) override
 
G4double ComputeDEDXPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override
 
G4double GetChargeSquareRatio (const G4ParticleDefinition *p, const G4Material *mat, G4double kineticEnergy) override
 
G4double GetParticleCharge (const G4ParticleDefinition *p, const G4Material *mat, G4double kineticEnergy) override
 
void CorrectionsAlongStep (const G4MaterialCutsCouple *couple, const G4DynamicParticle *dp, const G4double &length, G4double &eloss) override
 
void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
 
G4LindhardSorensenIonModeloperator= (const G4LindhardSorensenIonModel &right)=delete
 
 G4LindhardSorensenIonModel (const G4LindhardSorensenIonModel &)=delete
 
- 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 *, const G4double &length, G4double &eloss)
 
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 FillNumberOfSecondaries (G4int &numberOfTriplets, G4int &numberOfRecoil)
 
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)
 
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)
 
const G4ElementGetCurrentElement (const G4Material *mat=nullptr) const
 
G4int SelectRandomAtomNumber (const G4Material *) const
 
const G4IsotopeGetCurrentIsotope (const G4Element *elm=nullptr) const
 
G4int SelectIsotopeNumber (const G4Element *) const
 
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 *)
 
G4bool IsLocked () const
 
void SetLocked (G4bool)
 
G4VEmModeloperator= (const G4VEmModel &right)=delete
 
 G4VEmModel (const G4VEmModel &)=delete
 

Protected Member Functions

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 = nullptr
 
G4VParticleChangepParticleChange = nullptr
 
G4PhysicsTablexSectionTable = nullptr
 
const G4MaterialpBaseMaterial = nullptr
 
const std::vector< G4double > * theDensityFactor = nullptr
 
const std::vector< G4int > * theDensityIdx = nullptr
 
G4double inveplus
 
G4double pFactor = 1.0
 
size_t currentCoupleIndex = 0
 
size_t basedCoupleIndex = 0
 
G4bool lossFlucFlag = true
 

Detailed Description

Definition at line 62 of file G4LindhardSorensenIonModel.hh.

Constructor & Destructor Documentation

◆ G4LindhardSorensenIonModel() [1/2]

G4LindhardSorensenIonModel::G4LindhardSorensenIonModel ( const G4ParticleDefinition p = nullptr,
const G4String nam = "LindhardSorensen" 
)
explicit

Definition at line 67 of file G4LindhardSorensenIonModel.cc.

69 : G4VEmModel(nam),
70 particle(nullptr),
71 twoln10(2.0*G4Log(10.0))
72{
73 fParticleChange = nullptr;
74 theElectron = G4Electron::Electron();
77 fBraggModel = new G4BraggIonModel();
78 fBBModel = new G4BetheBlochModel();
79 fElimit = 2.0*CLHEP::MeV;
80}
G4double G4Log(G4double x)
Definition: G4Log.hh:227
static G4Electron * Electron()
Definition: G4Electron.cc:93
static G4LossTableManager * Instance()
G4EmCorrections * EmCorrections()
static G4NistManager * Instance()

◆ ~G4LindhardSorensenIonModel()

G4LindhardSorensenIonModel::~G4LindhardSorensenIonModel ( )
overridedefault

◆ G4LindhardSorensenIonModel() [2/2]

G4LindhardSorensenIonModel::G4LindhardSorensenIonModel ( const G4LindhardSorensenIonModel )
delete

Member Function Documentation

◆ ComputeCrossSectionPerAtom()

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

Reimplemented from G4VEmModel.

Definition at line 191 of file G4LindhardSorensenIonModel.cc.

197{
198 return Z*ComputeCrossSectionPerElectron(p,kineticEnergy,cutEnergy,maxEnergy);
199}
const G4int Z[17]
G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)

◆ ComputeCrossSectionPerElectron()

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

Definition at line 171 of file G4LindhardSorensenIonModel.cc.

176{
177 // take into account formfactor
178 G4double tmax = MaxSecondaryEnergy(p, kinEnergy);
179 G4double emax = std::min(tmax, maxKinEnergy);
180 G4double escaled = kinEnergy*pRatio;
181 G4double cross = (escaled <= fElimit)
182 ? fBraggModel->ComputeCrossSectionPerElectron(p,kinEnergy,cutEnergy,emax)
183 : fBBModel->ComputeCrossSectionPerElectron(p,kinEnergy,cutEnergy,emax);
184 // G4cout << "LS: e= " << kinEnergy << " tmin= " << cutEnergy
185 // << " tmax= " << maxEnergy << " cross= " << cross << G4endl;
186 return cross;
187}
double G4double
Definition: G4Types.hh:83
virtual G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy) override

Referenced by ComputeCrossSectionPerAtom(), and CrossSectionPerVolume().

◆ ComputeDEDXPerVolume()

G4double G4LindhardSorensenIonModel::ComputeDEDXPerVolume ( const G4Material mat,
const G4ParticleDefinition p,
G4double  kineticEnergy,
G4double  cutEnergy 
)
overridevirtual

Reimplemented from G4VEmModel.

Definition at line 217 of file G4LindhardSorensenIonModel.cc.

221{
222 // formfactor is taken into account in CorrectionsAlongStep(..)
223 G4double tmax = MaxSecondaryEnergy(p, kinEnergy);
224 G4double cutEnergy = std::min(std::min(cut,tmax), tlimit);
225
226 G4double escaled = kinEnergy*pRatio;
227 G4double dedx = (escaled <= fElimit)
228 ? fBraggModel->ComputeDEDXPerVolume(mat, p, kinEnergy, cutEnergy)
229 : fBBModel->ComputeDEDXPerVolume(mat, p, kinEnergy, cutEnergy);
230
231 //G4cout << "E(MeV)=" << kinEnergy/MeV << " dedx=" << dedx
232 // << " " << material->GetName() << " Ecut(MeV)=" << cutEnergy << G4endl;
233 return dedx;
234}
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override

◆ CorrectionsAlongStep()

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

Reimplemented from G4VEmModel.

Definition at line 238 of file G4LindhardSorensenIonModel.cc.

243{
244 // no correction at the last step
245 const G4double preKinEnergy = dp->GetKineticEnergy();
246 if(eloss >= preKinEnergy) { return; }
247
248 const G4ParticleDefinition* p = dp->GetDefinition();
249 SetParticle(p);
250 const G4Material* mat = couple->GetMaterial();
251 const G4double eDensity = mat->GetElectronDensity();
252 const G4double e = std::max(preKinEnergy - eloss*0.5, preKinEnergy*0.5);
253 const G4double tmax = MaxSecondaryEnergy(p, e);
254 const G4double escaled = e*pRatio;
255 const G4double tau = e/mass;
256
257 const G4double q20 = corr->EffectiveChargeSquareRatio(p, mat, preKinEnergy);
258 const G4double q2 = corr->EffectiveChargeSquareRatio(p, mat, e);
259 const G4int Z = p->GetAtomicNumber();
260
261 G4double res;
262 if(escaled <= fElimit) {
263 // data from ICRU73 or ICRU90
264 res = fIonData->GetDEDX(mat, Z, escaled, G4Log(escaled));
265 /*
266 G4cout << "GetDEDX for Z=" << Z << " in " << mat->GetName()
267 << " Escaled=" << escaled << " E="
268 << e << " dEdx=" << res << G4endl;
269 */
270 if(res > 0.0) {
271 auto pcuts = couple->GetProductionCuts();
272 G4double cut = (nullptr == pcuts) ? tmax : pcuts->GetProductionCut(1);
273 if(cut < tmax) {
274 const G4double x = cut/tmax;
275 res += (G4Log(x)*(tau + 1.)*(tau + 1.)/(tau * (tau + 2.0)) + 1.0 - x)
276 *q2*CLHEP::twopi_mc2_rcl2*eDensity;
277 }
278 res *= length;
279 } else {
280 // simplified correction
281 res = eloss*q2/q20;
282 }
283 } else {
284 // Lindhard-Sorensen model
285 const G4double gam = tau + 1.0;
286 const G4double beta2 = tau * (tau+2.0)/(gam*gam);
287 G4double deltaL0 = 2.0*corr->BarkasCorrection(p, mat, e)*(charge-1.)/charge;
288 G4double deltaL = lsdata->GetDeltaL(Zin, gam);
289
290 res = eloss +
291 CLHEP::twopi_mc2_rcl2*q2*eDensity*(deltaL+deltaL0)*length/beta2;
292 /*
293 G4cout << "G4LindhardSorensenIonModel::CorrectionsAlongStep: E(GeV)= "
294 << preKinEnergy/GeV << " eloss(MeV)= " << eloss
295 << " L= " << eloss*beta2/(twopi_mc2_rcl2*chargeSquare*eDensity*length)
296 << " dL0= " << deltaL0
297 << " dL= " << deltaL << G4endl;
298 */
299 }
300 if(res > preKinEnergy) { res = preKinEnergy; }
301 else if(res < 0.0) { res = eloss; }
302 /*
303 G4cout << "G4LindhardSorensenIonModel::CorrectionsAlongStep: E(GeV)="
304 << preKinEnergy/GeV << " eloss(MeV)=" << eloss
305 << " res(MeV)=" << res << G4endl;
306 */
307 eloss = res;
308}
int G4int
Definition: G4Types.hh:85
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
G4double EffectiveChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double BarkasCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double GetDEDX(const G4Material *, const G4int Z, const G4double e, const G4double loge) const
G4double GetDeltaL(G4int Z, G4double gamma) const
const G4Material * GetMaterial() const
G4ProductionCuts * GetProductionCuts() const
G4double GetElectronDensity() const
Definition: G4Material.hh:212
G4int GetAtomicNumber() const
G4double GetProductionCut(G4int index) const

◆ CrossSectionPerVolume()

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

Reimplemented from G4VEmModel.

Definition at line 203 of file G4LindhardSorensenIonModel.cc.

209{
210 return material->GetElectronDensity()
211 *ComputeCrossSectionPerElectron(p,kineticEnergy,cutEnergy,maxEnergy);
212}

◆ GetChargeSquareRatio() [1/2]

G4double G4LindhardSorensenIonModel::GetChargeSquareRatio ( ) const
inlineprotected

Definition at line 186 of file G4LindhardSorensenIonModel.hh.

187{
188 return chargeSquare;
189}

◆ GetChargeSquareRatio() [2/2]

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

Reimplemented from G4VEmModel.

Definition at line 120 of file G4LindhardSorensenIonModel.cc.

123{
124 return corr->EffectiveChargeSquareRatio(p,mat,kinEnergy);
125}

◆ GetParticleCharge()

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

Reimplemented from G4VEmModel.

Definition at line 130 of file G4LindhardSorensenIonModel.cc.

133{
134 return corr->GetParticleCharge(p,mat,kinEnergy);
135}
G4double GetParticleCharge(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)

◆ Initialise()

void G4LindhardSorensenIonModel::Initialise ( const G4ParticleDefinition p,
const G4DataVector ptr 
)
overridevirtual

Implements G4VEmModel.

Definition at line 88 of file G4LindhardSorensenIonModel.cc.

90{
91 fBraggModel->Initialise(p, ptr);
92 fBBModel->Initialise(p, ptr);
93 SetParticle(p);
94 //G4cout << "G4LindhardSorensenIonModel::Initialise for "
95 // << p->GetParticleName() << G4endl;
96
97 // always false before the run
99
100 if(nullptr == fParticleChange) {
101 fParticleChange = GetParticleChangeForLoss();
102 if(UseAngularGeneratorFlag() && nullptr == GetAngularDistribution()) {
104 }
105 }
106 if(IsMaster()) {
107 if(nullptr == lsdata) {
108 lsdata = new G4LindhardSorensenData();
109 }
110 if(nullptr == fIonData) {
111 fIonData = new G4IonICRU73Data();
112 }
113 fIonData->Initialise();
114 }
115}
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4VEmAngularDistribution * GetAngularDistribution()
Definition: G4VEmModel.hh:600
G4bool IsMaster() const
Definition: G4VEmModel.hh:725
void SetDeexcitationFlag(G4bool val)
Definition: G4VEmModel.hh:802
void SetAngularDistribution(G4VEmAngularDistribution *)
Definition: G4VEmModel.hh:607
G4bool UseAngularGeneratorFlag() const
Definition: G4VEmModel.hh:697
G4ParticleChangeForLoss * GetParticleChangeForLoss()
Definition: G4VEmModel.cc:109

◆ MaxSecondaryEnergy()

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

Reimplemented from G4VEmModel.

Definition at line 430 of file G4LindhardSorensenIonModel.cc.

432{
433 // here particle type is checked for any method
434 SetParticle(pd);
435 G4double tau = kinEnergy/mass;
436 return 2.0*CLHEP::electron_mass_c2*tau*(tau + 2.) /
437 (1. + 2.0*(tau + 1.)*eRatio + eRatio*eRatio);
438}

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

◆ MinEnergyCut()

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

Reimplemented from G4VEmModel.

Definition at line 162 of file G4LindhardSorensenIonModel.cc.

164{
166}
G4double GetMeanExcitationEnergy() const
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:221

◆ operator=()

G4LindhardSorensenIonModel & G4LindhardSorensenIonModel::operator= ( const G4LindhardSorensenIonModel right)
delete

◆ SampleSecondaries()

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

Implements G4VEmModel.

Definition at line 312 of file G4LindhardSorensenIonModel.cc.

318{
319 G4double kineticEnergy = dp->GetKineticEnergy();
320 // take into account formfactor
321 G4double tmax = MaxSecondaryEnergy(dp->GetDefinition(),kineticEnergy);
322
323 G4double maxKinEnergy = std::min(maxEnergy,tmax);
324 if(minKinEnergy >= maxKinEnergy) { return; }
325
326 //G4cout << "G4LindhardSorensenIonModel::SampleSecondaries Emin= "
327 // << minKinEnergy << " Emax= " << maxKinEnergy << G4endl;
328
329 G4double totEnergy = kineticEnergy + mass;
330 G4double etot2 = totEnergy*totEnergy;
331 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/etot2;
332
333 G4double deltaKinEnergy, f;
334 G4double f1 = 0.0;
335 G4double fmax = 1.0;
336 if( 0.0 < spin ) { fmax += 0.5*maxKinEnergy*maxKinEnergy/etot2; }
337
338 CLHEP::HepRandomEngine* rndmEngineMod = G4Random::getTheEngine();
339 G4double rndm[2];
340
341 // sampling without nuclear size effect
342 do {
343 rndmEngineMod->flatArray(2, rndm);
344 deltaKinEnergy = minKinEnergy*maxKinEnergy
345 /(minKinEnergy*(1.0 - rndm[0]) + maxKinEnergy*rndm[0]);
346
347 f = 1.0 - beta2*deltaKinEnergy/tmax;
348 if( 0.0 < spin ) {
349 f1 = 0.5*deltaKinEnergy*deltaKinEnergy/etot2;
350 f += f1;
351 }
352
353 // Loop checking, 03-Aug-2015, Vladimir Ivanchenko
354 } while( fmax*rndm[1] > f);
355
356 // projectile formfactor - suppresion of high energy
357 // delta-electron production at high energy
358
359 G4double x = formfact*deltaKinEnergy;
360 if(x > 1.e-6) {
361
362 G4double x1 = 1.0 + x;
363 G4double grej = 1.0/(x1*x1);
364 if( 0.0 < spin ) {
365 G4double x2 = 0.5*electron_mass_c2*deltaKinEnergy/(mass*mass);
366 grej *= (1.0 + magMoment2*(x2 - f1/f)/(1.0 + x2));
367 }
368 if(grej > 1.1) {
369 G4cout << "### G4LindhardSorensenIonModel WARNING: grej= " << grej
370 << " " << dp->GetDefinition()->GetParticleName()
371 << " Ekin(MeV)= " << kineticEnergy
372 << " delEkin(MeV)= " << deltaKinEnergy
373 << G4endl;
374 }
375 if(rndmEngineMod->flat() > grej) { return; }
376 }
377
378 G4ThreeVector deltaDirection;
379
381
382 const G4Material* mat = couple->GetMaterial();
384
385 deltaDirection =
386 GetAngularDistribution()->SampleDirection(dp, deltaKinEnergy, Z, mat);
387
388 } else {
389
390 G4double deltaMomentum =
391 std::sqrt(deltaKinEnergy * (deltaKinEnergy + 2.0*electron_mass_c2));
392 G4double cost = deltaKinEnergy * (totEnergy + electron_mass_c2) /
393 (deltaMomentum * dp->GetTotalMomentum());
394 cost = std::min(cost, 1.0);
395 G4double sint = std::sqrt((1.0 - cost)*(1.0 + cost));
396
397 G4double phi = CLHEP::twopi*rndmEngineMod->flat();
398
399 deltaDirection.set(sint*std::cos(phi),sint*std::sin(phi), cost) ;
400 deltaDirection.rotateUz(dp->GetMomentumDirection());
401 }
402 /*
403 G4cout << "### G4LindhardSorensenIonModel "
404 << dp->GetDefinition()->GetParticleName()
405 << " Ekin(MeV)= " << kineticEnergy
406 << " delEkin(MeV)= " << deltaKinEnergy
407 << " tmin(MeV)= " << minKinEnergy
408 << " tmax(MeV)= " << maxKinEnergy
409 << " dir= " << dp->GetMomentumDirection()
410 << " dirDelta= " << deltaDirection
411 << G4endl;
412 */
413 // create G4DynamicParticle object for delta ray
414 auto delta = new G4DynamicParticle(theElectron,deltaDirection,deltaKinEnergy);
415
416 vdp->push_back(delta);
417
418 // Change kinematics of primary particle
419 kineticEnergy -= deltaKinEnergy;
420 G4ThreeVector finalP = dp->GetMomentum() - delta->GetMomentum();
421 finalP = finalP.unit();
422
423 fParticleChange->SetProposedKineticEnergy(kineticEnergy);
424 fParticleChange->SetProposedMomentumDirection(finalP);
425}
#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 *) const
Definition: G4VEmModel.cc:253

◆ SetChargeSquareRatio()

void G4LindhardSorensenIonModel::SetChargeSquareRatio ( G4double  val)
inlineprotected

Definition at line 193 of file G4LindhardSorensenIonModel.hh.

194{
195 chargeSquare = val;
196}

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