127 G4cout <<
"G4EmCalculator::GetDEDX: E(MeV)= " << kinEnergy/
MeV
128 <<
" DEDX(MeV/mm)= " << res*
mm/
MeV
132 <<
" isIon= " <<
isIon
151 G4cout <<
" G4EmCalculator::GetRangeFromRestrictedDEDX: E(MeV)= "
153 <<
" range(mm)= " << res/
mm
172 ed <<
"G4EmCalculator::GetCSDARange: CSDA table is not built; "
173 <<
" use UI command: /process/eLoss/CSDARange true";
174 G4Exception(
"G4EmCalculator::GetCSDARange",
"em0077",
183 G4cout <<
" G4EmCalculator::GetCSDARange: E(MeV)= " << kinEnergy/
MeV
184 <<
" range(mm)= " << res/
mm
221 G4cout <<
"G4EmCalculator::GetKinEnergy: Range(mm)= " << range/
mm
222 <<
" KinE(MeV)= " << res/
MeV
268 G4cout <<
"G4EmCalculator::GetXSPerVolume: E(MeV)= " << kinEnergy/
MeV
269 <<
" cross(cm-1)= " << res*
cm
273 G4cout <<
" idx= " << idx <<
" Escaled((MeV)= "
310 if(x > 0.0) { res = 1.0/x; }
312 G4cout <<
"G4EmCalculator::GetMeanFreePath: E(MeV)= " << kinEnergy/
MeV
313 <<
" MFP(mm)= " << res/
mm
344 G4cout <<
"### G4EmCalculator: Inverse Range Table for "
362 <<
" e(MeV)= " << kinEnergy/
MeV <<
" cut(MeV)= " << cut/
MeV
370 if(mname ==
"ParamICRU73" || mname ==
"LinhardSorensen" || mname ==
"Atima") {
373 G4cout << mname <<
" ion E(MeV)= " << kinEnergy <<
" ";
375 <<
" DEDX(MeV*cm^2/g)= "
387 <<
" Escaled(MeV)= " << escaled;
391 if(
verbose > 1) {
G4cout <<
" no basePart E(MeV)= " << kinEnergy <<
" "; }
395 <<
" DEDX(MeV*cm^2/g)= "
416 G4cout <<
"At boundary energy(MeV)= " << eth/
MeV
417 <<
" DEDX(MeV/mm)= " << res1*
mm/
MeV
425 if(res1 > 0.0 && escaled > 0.0) {
426 res *= (1.0 + (res0/res1 - 1.0)*eth/escaled);
442 G4cout <<
"After Corrections: DEDX(MeV/mm)= " << res*
mm/
MeV
450 G4cout <<
"Sum: E(MeV)= " << kinEnergy/
MeV
451 <<
" DEDX(MeV/mm)= " << res*
mm/
MeV
453 <<
" cut(MeV)= " << cut/
MeV
457 <<
" isIon=" <<
isIon
476 const std::vector<G4VEnergyLossProcess*> vel =
483 for(
G4int i=0; i<
n; ++i) {
489 dedx +=
ComputeDEDX(kinEnergy,part,(vel[i])->GetProcessName(),mat,cut);
509 const std::vector<G4VEnergyLossProcess*> vel =
523 for(
G4int i=0; i<
n; ++i) {
534 dedx +=
ComputeDEDX(kinEnergy,part,(vel[i])->GetProcessName(),
573 <<
" NuclearDEDX(MeV/mm)= " << res*
mm/
MeV
574 <<
" NuclearDEDX(MeV*cm^2/g)= "
604 G4cout <<
"G4EmCalculator::ComputeXSPerVolume: E(MeV)= " << kinEnergy/
MeV
605 <<
" cross(cm-1)= " << res*
cm
606 <<
" cut(keV)= " << aCut/
keV
643 <<
" cross(barn)= " << res/
barn
645 <<
" Z= " <<
Z <<
" A= " <<
A/(
g/
mole) <<
" g/mole"
646 <<
" cut(keV)= " << aCut/
keV
679 <<
" cross(barn)= " << res/
barn
681 <<
" Z= " <<
Z <<
" shellIdx= " << shellIdx
682 <<
" cut(keV)= " << aCut/
keV
702 if(res > 0.0) { res = 1.0/res; }
735 if(x > 0.0) { mfp = 1.0/x; }
738 <<
" MFP(mm)= " << mfp/
mm
754 ConvertRangeToEnergy(part, mat, range);
799 G4cout <<
"\n G4EmCalculator::UpdateParticle: isIon 1 "
802 <<
" e= " << kinEnergy <<
G4endl;
832 G4cout <<
"### WARNING: G4EmCalculator::FindParticle fails to find "
856 G4cout <<
"### WARNING: G4EmCalculator::FindMaterial fails to find "
868 if(
reg !=
"" &&
reg !=
"world") {
894 size_t nr = store->size();
896 for(
size_t i=0; i<nr; ++i) {
898 material, ((*store)[i])->GetProductionCuts());
899 if(couple) {
break; }
906 ed <<
"G4EmCalculator::FindCouple: fail for material <"
908 if(region) { ed <<
" and region " << region->
GetName(); }
909 G4Exception(
"G4EmCalculator::FindCouple",
"em0078",
1018 G4cout <<
"G4EmCalculator::FindEmModel WARNING: no particle"
1019 <<
" or materail defined; particle: " << p <<
G4endl;
1028 G4cout <<
"## G4EmCalculator::FindEmModel for " << partname
1030 <<
") and " << processName <<
" at E(MeV)= " << scaledEnergy
1032 if(p != part) {
G4cout <<
" GenericIon is the base particle" <<
G4endl; }
1140 const std::vector<G4VEnergyLossProcess*> v =
1143 for(
G4int i=0; i<
n; ++i) {
1144 if((v[i])->GetProcessName() == processName) {
1164 for(
G4int i=0; i<
n; ++i) {
1165 auto pName = v[i]->GetProcessName();
1166 if(pName ==
"GammaGeneralProc") {
1169 }
else if(pName == processName) {
1187 const std::vector<G4VMultipleScattering*> v =
1190 for(
G4int i=0; i<
n; ++i) {
1191 if((v[i])->GetProcessName() == processName) {
1211 for(
G4int i=0; i<nproc; ++i) {
1212 if(processName == (*pv)[i]->GetProcessName()) {
1229 for(
G4int i=0; i<
n; ++i) {
1230 if((*pv)[i] == proc) {
1265 for(
size_t i=0; i<
nn; ++i) {
static const G4double reg
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
static constexpr double gram
static constexpr double mole
static constexpr double barn
static constexpr double cm2
static constexpr double mm
static constexpr double keV
static constexpr double g
static constexpr double GeV
static constexpr double MeV
static constexpr double cm
G4GLOB_DLL std::ostream G4cout
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetKineticEnergy(G4double aEnergy)
static G4Electron * Electron()
const G4ParticleDefinition * FindParticle(const G4String &)
G4double ComputeMeanFreePath(G4double kinEnergy, const G4ParticleDefinition *, const G4String &processName, const G4Material *, G4double cut=0.0)
G4double GetShellIonisationCrossSectionPerAtom(const G4String &part, G4int Z, G4AtomicShellEnumerator shell, G4double kinEnergy)
G4double GetDEDX(G4double kinEnergy, const G4ParticleDefinition *, const G4Material *, const G4Region *r=nullptr)
std::vector< const G4Material * > localMaterials
G4double ComputeTotalDEDX(G4double kinEnergy, const G4ParticleDefinition *, const G4Material *, G4double cut=DBL_MAX)
G4double GetCSDARange(G4double kinEnergy, const G4ParticleDefinition *, const G4Material *, const G4Region *r=nullptr)
const G4ParticleDefinition * theGenericIon
G4double GetRange(G4double kinEnergy, const G4ParticleDefinition *, const G4Material *, const G4Region *r=nullptr)
G4VEnergyLossProcess * FindEnergyLossProcess(const G4ParticleDefinition *)
G4double ComputeNuclearDEDX(G4double kinEnergy, const G4ParticleDefinition *, const G4Material *)
const G4ParticleDefinition * currentParticle
const G4ParticleDefinition * FindIon(G4int Z, G4int A)
G4LossTableManager * manager
G4double ComputeGammaAttenuationLength(G4double kinEnergy, const G4Material *)
G4double ComputeDEDX(G4double kinEnergy, const G4ParticleDefinition *, const G4String &processName, const G4Material *, G4double cut=DBL_MAX)
void SetVerbose(G4int val)
G4EmParameters * theParameters
G4bool UpdateParticle(const G4ParticleDefinition *, G4double kinEnergy)
G4double ComputeEnergyCutFromRangeCut(G4double range, const G4ParticleDefinition *, const G4Material *)
G4double GetKinEnergy(G4double range, const G4ParticleDefinition *, const G4Material *, const G4Region *r=nullptr)
G4double GetRangeFromRestricteDEDX(G4double kinEnergy, const G4ParticleDefinition *, const G4Material *, const G4Region *r=nullptr)
G4double ComputeCrossSectionPerVolume(G4double kinEnergy, const G4ParticleDefinition *, const G4String &processName, const G4Material *, G4double cut=0.0)
G4double ComputeCrossSectionPerAtom(G4double kinEnergy, const G4ParticleDefinition *, const G4String &processName, G4double Z, G4double A, G4double cut=0.0)
G4VEnergyLossProcess * FindEnLossProcess(const G4ParticleDefinition *, const G4String &processName)
G4String currentProcessName
G4bool FindEmModel(const G4ParticleDefinition *, const G4String &processName, G4double kinEnergy)
G4VEmModel * currentModel
G4VMultipleScattering * FindMscProcess(const G4ParticleDefinition *, const G4String &processName)
void FindLambdaTable(const G4ParticleDefinition *, const G4String &processName, G4double kinEnergy, G4int &proctype)
void PrintDEDXTable(const G4ParticleDefinition *)
const G4Region * FindRegion(const G4String &)
G4VProcess * FindProcess(const G4ParticleDefinition *part, const G4String &processName)
G4String currentMaterialName
G4double GetCrossSectionPerVolume(G4double kinEnergy, const G4ParticleDefinition *, const G4String &processName, const G4Material *, const G4Region *r=nullptr)
G4double ComputeCrossSectionPerShell(G4double kinEnergy, const G4ParticleDefinition *, const G4String &processName, G4int Z, G4int shellIdx, G4double cut=0.0)
G4bool ActiveForParticle(const G4ParticleDefinition *part, G4VProcess *proc)
G4VEnergyLossProcess * currentProcess
G4DynamicParticle * dynParticle
const G4ParticleDefinition * lambdaParticle
const G4Material * currentMaterial
G4bool UpdateCouple(const G4Material *, G4double cut)
G4double ComputeShellIonisationCrossSectionPerAtom(const G4String &part, G4int Z, G4AtomicShellEnumerator shell, G4double kinEnergy, const G4Material *mat=nullptr)
const G4MaterialCutsCouple * FindCouple(const G4Material *, const G4Region *r=nullptr)
void SetupMaterial(const G4Material *)
void PrintRangeTable(const G4ParticleDefinition *)
G4String currentParticleName
void PrintInverseRangeTable(const G4ParticleDefinition *)
G4VEmProcess * FindDiscreteProcess(const G4ParticleDefinition *, const G4String &processName)
void CheckMaterial(G4int Z)
const G4MaterialCutsCouple * currentCouple
std::vector< const G4MaterialCutsCouple * > localCouples
G4double ComputeDEDXForCutInRange(G4double kinEnergy, const G4ParticleDefinition *, const G4Material *mat, G4double rangecut=DBL_MAX)
G4double GetMeanFreePath(G4double kinEnergy, const G4ParticleDefinition *, const G4String &processName, const G4Material *, const G4Region *r=nullptr)
const G4PhysicsTable * currentLambda
G4ionEffectiveCharge * ionEffCharge
G4double ComputeElectronicDEDX(G4double kinEnergy, const G4ParticleDefinition *, const G4Material *mat, G4double cut=DBL_MAX)
const G4Material * FindMaterial(const G4String &)
const G4ParticleDefinition * baseParticle
std::vector< G4double > localCuts
const G4Material * cutMaterial
G4double EffectiveChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double EffectiveChargeCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
static G4EmParameters * Instance()
G4bool BuildCSDARange() const
G4double LowestElectronEnergy() const
static G4GenericIon * GenericIon()
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
static G4LossTableManager * Instance()
const std::vector< G4VEmProcess * > & GetEmProcessVector()
G4double GetCSDARange(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
G4VEnergyLossProcess * GetEnergyLossProcess(const G4ParticleDefinition *)
G4double GetEnergy(const G4ParticleDefinition *aParticle, G4double range, const G4MaterialCutsCouple *couple)
const std::vector< G4VMultipleScattering * > & GetMultipleScatteringVector()
const std::vector< G4VEnergyLossProcess * > & GetEnergyLossProcessVector()
G4VAtomDeexcitation * AtomDeexcitation()
G4double GetRangeFromRestricteDEDX(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
G4EmCorrections * EmCorrections()
G4double GetDEDX(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
G4double GetDensity() const
const G4Element * GetElement(G4int iel) const
size_t GetNumberOfElements() const
const G4String & GetName() const
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
G4Material * FindOrBuildSimpleMaterial(G4int Z, G4bool warning=false)
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
static G4NistManager * Instance()
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleType() const
G4double GetPDGMass() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
G4IonTable * GetIonTable() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
static G4Positron * Positron()
G4bool GetProcessActivation(G4VProcess *aProcess) const
G4ProcessVector * GetProcessList() const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
static G4ProductionCutsTable * GetProductionCutsTable()
static G4RegionStore * GetInstance()
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
G4ProductionCuts * GetProductionCuts() const
const G4String & GetName() const
virtual G4double ComputeShellIonisationCrossSectionPerAtom(const G4ParticleDefinition *, G4int Z, G4AtomicShellEnumerator shell, G4double kinE, const G4Material *mat=nullptr)=0
virtual G4double GetShellIonisationCrossSectionPerAtom(const G4ParticleDefinition *, G4int Z, G4AtomicShellEnumerator shell, G4double kinE, const G4Material *mat=nullptr)=0
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
virtual void InitialiseForMaterial(const G4ParticleDefinition *, const G4Material *)
G4double LowEnergyLimit() const
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
void SetCurrentCouple(const G4MaterialCutsCouple *)
void SetFluctuationFlag(G4bool val)
virtual void InitialiseForElement(const G4ParticleDefinition *, G4int Z)
virtual void SetupForMaterial(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
virtual G4double ComputeCrossSectionPerShell(const G4ParticleDefinition *, G4int Z, G4int shellIdx, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple *, const G4DynamicParticle *, const G4double &length, G4double &eloss)
virtual G4double GetChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
const G4String & GetName() const
virtual G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
G4PhysicsTable * GetCrossSectionTable()
G4double CrossSectionPerVolume(G4double kineticEnergy, const G4MaterialCutsCouple *couple, G4double logKinEnergy=DBL_MAX)
G4VEmModel * EmModel(size_t index=0) const
G4PhysicsTable * LambdaTable() const
G4VEmModel * SelectModelForMaterial(G4double kinEnergy, size_t idxCouple) const
virtual G4VEmProcess * GetEmProcess(const G4String &name)
const G4ParticleDefinition * BaseParticle() const
G4PhysicsTable * RangeTableForLoss() const
G4PhysicsTable * InverseRangeTable() const
G4VEmModel * SelectModelForMaterial(G4double kinEnergy, size_t &idxCouple) const
void SetDynamicMassCharge(G4double massratio, G4double charge2ratio)
G4PhysicsTable * LambdaTable() const
G4PhysicsTable * DEDXTable() const
G4double GetTransportMeanFreePath(const G4ParticleDefinition *part, G4double kinEnergy)
G4VEmModel * SelectModel(G4double kinEnergy, size_t idx)
const G4String & GetProcessName() const
static constexpr double eV
static constexpr double nm
T max(const T t1, const T t2)
brief Return the largest of the two arguments
const char * name(G4int ptype)