68 G4cout <<
"G4LivermoreGammaConversionModel is constructed " <<
G4endl;
96 G4cout <<
"Calling Initialise() of G4LivermoreGammaConversionModel."
114 char* path = std::getenv(
"G4LEDATA");
116 size_t numElems = (*elemTable).size();
117 for(
size_t ie = 0; ie < numElems; ++ie)
121 if(
data[
Z] ==
nullptr)
136 G4cout <<
"Calling ReadData() of G4LivermoreGammaConversionModel"
140 if(
data[
Z]!=
nullptr) {
return; }
142 const char* datadir = path;
144 if(datadir ==
nullptr)
146 datadir = std::getenv(
"G4LEDATA");
147 if(datadir ==
nullptr)
149 G4Exception(
"G4LivermoreGammaConversionModel::ReadData()",
151 "Environment variable G4LEDATA not defined");
156 std::ostringstream ost;
158 ost << datadir <<
"/livermore/pair/pp-cs-" <<
Z <<
".dat";
160 ost << datadir <<
"/epics2017/pair/pp-cs-" <<
Z <<
".dat";
163 std::ifstream fin(ost.str().c_str());
168 ed <<
"G4LivermoreGammaConversionModel data file <" << ost.str().c_str()
169 <<
"> is not opened!" <<
G4endl;
170 G4Exception(
"G4LivermoreGammaConversionModel::ReadData()",
172 ed,
"G4LEDATA version should be G4EMLOW6.27 or later.");
179 <<
" is opened by G4LivermoreGammaConversionModel" <<
G4endl;}
193 G4cout <<
"G4LivermoreGammaConversionModel::ComputeCrossSectionPerAtom() Z= "
211 if(pv ==
nullptr) {
return xs; }
214 xs = pv->
Value(GammaEnergy);
218 G4cout <<
"*** Gamma conversion xs for Z=" <<
Z <<
" at energy E(MeV)="
std::vector< G4Element * > G4ElementTable
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
static G4ElementTable * GetElementTable()
static G4EmParameters * Instance()
static G4PhysicsFreeVector * data[101]
G4ParticleChangeForGamma * fParticleChange
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0.0, G4double cut=0.0, G4double emax=DBL_MAX) override
void InitialiseForElement(const G4ParticleDefinition *, G4int Z) override
virtual ~G4LivermoreGammaConversionModel()
static G4double lowEnergyLimit
void ReadData(size_t Z, const char *path=nullptr)
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4LivermoreGammaConversionModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="LivermoreConversion")
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4bool Retrieve(std::ifstream &fIn, G4bool ascii=false)
G4double Value(const G4double energy, std::size_t &lastidx) const
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4double LowEnergyLimit() const
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 LivermoreGammaConversionModelMutex