73 G4cout <<
"G4GammaNuclearXS::G4GammaNuclearXS Initialise for Z < "
91 outFile <<
"G4GammaNuclearXS calculates the gamma nuclear\n"
92 <<
"cross-section for GDR energy region on nuclei using data from the high precision\n"
93 <<
"IAEA photonuclear database (2019). Then liniear connection\n"
94 <<
"implemented with previous CHIPS photonuclear model\n";
125 xs = pv->Value(ekin);
183 if(
nullptr != pviso) {
185 if(ekin <= emaxiso) {
186 xs = pviso->Value(ekin);
191 const G4double lxs = pviso->Value(emaxiso);
196 G4cout <<
"G4GammaNuclearXS::IsoXS: Z= " <<
Z <<
" A= " <<
A
207 if(ekin <=
emax &&
Z != 1) {
208 xs = pv->Value(ekin)*
A/
aeff[
Z];
212 if(Z <= 2 && ekin > 10.*
GeV) {
227 G4cout <<
"G4GammaNuclearXS::IsoXS: Z= " <<
Z <<
" A= " <<
A
241 if(1 == nIso) {
return iso; }
251 for (j=0; j<nIso; ++j) {
252 sum += abundVector[j];
262 if(
nn < nIso) {
temp.resize(nIso, 0.); }
264 for (j=0; j<nIso; ++j) {
267 sum += abundVector[j]*
272 for (j = 0; j<nIso; ++j) {
285 G4cout <<
"G4GammaNuclearXS::BuildPhysicsTable for "
291 <<
" only gamma is allowed";
292 G4Exception(
"G4GammaNuclearXS::BuildPhysicsTable(..)",
"had012",
297 if(
nullptr ==
data) {
298#ifdef G4MULTITHREADED
300 if(
nullptr ==
data) {
306#ifdef G4MULTITHREADED
317 for (
auto & elm : *table ) {
324 size_t nIso =
temp.size();
325 for (
auto & elm : *table ) {
326 size_t n = elm->GetNumberOfIsotopes();
327 if(
n > nIso) { nIso =
n; }
329 temp.resize(nIso, 0.0);
337 char* path = std::getenv(
"G4PARTICLEXSDATA");
338 if (
nullptr != path) {
339 std::ostringstream ost;
340 ost << path <<
"/gamma/inel";
343 G4Exception(
"G4GammaNuclearXS::Initialise(..)",
"had013",
345 "Environment variable G4PARTICLEXSDATA is not defined");
353#ifdef G4MULTITHREADED
358#ifdef G4MULTITHREADED
369 std::ostringstream ost;
386 std::ostringstream ost1;
406 std::ifstream filein(ost.str().c_str());
407 if (!filein.is_open()) {
410 ed <<
"Data file <" << ost.str().c_str()
411 <<
"> is not opened!";
412 G4Exception(
"G4GammaNuclearXS::RetrieveVector(..)",
"had014",
417 G4cout <<
"File " << ost.str()
418 <<
" is opened by G4GammaNuclearXS" <<
G4endl;
428 ed <<
"Data file <" << ost.str().c_str()
429 <<
"> is not retrieved!";
430 G4Exception(
"G4GammaNuclearXS::RetrieveVector(..)",
"had015",
static const G4double emax
std::vector< G4Element * > G4ElementTable
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
static const G4int amax[]
static const G4double aeff[]
static const G4int amin[]
static constexpr double GeV
#define G4MUTEX_INITIALIZER
#define G4MUTEXLOCK(mutex)
#define G4MUTEXUNLOCK(mutex)
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=false)
static G4CrossSectionDataSetRegistry * Instance()
G4double GetKineticEnergy() const
void SetKineticEnergy(G4double aEnergy)
G4PhysicsVector * GetComponentDataByIndex(G4int Z, G4int idx)
void InitialiseForComponent(G4int Z, G4int nComponents=0)
void InitialiseForElement(G4int Z, G4PhysicsVector *v)
G4PhysicsVector * GetElementData(G4int Z)
void AddComponent(G4int Z, G4int id, G4PhysicsVector *v)
void SetName(const G4String &nam)
static G4ElementTable * GetElementTable()
G4double * GetRelativeAbundanceVector() const
const G4Isotope * GetIsotope(G4int iso) const
size_t GetNumberOfIsotopes() const
G4double GetIsoCrossSection(const G4DynamicParticle *, G4int Z, G4int A, const G4Isotope *iso=nullptr, const G4Element *elm=nullptr, const G4Material *mat=nullptr) final
static const G4int MAXZGAMMAXS
const G4ParticleDefinition * gamma
G4PhysicsVector * RetrieveVector(std::ostringstream &in, G4bool isElement, G4int Z)
~G4GammaNuclearXS() final
const G4String & FindDirectoryPath()
void InitialiseOnFly(G4int Z)
void BuildPhysicsTable(const G4ParticleDefinition &) final
static G4double xs150[MAXZGAMMAXS]
G4double ElementCrossSection(G4double ekin, G4int Z)
G4VCrossSectionDataSet * ggXsection
G4bool IsIsoApplicable(const G4DynamicParticle *, G4int Z, G4int A, const G4Element *, const G4Material *mat) final
static G4double coeff[3][3]
static const G4int rTransitionBound
static G4ElementData * data
std::vector< G4double > temp
G4double GetElementCrossSection(const G4DynamicParticle *, G4int Z, const G4Material *mat=nullptr) final
G4PhysicsVector * GetPhysicsVector(G4int Z)
void CrossSectionDescription(std::ostream &) const final
G4double IsoCrossSection(G4double ekin, G4int Z, G4int A)
const G4int freeVectorException[11]
const G4Isotope * SelectIsotope(const G4Element *, G4double kinEnergy, G4double logE) final
G4bool IsElementApplicable(const G4DynamicParticle *, G4int Z, const G4Material *) final
static G4String gDataDirectory
const G4String & GetParticleName() const
G4double GetMaxEnergy() const
G4bool Retrieve(std::ifstream &fIn, G4bool ascii=false)
virtual G4double GetElementCrossSection(const G4DynamicParticle *, G4int Z, const G4Material *mat=nullptr)
virtual G4double GetIsoCrossSection(const G4DynamicParticle *, G4int Z, G4int A, const G4Isotope *iso=nullptr, const G4Element *elm=nullptr, const G4Material *mat=nullptr)
void SetForAllAtomsAndEnergies(G4bool val)
static constexpr double barn
static constexpr double MeV
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