IAP GITLAB

Commit e505d886 authored by KOTENKO Andrii's avatar KOTENKO Andrii

synchoronized system of units with 'svn/geant4' branch. Added a comment to the...

synchoronized system of units with 'svn/geant4' branch. Added a comment to the interface README_... file
parent 1037f304
......@@ -212,3 +212,13 @@ EXAMPLE: USING CRMC IN GEANT4 PROGRAM
..
5) There are 2 options for switching between Geant4-CRMC hadronic models:
a) by energy threshold, so that in every hadronic interaction:
- if E<E_threshold Geant4 model is used
- if E>E_threshold CRMC model is used
b) by using energy interval where contribution of the models is changed smoothly:
probability of interaction by specific model changes linearly in this transition region
To set threshold one should use G4HadronPhysicsCRMC::SetEnergyThreshold(double),
for smooth transition G4HadronPhysicsCRMC::SetEnergyThreshold(double, double).
By default, if not specified otherwise, energy threshold of 300 GeV is used
......@@ -25,8 +25,8 @@
G4ThreadLocal G4VComponentCrossSection* G4HadronPhysicsCRMC::theGGNuclNuclXS = 0;
G4ThreadLocal G4VCrossSectionDataSet* G4HadronPhysicsCRMC::theNuclNuclData = 0;
static constexpr double THRESHOLD_ENERGY_GEV_DEFAULT=300.;
static constexpr double ELASTIC_MIN_ENERGY_GEV = 1e5;
static constexpr double THRESHOLD_ENERGY_GEV_DEFAULT=300.*GeV;
static constexpr double ELASTIC_MIN_ENERGY_GEV = 100.*TeV;
static constexpr double HIGH_ENERGY_MODEL_CRITERION = 100.*GeV;
......@@ -34,8 +34,8 @@ const std::array<std::string, 13> G4HadronPhysicsCRMC::fModelNames = { "EPOS-LHC
"SIBYLL-2.3", "QGSJETII-04", "", "", "", "QGSJETII-03", "DPMJET-3.06" };
G4HadronPhysicsCRMC::G4HadronPhysicsCRMC(int model):G4VHadronPhysics("HadronIonInelasticCrmc"),
fEthr(THRESHOLD_ENERGY_GEV_DEFAULT*GeV),
fEthr_2(THRESHOLD_ENERGY_GEV_DEFAULT*GeV),
fEthr(THRESHOLD_ENERGY_GEV_DEFAULT),
fEthr_2(THRESHOLD_ENERGY_GEV_DEFAULT),
fModel(model),
fPrintDebug(false),
fTrivial(nullptr),
......@@ -60,7 +60,7 @@ void G4HadronPhysicsCRMC::ConstructProcess()
// * Elastic interactions above 100 TeV
fTrivial = new G4HadronElastic();
fTrivial->SetMinEnergy(ELASTIC_MIN_ENERGY_GEV*GeV);
fTrivial->SetMinEnergy(ELASTIC_MIN_ENERGY_GEV);
fTrivial->SetMaxEnergy(fCRMC->GetMaxEnergy()); // Use the same Max energy as in the inelastic model
......@@ -228,25 +228,25 @@ void G4HadronPhysicsCRMC::AddProcess(const G4String& name, G4ParticleDefinition*
}
}
//! Energy threshold (in internal GeV) to switch between
//! Energy threshold (in internal Geant4 units) to switch between
//! Geant4 and CRMC physics
void G4HadronPhysicsCRMC::SetEnergyThreshold(double thr)
{
fEthr = thr*GeV;
fEthr_2 = thr*GeV;
fEthr = thr;
fEthr_2 = thr;
}
//! Energies boundaries of Geant4-CRMC transition region (in GeV)
//! Energy limits of Geant4-CRMC transition region
void G4HadronPhysicsCRMC::SetEnergyThreshold(double E1, double E2)
{
if(E2>E1)
{
fEthr = E1*GeV;
fEthr_2 = E2*GeV;
fEthr = E1;
fEthr_2 = E2;
}
else
{
fEthr = E2*GeV;
fEthr_2 = E1*GeV;
fEthr = E2;
fEthr_2 = E1;
}
}
......@@ -42,9 +42,10 @@ public:
// registered to the process manager of each particle type
void ConstructProcess();
//! Energy threshold (in internal GeV) to switch between
//! Geant4 and CRMC physics
//! Energy threshold (in MeV - default Geant4 energy units) to switch between
//! Geant4 and CRMC hadronic physics
void SetEnergyThreshold(double thr);
// makes a smooth linear transition between Geant4 and CRMC hadronic models in the specified range
void SetEnergyThreshold(double E1, double E2);
//! Set verbosity to debug level
......@@ -63,12 +64,12 @@ private:
static G4ThreadLocal G4VCrossSectionDataSet* theNuclNuclData;
static G4ThreadLocal G4VComponentCrossSection* theGGNuclNuclXS;
//! Energy threshould (in GeV) to switch between
//! Energy threshould to switch between
//! Geant4 and CRMC physics
double fEthr;
// variable is set when user defines a transition region (using SetEnergyThreshold(double,double) method)
// where model is switched from Geant4 to CRMC
// variable which used when user defines a transition region (using SetEnergyThreshold(double,double) method)
// where hadronic physics changes from Geant4 to CRMC
double fEthr_2;
//! CRMC model id (0,1 - Epos, 12 - Dpmjet, etc.)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment