Import Geant4 10.6.0.beta source tree
This commit is contained in:
@@ -23,12 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class file
|
||||
//
|
||||
//
|
||||
// File name: G4EmParameters
|
||||
//
|
||||
// Author: Vladimir Ivanchenko
|
||||
@@ -37,8 +35,6 @@
|
||||
//
|
||||
// Modifications:
|
||||
//
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -51,6 +47,8 @@
|
||||
#include "G4VEmProcess.hh"
|
||||
#include "G4VEnergyLossProcess.hh"
|
||||
#include "G4VAtomDeexcitation.hh"
|
||||
#include "G4EmExtraParameters.hh"
|
||||
#include "G4EmLowEParameters.hh"
|
||||
#include "G4EmParametersMessenger.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4RegionStore.hh"
|
||||
@@ -88,6 +86,8 @@ G4EmParameters* G4EmParameters::Instance()
|
||||
G4EmParameters::~G4EmParameters()
|
||||
{
|
||||
delete theMessenger;
|
||||
delete fBParameters;
|
||||
delete fCParameters;
|
||||
delete emSaturation;
|
||||
}
|
||||
|
||||
@@ -97,15 +97,22 @@ G4EmParameters::G4EmParameters()
|
||||
{
|
||||
G4NistManager::Instance();
|
||||
theMessenger = new G4EmParametersMessenger(this);
|
||||
Initialise();
|
||||
|
||||
fBParameters = new G4EmExtraParameters();
|
||||
fCParameters = new G4EmLowEParameters();
|
||||
|
||||
fStateManager = G4StateManager::GetStateManager();
|
||||
Initialise();
|
||||
emSaturation = nullptr;
|
||||
}
|
||||
|
||||
void G4EmParameters::SetDefaults()
|
||||
{
|
||||
if(!IsLocked()) { Initialise(); }
|
||||
if(!IsLocked()) {
|
||||
Initialise();
|
||||
fBParameters->Initialise();
|
||||
fCParameters->Initialise();
|
||||
}
|
||||
}
|
||||
|
||||
void G4EmParameters::Initialise()
|
||||
@@ -116,12 +123,6 @@ void G4EmParameters::Initialise()
|
||||
spline = true;
|
||||
cutAsFinalRange = false;
|
||||
applyCuts = false;
|
||||
fluo = false;
|
||||
beardenFluoDir = false;
|
||||
auger = false;
|
||||
augerCascade = false;
|
||||
pixe = false;
|
||||
deexIgnoreCut = false;
|
||||
lateralDisplacement = true;
|
||||
lateralDisplacementAlg96 = true;
|
||||
muhadLateralDisplacement = false;
|
||||
@@ -131,12 +132,11 @@ void G4EmParameters::Initialise()
|
||||
integral = true;
|
||||
birks = false;
|
||||
fICRU90 = false;
|
||||
dnaFast = false;
|
||||
dnaStationary = false;
|
||||
dnaMsc = false;
|
||||
gener = false;
|
||||
onIsolated = false;
|
||||
enableSamplingTable = false;
|
||||
fSamplingTable = false;
|
||||
fPolarisation = false;
|
||||
fDNA = false;
|
||||
|
||||
minSubRange = 1.0;
|
||||
minKinEnergy = 0.1*CLHEP::keV;
|
||||
@@ -145,6 +145,7 @@ void G4EmParameters::Initialise()
|
||||
lowestElectronEnergy = 1.0*CLHEP::keV;
|
||||
lowestMuHadEnergy = 1.0*CLHEP::keV;
|
||||
lowestTripletEnergy = 1.0*CLHEP::MeV;
|
||||
maxNIELEnergy = 0.0;
|
||||
linLossLimit = 0.01;
|
||||
bremsTh = maxKinEnergy;
|
||||
lambdaFactor = 0.8;
|
||||
@@ -155,10 +156,6 @@ void G4EmParameters::Initialise()
|
||||
rangeFactorMuHad = 0.2;
|
||||
geomFactor = 2.5;
|
||||
skin = 1.0;
|
||||
dRoverRange = 0.2;
|
||||
finalRange = CLHEP::mm;
|
||||
dRoverRangeMuHad = 0.2;
|
||||
finalRangeMuHad = 0.1*CLHEP::mm;
|
||||
factorScreen = 1.0;
|
||||
|
||||
nbins = 84;
|
||||
@@ -170,14 +167,6 @@ void G4EmParameters::Initialise()
|
||||
mscStepLimit = fUseSafety;
|
||||
mscStepLimitMuHad = fMinimal;
|
||||
nucFormfactor = fExponentialNF;
|
||||
dnaElectronSolvation = fMeesungnoen2002eSolvation;
|
||||
|
||||
namePIXE = "Empirical";
|
||||
nameElectronPIXE = "Livermore";
|
||||
|
||||
directionalSplitting = false;
|
||||
directionalSplittingTarget = G4ThreeVector(0.,0.,0.);
|
||||
directionalSplittingRadius = 0.;
|
||||
}
|
||||
|
||||
void G4EmParameters::SetLossFluctuations(G4bool val)
|
||||
@@ -249,69 +238,67 @@ G4bool G4EmParameters::ApplyCuts() const
|
||||
void G4EmParameters::SetFluo(G4bool val)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
fluo = val;
|
||||
fCParameters->SetFluo(val);
|
||||
}
|
||||
|
||||
G4bool G4EmParameters::Fluo() const
|
||||
{
|
||||
return fluo;
|
||||
return fCParameters->Fluo();
|
||||
}
|
||||
|
||||
void G4EmParameters::SetBeardenFluoDir(G4bool val)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
beardenFluoDir = val;
|
||||
fCParameters->SetBeardenFluoDir(val);
|
||||
}
|
||||
|
||||
G4bool G4EmParameters::BeardenFluoDir() const
|
||||
{
|
||||
return beardenFluoDir;
|
||||
return fCParameters->BeardenFluoDir();
|
||||
}
|
||||
|
||||
void G4EmParameters::SetAuger(G4bool val)
|
||||
{
|
||||
SetAugerCascade(val);
|
||||
if(IsLocked()) { return; }
|
||||
fCParameters->SetAuger(val);
|
||||
}
|
||||
|
||||
G4bool G4EmParameters::Auger() const
|
||||
{
|
||||
return auger;
|
||||
return fCParameters->Auger();
|
||||
}
|
||||
|
||||
void G4EmParameters::SetAugerCascade(G4bool val)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
augerCascade = val;
|
||||
auger = val;
|
||||
if(val) { fluo = true; }
|
||||
fCParameters->SetAuger(val);
|
||||
}
|
||||
|
||||
G4bool G4EmParameters::AugerCascade() const
|
||||
{
|
||||
return augerCascade;
|
||||
return fCParameters->Auger();
|
||||
}
|
||||
|
||||
void G4EmParameters::SetPixe(G4bool val)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
pixe = val;
|
||||
if(val) { fluo = true; }
|
||||
fCParameters->SetPixe(val);
|
||||
}
|
||||
|
||||
G4bool G4EmParameters::Pixe() const
|
||||
{
|
||||
return pixe;
|
||||
return fCParameters->Pixe();
|
||||
}
|
||||
|
||||
void G4EmParameters::SetDeexcitationIgnoreCut(G4bool val)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
deexIgnoreCut = val;
|
||||
fCParameters->SetDeexcitationIgnoreCut(val);
|
||||
}
|
||||
|
||||
G4bool G4EmParameters::DeexcitationIgnoreCut() const
|
||||
{
|
||||
return deexIgnoreCut;
|
||||
return fCParameters->DeexcitationIgnoreCut();
|
||||
}
|
||||
|
||||
void G4EmParameters::SetLateralDisplacement(G4bool val)
|
||||
@@ -391,6 +378,17 @@ G4bool G4EmParameters::Integral() const
|
||||
return integral;
|
||||
}
|
||||
|
||||
void G4EmParameters::SetEnablePolarisation(G4bool val)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
fPolarisation = val;
|
||||
}
|
||||
|
||||
G4bool G4EmParameters::EnablePolarisation() const
|
||||
{
|
||||
return fPolarisation;
|
||||
}
|
||||
|
||||
void G4EmParameters::SetBirksActive(G4bool val)
|
||||
{
|
||||
birks = val;
|
||||
@@ -424,34 +422,37 @@ G4bool G4EmParameters::UseICRU90Data() const
|
||||
void G4EmParameters::SetDNAFast(G4bool val)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
dnaFast = val;
|
||||
fCParameters->SetDNAFast(val);
|
||||
if(val) { ActivateDNA(); }
|
||||
}
|
||||
|
||||
G4bool G4EmParameters::DNAFast() const
|
||||
{
|
||||
return dnaFast;
|
||||
return fCParameters->DNAFast();
|
||||
}
|
||||
|
||||
void G4EmParameters::SetDNAStationary(G4bool val)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
dnaStationary = val;
|
||||
fCParameters->SetDNAStationary(val);
|
||||
if(val) { ActivateDNA(); }
|
||||
}
|
||||
|
||||
G4bool G4EmParameters::DNAStationary() const
|
||||
{
|
||||
return dnaStationary;
|
||||
return fCParameters->DNAStationary();
|
||||
}
|
||||
|
||||
void G4EmParameters::SetDNAElectronMsc(G4bool val)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
dnaMsc = val;
|
||||
fCParameters->SetDNAElectronMsc(val);
|
||||
if(val) { ActivateDNA(); }
|
||||
}
|
||||
|
||||
G4bool G4EmParameters::DNAElectronMsc() const
|
||||
{
|
||||
return dnaMsc;
|
||||
return fCParameters->DNAElectronMsc();
|
||||
}
|
||||
|
||||
void G4EmParameters::SetGeneralProcessActive(G4bool val)
|
||||
@@ -460,14 +461,7 @@ void G4EmParameters::SetGeneralProcessActive(G4bool val)
|
||||
gener = val;
|
||||
// if general interaction is enabled then sub-cutoff and
|
||||
// force interaction options should be disabled
|
||||
if(gener) {
|
||||
m_regnamesForced.clear();
|
||||
m_procForced.clear();
|
||||
m_lengthForced.clear();
|
||||
m_weightForced.clear();
|
||||
m_regnamesSubCut.clear();
|
||||
m_subCuts.clear();
|
||||
}
|
||||
if(gener) { fBParameters->Initialise(); }
|
||||
}
|
||||
|
||||
G4bool G4EmParameters::GeneralProcessActive() const
|
||||
@@ -498,12 +492,18 @@ G4bool G4EmParameters::OnIsolated() const
|
||||
void G4EmParameters::SetEnableSamplingTable(G4bool val)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
enableSamplingTable = val;
|
||||
fSamplingTable = val;
|
||||
}
|
||||
|
||||
G4bool G4EmParameters::EnableSamplingTable() const
|
||||
{
|
||||
return enableSamplingTable;
|
||||
return fSamplingTable;
|
||||
}
|
||||
|
||||
void G4EmParameters::ActivateDNA()
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
fDNA = true;
|
||||
}
|
||||
|
||||
G4EmSaturation* G4EmParameters::GetEmSaturation()
|
||||
@@ -538,7 +538,7 @@ void G4EmParameters::SetMinEnergy(G4double val)
|
||||
nbins = nbinsPerDecade*G4lrint(std::log10(maxKinEnergy/minKinEnergy));
|
||||
} else {
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Value of MinKinEnergy is out of range: " << val/MeV
|
||||
ed << "Value of MinKinEnergy - is out of range: " << val/MeV
|
||||
<< " MeV is ignored";
|
||||
PrintWarning(ed);
|
||||
}
|
||||
@@ -552,13 +552,13 @@ G4double G4EmParameters::MinKinEnergy() const
|
||||
void G4EmParameters::SetMaxEnergy(G4double val)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
if(val > minKinEnergy && val < 1.e+7*TeV) {
|
||||
if(val > std::max(minKinEnergy,9.99*MeV) && val < 1.e+7*TeV) {
|
||||
maxKinEnergy = val;
|
||||
nbins = nbinsPerDecade*G4lrint(std::log10(maxKinEnergy/minKinEnergy));
|
||||
} else {
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Value of MaxKinEnergy is out of range: "
|
||||
<< val/GeV << " GeV is ignored";
|
||||
<< val/GeV << " GeV is ignored; allowed range 10 MeV - 1.e+7 TeV";
|
||||
PrintWarning(ed);
|
||||
}
|
||||
}
|
||||
@@ -576,7 +576,8 @@ void G4EmParameters::SetMaxEnergyForCSDARange(G4double val)
|
||||
} else {
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Value of MaxKinEnergyCSDA is out of range: "
|
||||
<< val/GeV << " GeV is ignored";
|
||||
<< val/GeV << " GeV is ignored; allowed range "
|
||||
<< minKinEnergy << " MeV - 100 TeV";
|
||||
PrintWarning(ed);
|
||||
}
|
||||
}
|
||||
@@ -589,14 +590,7 @@ G4double G4EmParameters::MaxEnergyForCSDARange() const
|
||||
void G4EmParameters::SetLowestElectronEnergy(G4double val)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
if(val >= 0.0) {
|
||||
lowestElectronEnergy = val;
|
||||
} else {
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Value of lowestElectronEnergy is out of range: "
|
||||
<< val/MeV << " MeV is ignored";
|
||||
PrintWarning(ed);
|
||||
}
|
||||
if(val >= 0.0) { lowestElectronEnergy = val; }
|
||||
}
|
||||
|
||||
G4double G4EmParameters::LowestElectronEnergy() const
|
||||
@@ -607,14 +601,7 @@ G4double G4EmParameters::LowestElectronEnergy() const
|
||||
void G4EmParameters::SetLowestMuHadEnergy(G4double val)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
if(val >= 0.0) {
|
||||
lowestMuHadEnergy = val;
|
||||
} else {
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Value of lowestMuHadEnergy is out of range: "
|
||||
<< val/MeV << " MeV is ignored";
|
||||
PrintWarning(ed);
|
||||
}
|
||||
if(val >= 0.0) { lowestMuHadEnergy = val; }
|
||||
}
|
||||
|
||||
G4double G4EmParameters::LowestMuHadEnergy() const
|
||||
@@ -633,6 +620,17 @@ G4double G4EmParameters::LowestTripletEnergy() const
|
||||
return lowestTripletEnergy;
|
||||
}
|
||||
|
||||
void G4EmParameters::SetMaxNIELEnergy(G4double val)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
if(val >= 0.0) { maxNIELEnergy = val; }
|
||||
}
|
||||
|
||||
G4double G4EmParameters::MaxNIELEnergy() const
|
||||
{
|
||||
return maxNIELEnergy;
|
||||
}
|
||||
|
||||
void G4EmParameters::SetLinearLossLimit(G4double val)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
@@ -834,29 +832,13 @@ G4double G4EmParameters::ScreeningFactor() const
|
||||
void G4EmParameters::SetStepFunction(G4double v1, G4double v2)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
if(v1 > 0.0 && v1 <= 1.0 && v2 > 0.0) {
|
||||
dRoverRange = v1;
|
||||
finalRange = v2;
|
||||
} else {
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Values of step function are out of range: "
|
||||
<< v1 << ", " << v2/CLHEP::mm << " mm - are ignored";
|
||||
PrintWarning(ed);
|
||||
}
|
||||
fBParameters->SetStepFunction(v1, v2);
|
||||
}
|
||||
|
||||
void G4EmParameters::SetStepFunctionMuHad(G4double v1, G4double v2)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
if(v1 > 0.0 && v1 <= 1.0 && v2 > 0.0) {
|
||||
dRoverRangeMuHad = v1;
|
||||
finalRangeMuHad = v2;
|
||||
} else {
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Values of step function are out of range: "
|
||||
<< v1 << ", " << v2/CLHEP::mm << " mm - are ignored";
|
||||
PrintWarning(ed);
|
||||
}
|
||||
fBParameters->SetStepFunctionMuHad(v1, v2);
|
||||
}
|
||||
|
||||
void G4EmParameters::SetNumberOfBins(G4int val)
|
||||
@@ -957,12 +939,13 @@ G4NuclearFormfactorType G4EmParameters::NuclearFormfactorType() const
|
||||
void G4EmParameters::SetDNAeSolvationSubType(G4DNAModelSubType val)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
dnaElectronSolvation = val;
|
||||
fCParameters->SetDNAeSolvationSubType(val);
|
||||
ActivateDNA();
|
||||
}
|
||||
|
||||
G4DNAModelSubType G4EmParameters::DNAeSolvationSubType() const
|
||||
{
|
||||
return dnaElectronSolvation;
|
||||
return fCParameters->DNAeSolvationSubType();
|
||||
}
|
||||
|
||||
void G4EmParameters::SetConversionType(G4int val)
|
||||
@@ -979,24 +962,23 @@ G4int G4EmParameters::GetConversionType() const
|
||||
void G4EmParameters::SetPIXECrossSectionModel(const G4String& sss)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
G4cout << "G4EmParameters::SetPIXECrossSectionModel " << sss << G4endl;
|
||||
namePIXE = sss;
|
||||
fCParameters->SetPIXECrossSectionModel(sss);
|
||||
}
|
||||
|
||||
const G4String& G4EmParameters::PIXECrossSectionModel()
|
||||
{
|
||||
return namePIXE;
|
||||
return fCParameters->PIXECrossSectionModel();
|
||||
}
|
||||
|
||||
void G4EmParameters::SetPIXEElectronCrossSectionModel(const G4String& sss)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
nameElectronPIXE = sss;
|
||||
fCParameters->SetPIXEElectronCrossSectionModel(sss);
|
||||
}
|
||||
|
||||
const G4String& G4EmParameters::PIXEElectronCrossSectionModel()
|
||||
{
|
||||
return nameElectronPIXE;
|
||||
return fCParameters->PIXEElectronCrossSectionModel();
|
||||
}
|
||||
|
||||
void G4EmParameters::PrintWarning(G4ExceptionDescription& ed) const
|
||||
@@ -1004,173 +986,85 @@ void G4EmParameters::PrintWarning(G4ExceptionDescription& ed) const
|
||||
G4Exception("G4EmParameters", "em0044", JustWarning, ed);
|
||||
}
|
||||
|
||||
G4String G4EmParameters::CheckRegion(const G4String& reg) const
|
||||
{
|
||||
G4String r = reg;
|
||||
if(r == "" || r == "world" || r == "World") {
|
||||
r = "DefaultRegionForTheWorld";
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
void G4EmParameters::AddPAIModel(const G4String& particle,
|
||||
const G4String& region,
|
||||
const G4String& type)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
G4String r = CheckRegion(region);
|
||||
G4int nreg = m_regnamesPAI.size();
|
||||
for(G4int i=0; i<nreg; ++i) {
|
||||
if((m_particlesPAI[i] == particle ||
|
||||
m_particlesPAI[i] == "all" ||
|
||||
particle == "all") &&
|
||||
(m_regnamesPAI[i] == r ||
|
||||
m_regnamesPAI[i] == "DefaultRegionForTheWorld" ||
|
||||
r == "DefaultRegionForTheWorld") ) {
|
||||
|
||||
m_typesPAI[i] = type;
|
||||
if(particle == "all") { m_particlesPAI[i] = particle; }
|
||||
if(r == "DefaultRegionForTheWorld") { m_regnamesPAI[i] = r; }
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_particlesPAI.push_back(particle);
|
||||
m_regnamesPAI.push_back(r);
|
||||
m_typesPAI.push_back(type);
|
||||
fBParameters->AddPAIModel(particle, region, type);
|
||||
}
|
||||
|
||||
const std::vector<G4String>& G4EmParameters::ParticlesPAI() const
|
||||
{
|
||||
return m_particlesPAI;
|
||||
return fBParameters->ParticlesPAI();
|
||||
}
|
||||
|
||||
const std::vector<G4String>& G4EmParameters::RegionsPAI() const
|
||||
{
|
||||
return m_regnamesPAI;
|
||||
return fBParameters->RegionsPAI();
|
||||
}
|
||||
|
||||
const std::vector<G4String>& G4EmParameters::TypesPAI() const
|
||||
{
|
||||
return m_typesPAI;
|
||||
return fBParameters->TypesPAI();
|
||||
}
|
||||
|
||||
void G4EmParameters::AddMicroElec(const G4String& region)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
G4String r = CheckRegion(region);
|
||||
G4int nreg = m_regnamesME.size();
|
||||
for(G4int i=0; i<nreg; ++i) {
|
||||
if(r == m_regnamesME[i]) { return; }
|
||||
}
|
||||
m_regnamesME.push_back(r);
|
||||
fCParameters->AddMicroElec(region);
|
||||
}
|
||||
|
||||
const std::vector<G4String>& G4EmParameters::RegionsMicroElec() const
|
||||
{
|
||||
return m_regnamesME;
|
||||
return fCParameters->RegionsMicroElec();
|
||||
}
|
||||
|
||||
void G4EmParameters::AddDNA(const G4String& region, const G4String& type)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
G4String r = CheckRegion(region);
|
||||
G4int nreg = m_regnamesDNA.size();
|
||||
for(G4int i=0; i<nreg; ++i) {
|
||||
if(r == m_regnamesDNA[i]) { return; }
|
||||
}
|
||||
m_regnamesDNA.push_back(r);
|
||||
m_typesDNA.push_back(type);
|
||||
fCParameters->AddDNA(region, type);
|
||||
ActivateDNA();
|
||||
}
|
||||
|
||||
const std::vector<G4String>& G4EmParameters::RegionsDNA() const
|
||||
{
|
||||
return m_regnamesDNA;
|
||||
return fCParameters->RegionsDNA();
|
||||
}
|
||||
|
||||
const std::vector<G4String>& G4EmParameters::TypesDNA() const
|
||||
{
|
||||
return m_typesDNA;
|
||||
}
|
||||
|
||||
void G4EmParameters::AddMsc(const G4String& region, const G4String& type)
|
||||
{
|
||||
AddPhysics(region, type);
|
||||
}
|
||||
|
||||
const std::vector<G4String>& G4EmParameters::RegionsMsc() const
|
||||
{
|
||||
return m_regnamesPhys;
|
||||
}
|
||||
|
||||
const std::vector<G4String>& G4EmParameters::TypesMsc() const
|
||||
{
|
||||
return m_typesPhys;
|
||||
return fCParameters->TypesDNA();
|
||||
}
|
||||
|
||||
void G4EmParameters::AddPhysics(const G4String& region, const G4String& type)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
G4String r = CheckRegion(region);
|
||||
G4int nreg = m_regnamesPhys.size();
|
||||
for(G4int i=0; i<nreg; ++i) {
|
||||
if(r == m_regnamesPhys[i]) { return; }
|
||||
}
|
||||
m_regnamesPhys.push_back(r);
|
||||
m_typesPhys.push_back(type);
|
||||
fBParameters->AddPhysics(region, type);
|
||||
}
|
||||
|
||||
const std::vector<G4String>& G4EmParameters::RegionsPhysics() const
|
||||
{
|
||||
return m_regnamesPhys;
|
||||
return fBParameters->RegionsPhysics();
|
||||
}
|
||||
|
||||
const std::vector<G4String>& G4EmParameters::TypesPhysics() const
|
||||
{
|
||||
return m_typesPhys;
|
||||
return fBParameters->TypesPhysics();
|
||||
}
|
||||
|
||||
void G4EmParameters::SetSubCutoff(G4bool val, const G4String& region)
|
||||
{
|
||||
if(IsLocked() && !gener) { return; }
|
||||
G4String r = CheckRegion(region);
|
||||
G4int nreg = m_regnamesSubCut.size();
|
||||
for(G4int i=0; i<nreg; ++i) {
|
||||
if(r == m_regnamesSubCut[i]) {
|
||||
m_subCuts[i] = val;
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_regnamesSubCut.push_back(r);
|
||||
m_subCuts.push_back(val);
|
||||
fBParameters->SetSubCutoff(val, region);
|
||||
}
|
||||
|
||||
void
|
||||
G4EmParameters::SetDeexActiveRegion(const G4String& region, G4bool fdeex,
|
||||
G4bool fauger, G4bool fpixe)
|
||||
G4EmParameters::SetDeexActiveRegion(const G4String& region, G4bool adeex,
|
||||
G4bool aauger, G4bool apixe)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
if(fdeex) { fluo = true; }
|
||||
G4String r = CheckRegion(region);
|
||||
G4int nreg = m_regnamesDeex.size();
|
||||
if(0 == nreg && r != "DefaultRegionForTheWorld") {
|
||||
m_regnamesDeex.push_back("DefaultRegionForTheWorld");
|
||||
m_fluo.push_back(false);
|
||||
m_auger.push_back(false);
|
||||
m_pixe.push_back(false);
|
||||
nreg = 1;
|
||||
}
|
||||
for(G4int i=0; i<nreg; ++i) {
|
||||
if(r == m_regnamesDeex[i]) {
|
||||
m_fluo[i] = fdeex;
|
||||
m_auger[i]= fauger;
|
||||
m_pixe[i] = fpixe;
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_regnamesDeex.push_back(r);
|
||||
m_fluo.push_back(fdeex);
|
||||
m_auger.push_back(fauger);
|
||||
m_pixe.push_back(fpixe);
|
||||
fCParameters->SetDeexActiveRegion(region, adeex, aauger, apixe);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1178,24 +1072,7 @@ G4EmParameters::SetProcessBiasingFactor(const G4String& procname,
|
||||
G4double val, G4bool wflag)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
if(val > 0.0) {
|
||||
G4int n = m_procBiasedXS.size();
|
||||
for(G4int i=0; i<n; ++i) {
|
||||
if(procname == m_procBiasedXS[i]) {
|
||||
m_factBiasedXS[i] = val;
|
||||
m_weightBiasedXS[i]= wflag;
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_procBiasedXS.push_back(procname);
|
||||
m_factBiasedXS.push_back(val);
|
||||
m_weightBiasedXS.push_back(wflag);
|
||||
} else {
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Process: " << procname << " XS biasing factor "
|
||||
<< val << " is negative - ignored";
|
||||
PrintWarning(ed);
|
||||
}
|
||||
fBParameters->SetProcessBiasingFactor(procname, val, wflag);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1205,27 +1082,7 @@ G4EmParameters::ActivateForcedInteraction(const G4String& procname,
|
||||
G4bool wflag)
|
||||
{
|
||||
if(IsLocked() && !gener) { return; }
|
||||
G4String r = CheckRegion(region);
|
||||
if(length >= 0.0) {
|
||||
G4int n = m_procForced.size();
|
||||
for(G4int i=0; i<n; ++i) {
|
||||
if(procname == m_procForced[i] && r == m_regnamesForced[i] ) {
|
||||
m_lengthForced[i] = length;
|
||||
m_weightForced[i]= wflag;
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_regnamesForced.push_back(r);
|
||||
m_procForced.push_back(procname);
|
||||
m_lengthForced.push_back(length);
|
||||
m_weightForced.push_back(wflag);
|
||||
} else {
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Process: " << procname << " in region " << r
|
||||
<< " : forced interacttion length= "
|
||||
<< length << " is negative - ignored";
|
||||
PrintWarning(ed);
|
||||
}
|
||||
fBParameters->ActivateForcedInteraction(procname, region, length, wflag);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1235,109 +1092,69 @@ G4EmParameters::ActivateSecondaryBiasing(const G4String& procname,
|
||||
G4double energyLim)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
G4String r = CheckRegion(region);
|
||||
if(factor >= 0.0 && energyLim >= 0.0) {
|
||||
G4int n = m_procBiasedSec.size();
|
||||
for(G4int i=0; i<n; ++i) {
|
||||
if(procname == m_procBiasedSec[i] && r == m_regnamesBiasedSec[i] ) {
|
||||
m_factBiasedSec[i] = factor;
|
||||
m_elimBiasedSec[i] = energyLim;
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_regnamesBiasedSec.push_back(r);
|
||||
m_procBiasedSec.push_back(procname);
|
||||
m_factBiasedSec.push_back(factor);
|
||||
m_elimBiasedSec.push_back(energyLim);
|
||||
} else {
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Process: " << procname << " in region " << r
|
||||
<< " : secondary bised factor= "
|
||||
<< factor << ", Elim= " << energyLim << " - ignored";
|
||||
PrintWarning(ed);
|
||||
}
|
||||
fBParameters->ActivateSecondaryBiasing(procname, region, factor, energyLim);
|
||||
}
|
||||
|
||||
void G4EmParameters::DefineRegParamForLoss(G4VEnergyLossProcess* ptr,
|
||||
G4bool isElectron) const
|
||||
{
|
||||
if(isElectron) { ptr->SetStepFunction(dRoverRange, finalRange, false); }
|
||||
else { ptr->SetStepFunction(dRoverRangeMuHad, finalRangeMuHad, false); }
|
||||
|
||||
G4RegionStore* regionStore = G4RegionStore::GetInstance();
|
||||
G4int n = m_regnamesSubCut.size();
|
||||
for(G4int i=0; i<n; ++i) {
|
||||
const G4Region* reg = regionStore->GetRegion(m_regnamesSubCut[i], false);
|
||||
if(reg) { ptr->ActivateSubCutoff(m_subCuts[i], reg); }
|
||||
}
|
||||
n = m_procBiasedXS.size();
|
||||
for(G4int i=0; i<n; ++i) {
|
||||
if(ptr->GetProcessName() == m_procBiasedXS[i]) {
|
||||
ptr->SetCrossSectionBiasingFactor(m_factBiasedXS[i],
|
||||
m_weightBiasedXS[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
n = m_procForced.size();
|
||||
for(G4int i=0; i<n; ++i) {
|
||||
if(ptr->GetProcessName() == m_procForced[i]) {
|
||||
ptr->ActivateForcedInteraction(m_lengthForced[i],
|
||||
m_regnamesForced[i],
|
||||
m_weightForced[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
n = m_procBiasedSec.size();
|
||||
for(G4int i=0; i<n; ++i) {
|
||||
if(ptr->GetProcessName() == m_procBiasedSec[i]) {
|
||||
ptr->ActivateSecondaryBiasing(m_regnamesBiasedSec[i],
|
||||
m_factBiasedSec[i],
|
||||
m_elimBiasedSec[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
fBParameters->DefineRegParamForLoss(ptr, isElectron);
|
||||
}
|
||||
|
||||
void G4EmParameters::DefineRegParamForEM(G4VEmProcess* ptr) const
|
||||
{
|
||||
G4int n = m_procBiasedXS.size();
|
||||
for(G4int i=0; i<n; ++i) {
|
||||
if(ptr->GetProcessName() == m_procBiasedXS[i]) {
|
||||
ptr->SetCrossSectionBiasingFactor(m_factBiasedXS[i],
|
||||
m_weightBiasedXS[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
n = m_procForced.size();
|
||||
for(G4int i=0; i<n; ++i) {
|
||||
if(ptr->GetProcessName() == m_procForced[i]) {
|
||||
ptr->ActivateForcedInteraction(m_lengthForced[i],
|
||||
m_regnamesForced[i],
|
||||
m_weightForced[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
n = m_procBiasedSec.size();
|
||||
for(G4int i=0; i<n; ++i) {
|
||||
if(ptr->GetProcessName() == m_procBiasedSec[i]) {
|
||||
ptr->ActivateSecondaryBiasing(m_regnamesBiasedSec[i],
|
||||
m_factBiasedSec[i],
|
||||
m_elimBiasedSec[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
fBParameters->DefineRegParamForEM(ptr);
|
||||
}
|
||||
|
||||
G4bool G4EmParameters::QuantumEntanglement()
|
||||
{
|
||||
return fBParameters->QuantumEntanglement();
|
||||
}
|
||||
|
||||
void G4EmParameters::SetQuantumEntanglement(G4bool v)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
fBParameters->SetQuantumEntanglement(v);
|
||||
}
|
||||
|
||||
G4bool G4EmParameters::GetDirectionalSplitting() {
|
||||
return fBParameters->GetDirectionalSplitting();
|
||||
}
|
||||
|
||||
void G4EmParameters::SetDirectionalSplitting(G4bool v)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
fBParameters->SetDirectionalSplitting(v);
|
||||
}
|
||||
|
||||
void G4EmParameters::SetDirectionalSplittingTarget(const G4ThreeVector& v)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
fBParameters->SetDirectionalSplittingTarget(v);
|
||||
}
|
||||
|
||||
G4ThreeVector G4EmParameters::GetDirectionalSplittingTarget() const
|
||||
{
|
||||
return fBParameters->GetDirectionalSplittingTarget();
|
||||
}
|
||||
|
||||
void G4EmParameters::SetDirectionalSplittingRadius(G4double r)
|
||||
{
|
||||
if(IsLocked()) { return; }
|
||||
fBParameters->SetDirectionalSplittingRadius(r);
|
||||
}
|
||||
|
||||
G4double G4EmParameters::GetDirectionalSplittingRadius()
|
||||
{
|
||||
return fBParameters->GetDirectionalSplittingRadius();
|
||||
}
|
||||
|
||||
void G4EmParameters::DefineRegParamForDeex(G4VAtomDeexcitation* ptr) const
|
||||
{
|
||||
G4int n = m_regnamesDeex.size();
|
||||
for(G4int i=0; i<n; ++i) {
|
||||
ptr->SetDeexcitationActiveRegion(m_regnamesDeex[i],
|
||||
m_fluo[i], m_auger[i], m_pixe[i]);
|
||||
}
|
||||
fCParameters->DefineRegParamForDeex(ptr);
|
||||
}
|
||||
|
||||
std::ostream& G4EmParameters::StreamInfo(std::ostream& os) const
|
||||
void G4EmParameters::StreamInfo(std::ostream& os) const
|
||||
{
|
||||
G4int prec = os.precision(5);
|
||||
os << "=======================================================================" << "\n";
|
||||
@@ -1345,10 +1162,13 @@ std::ostream& G4EmParameters::StreamInfo(std::ostream& os) const
|
||||
os << "=======================================================================" << "\n";
|
||||
os << "LPM effect enabled " <<flagLPM << "\n";
|
||||
os << "Spline of EM tables enabled " <<spline << "\n";
|
||||
os << "Enable creation and use of sampling tables " <<enableSamplingTable << "\n";
|
||||
os << "Enable creation and use of sampling tables " <<fSamplingTable << "\n";
|
||||
os << "Apply cuts on all EM processes " <<applyCuts << "\n";
|
||||
os << "Use integral approach for tracking " <<integral << "\n";
|
||||
os << "Use general process " <<gener << "\n";
|
||||
os << "Enable linear polarisation for gamma " <<fPolarisation << "\n";
|
||||
os << "Enable sampling of quantum entanglement "
|
||||
<<fBParameters->QuantumEntanglement() << "\n";
|
||||
os << "X-section factor for integral approach " <<lambdaFactor << "\n";
|
||||
os << "Min kinetic energy for tables "
|
||||
<<G4BestUnit(minKinEnergy,"Energy") << "\n";
|
||||
@@ -1363,16 +1183,19 @@ std::ostream& G4EmParameters::StreamInfo(std::ostream& os) const
|
||||
<<G4BestUnit(bremsTh,"Energy") << "\n";
|
||||
os << "Lowest triplet kinetic energy "
|
||||
<<G4BestUnit(lowestTripletEnergy,"Energy") << "\n";
|
||||
os << "Enable sampling of gamma linear polarisation " <<fPolarisation << "\n";
|
||||
os << "5D gamma conversion model type " <<tripletConv << "\n";
|
||||
os << "5D gamma conversion model on isolated ion " <<onIsolated << "\n";
|
||||
|
||||
os << "=======================================================================" << "\n";
|
||||
os << "====== Ionisation Parameters ========" << "\n";
|
||||
os << "=======================================================================" << "\n";
|
||||
os << "Step function for e+- " <<"("<< dRoverRange
|
||||
<< ", " << finalRange/CLHEP::mm << " mm)\n";
|
||||
os << "Step function for muons/hadrons " <<"("<< dRoverRangeMuHad
|
||||
<< ", " << finalRangeMuHad/CLHEP::mm << " mm)\n";
|
||||
os << "Step function for e+- "
|
||||
<<"("<<fBParameters->GetStepFunctionP1() << ", "
|
||||
<< fBParameters->GetStepFunctionP2()/CLHEP::mm << " mm)\n";
|
||||
os << "Step function for muons/hadrons "
|
||||
<<"("<<fBParameters->GetStepFunctionMuHadP1() << ", "
|
||||
<< fBParameters->GetStepFunctionMuHadP2()/CLHEP::mm << " mm)\n";
|
||||
os << "Lowest e+e- kinetic energy "
|
||||
<<G4BestUnit(lowestElectronEnergy,"Energy") << "\n";
|
||||
os << "Lowest muon/hadron kinetic energy "
|
||||
@@ -1387,6 +1210,8 @@ std::ostream& G4EmParameters::StreamInfo(std::ostream& os) const
|
||||
os << "Factor of cut reduction for sub-cutoff method " << minSubRange << "\n";
|
||||
os << "Max kinetic energy for CSDA tables "
|
||||
<<G4BestUnit(maxKinEnergyCSDA,"Energy") << "\n";
|
||||
os << "Max kinetic energy for NIEL computation "
|
||||
<<G4BestUnit(maxNIELEnergy,"Energy") << "\n";
|
||||
os << "Linear loss limit " <<linLossLimit << "\n";
|
||||
|
||||
os << "=======================================================================" << "\n";
|
||||
@@ -1413,39 +1238,55 @@ std::ostream& G4EmParameters::StreamInfo(std::ostream& os) const
|
||||
os << "Type of nuclear form-factor " <<nucFormfactor << "\n";
|
||||
os << "Screening factor " <<factorScreen << "\n";
|
||||
|
||||
if(fCParameters->Fluo()) {
|
||||
os << "=======================================================================" << "\n";
|
||||
os << "====== Atomic Deexcitation Parameters ========" << "\n";
|
||||
os << "=======================================================================" << "\n";
|
||||
os << "Fluorescence enabled " <<fluo << "\n";
|
||||
os << "Fluorescence Bearden data files enabled " <<beardenFluoDir << "\n";
|
||||
os << "Auger electron production enabled " <<auger << "\n";
|
||||
os << "Auger cascade enabled " <<augerCascade << "\n";
|
||||
os << "PIXE atomic de-excitation enabled " <<pixe << "\n";
|
||||
os << "De-excitation module ignores cuts " <<deexIgnoreCut << "\n";
|
||||
os << "Type of PIXE cross section for hadrons " <<namePIXE << "\n";
|
||||
os << "Type of PIXE cross section for e+- " <<nameElectronPIXE << "\n";
|
||||
|
||||
os << "Fluorescence enabled " <<fCParameters->Fluo() << "\n";
|
||||
os << "Fluorescence Bearden data files enabled "
|
||||
<<fCParameters->BeardenFluoDir() << "\n";
|
||||
os << "Auger electron cascade enabled "
|
||||
<<fCParameters->Auger() << "\n";
|
||||
os << "PIXE atomic de-excitation enabled " <<fCParameters->Pixe() << "\n";
|
||||
os << "De-excitation module ignores cuts "
|
||||
<<fCParameters->DeexcitationIgnoreCut() << "\n";
|
||||
os << "Type of PIXE cross section for hadrons "
|
||||
<<fCParameters->PIXECrossSectionModel() << "\n";
|
||||
os << "Type of PIXE cross section for e+- "
|
||||
<<fCParameters->PIXEElectronCrossSectionModel() << "\n";
|
||||
}
|
||||
if(fDNA) {
|
||||
os << "=======================================================================" << "\n";
|
||||
os << "====== DNA Physics Parameters ========" << "\n";
|
||||
os << "=======================================================================" << "\n";
|
||||
os << "Use fast sampling in DNA models " << dnaFast << "\n";
|
||||
os << "Use Stationary option in DNA models " << dnaStationary << "\n";
|
||||
os << "Use DNA with multiple scattering of e- " << dnaMsc << "\n";
|
||||
os << "Use fast sampling in DNA models "
|
||||
<< fCParameters->DNAFast() << "\n";
|
||||
os << "Use Stationary option in DNA models "
|
||||
<< fCParameters->DNAStationary() << "\n";
|
||||
os << "Use DNA with multiple scattering of e- "
|
||||
<< fCParameters->DNAElectronMsc() << "\n";
|
||||
os << "Use DNA e- solvation model type "
|
||||
<< dnaElectronSolvation << "\n";
|
||||
<< fCParameters->DNAeSolvationSubType() << "\n";
|
||||
os << "=======================================================================" << "\n";
|
||||
}
|
||||
os.precision(prec);
|
||||
return os;
|
||||
}
|
||||
|
||||
void G4EmParameters::Dump() const
|
||||
{
|
||||
#ifdef G4MULTITHREADED
|
||||
G4MUTEXLOCK(&emParametersMutex);
|
||||
#endif
|
||||
StreamInfo(G4cout);
|
||||
#ifdef G4MULTITHREADED
|
||||
G4MUTEXUNLOCK(&emParametersMutex);
|
||||
#endif
|
||||
}
|
||||
|
||||
std::ostream& operator<< (std::ostream& os, const G4EmParameters& par)
|
||||
{
|
||||
return par.StreamInfo(os);
|
||||
par.StreamInfo(os);
|
||||
return os;
|
||||
}
|
||||
|
||||
G4bool G4EmParameters::IsLocked() const
|
||||
|
||||
Reference in New Issue
Block a user