65 G4cout <<
"G4LivermoreGammaConversion5DModel is constructed " <<
G4endl;
93 G4cout <<
"Calling Initialise() of G4LivermoreGammaConversion5DModel."
110 char* path = std::getenv(
"G4LEDATA");
114 for(
G4int i=0; i<numOfCouples; ++i)
121 for (
G4int j=0; j<nelm; ++j)
136 G4cout <<
"Calling ReadData() of G4LivermoreGammaConversion5DModel"
140 if(
data[
Z]) {
return; }
141 const char* datadir = path;
144 datadir = std::getenv(
"G4LEDATA");
147 G4Exception(
"G4LivermoreGammaConversion5DModel::ReadData()",
149 "Environment variable G4LEDATA not defined");
154 std::ostringstream ost;
155 ost << datadir <<
"/epics2017/pair/pp-cs-" <<
Z <<
".dat";
156 std::ifstream fin(ost.str().c_str());
161 ed <<
"G4LivermoreGammaConversion5DModel data file <" << ost.str().c_str()
162 <<
"> is not opened!" <<
G4endl;
163 G4Exception(
"G4LivermoreGammaConversion5DModel::ReadData()",
165 ed,
"G4LEDATA version should be G4EMLOW6.27 or later.");
171 <<
" is opened by G4LivermoreGammaConversion5DModel" <<
G4endl;}
185 G4cout <<
"G4LivermoreGammaConversion5DModel::ComputeCrossSectionPerAtom() Z= "
199 if(!pv) {
return xs; }
202 xs = pv->
Value(GammaEnergy);
205 G4cout <<
"*** Gamma conversion xs for Z=" <<
Z <<
" at energy E(MeV)="
std::vector< const G4Element * > G4ElementVector
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
static constexpr double millibarn
static constexpr double GeV
static constexpr double MeV
#define G4MUTEX_INITIALIZER
G4GLOB_DLL std::ostream G4cout
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4ParticleChangeForGamma * fParticleChange
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
static G4double lowEnergyLimit
void ReadData(size_t Z, const char *path=nullptr)
G4LivermoreGammaConversion5DModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="Livermore5DConversion")
void InitialiseForElement(const G4ParticleDefinition *, G4int Z) override
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0.0, G4double cut=0.0, G4double emax=DBL_MAX) override
static G4PhysicsFreeVector * data[maxZ]
virtual ~G4LivermoreGammaConversion5DModel()
const G4Material * GetMaterial() const
const G4ElementVector * GetElementVector() const
size_t GetNumberOfElements() const
G4bool Retrieve(std::ifstream &fIn, G4bool ascii=false)
G4double Value(const G4double energy, std::size_t &lastidx) const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
std::size_t GetTableSize() const
static G4ProductionCutsTable * GetProductionCutsTable()
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4double LowEnergyLimit() const
void SetCurrentCouple(const G4MaterialCutsCouple *)
G4double HighEnergyLimit() const
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
static constexpr double electron_mass_c2
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4Mutex LivermoreGammaConversion5DModelMutex