52G4String G4LivermoreGammaConversion5DModel::gDataDirectory =
"";
58 fParticleChange =
nullptr;
59 lowEnergyLimit = 2. * CLHEP::electron_mass_c2;
65 if (verboseLevel > 0) {
66 G4cout <<
"G4LivermoreGammaConversion5DModel is constructed " <<
G4endl;
75 for (
G4int i = 0; i < maxZ; ++i) {
91 if (verboseLevel > 1) {
92 G4cout <<
"Calling Initialise() of G4LivermoreGammaConversion5DModel." <<
G4endl
103 std::size_t numElems = (*elemTable).size();
104 for (std::size_t ie = 0; ie < numElems; ++ie) {
106 const G4int Z = std::min(maxZ,
elem->GetZasInt());
107 if (data[Z] ==
nullptr) {
117 isInitialised =
true;
122const G4String& G4LivermoreGammaConversion5DModel::FindDirectoryPath()
125 if (gDataDirectory.empty()) {
127 std::ostringstream ost;
128 if (param->LivermoreDataDir() ==
"livermore") {
129 ost << param->GetDirLEDATA() <<
"/livermore/pair/";
133 ost << param->GetDirLEDATA() <<
"/epics2017/pair/";
135 gDataDirectory = ost.str();
137 return gDataDirectory;
142void G4LivermoreGammaConversion5DModel::ReadData(
const G4int Z)
144 if (verboseLevel > 1) {
145 G4cout <<
"Calling ReadData() of G4LivermoreGammaConversion5DModel" <<
G4endl;
152 std::ostringstream ost;
153 ost << FindDirectoryPath() <<
"pp-cs-" << Z <<
".dat";
157 std::ifstream fin(ost.str().c_str());
159 if (!fin.is_open()) {
161 ed <<
"G4LivermoreGammaConversion5DModel data file <" << ost.str().c_str() <<
"> is not opened!"
164 "G4LEDATA version should be G4EMLOW8.0 or later.");
168 if (verboseLevel > 1) {
169 G4cout <<
"File " << ost.str() <<
" is opened by G4LivermoreGammaConversion5DModel" <<
G4endl;
184 if (verboseLevel > 1) {
185 G4cout <<
"G4LivermoreGammaConversion5DModel::ComputeCrossSectionPerAtom() Z= " << Z <<
G4endl;
188 if (GammaEnergy < lowEnergyLimit) {
204 xs = pv->
Value(GammaEnergy);
205 if (verboseLevel > 0) {
206 G4cout <<
"*** Gamma conversion xs for Z=" << Z <<
" at energy E(MeV)=" << GammaEnergy / MeV
207 <<
" cs=" << xs / millibarn <<
" mb" <<
G4endl;
216 G4AutoLock l(&LivermoreGammaConversion5DModelMutex);
std::vector< G4Element * > G4ElementTable
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
#define G4MUTEX_INITIALIZER
G4GLOB_DLL std::ostream G4cout
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
static G4ElementTable * GetElementTable()
static G4EmParameters * Instance()
~G4LivermoreGammaConversion5DModel() override
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
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
G4bool Retrieve(std::ifstream &fIn, G4bool ascii=false)
G4double Value(const G4double energy, std::size_t &lastidx) const
void FillSecondDerivatives(const G4SplineType=G4SplineType::Base, const G4double dir1=0.0, const G4double dir2=0.0)
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4double LowEnergyLimit() const
G4double HighEnergyLimit() const
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)