48 theCrossSectionHandler(0)
59 fLowEnergyLimit = 10.0*
eV;
60 fHighEnergyLimit = 100.0*
GeV;
69 if (theCrossSectionHandler)
70 delete theCrossSectionHandler;
82 G4cout <<
"Entering in method G4PenelopeIonisationCrossSection::CrossSection()" <<
G4endl;
91 ed <<
"The method has been called with a null G4Material pointer" <<
G4endl;
92 G4Exception(
"G4PenelopeIonisationCrossSection::CrossSection()",
"em2042",
97 if (!theCrossSectionHandler)
104 if(
G4int(shell) < nmax &&
105 incidentEnergy >= fLowEnergyLimit && incidentEnergy <= fHighEnergyLimit)
111 G4int index = FindShellIDIndex(material,Z,shell);
128 ed <<
"There is something wrong here: it looks like the index is wrong" <<
G4endl;
129 ed <<
"Requested: shell " <<
G4int(shell) <<
" and Z = " << Z <<
G4endl;
131 G4Exception(
"G4PenelopeIonisationCrossSection::CrossSection()",
"em2043",
143 cross = crossPerMolecule/atomsPerMolec;
146 if (verboseLevel > 0)
148 G4cout <<
"Cross section of shell " <<
G4int(shell) <<
" and Z= " <<
Z;
149 G4cout <<
" of material: " << material->
GetName() <<
" and energy = " << incidentEnergy/
keV <<
" keV" <<
G4endl;
153 if (verboseLevel > 2)
155 G4cout <<
"Cross section per molecule: " << crossPerMolecule/
barn <<
" barn" <<
G4endl;
156 G4cout <<
"Atoms " << Z <<
" per molecule: " << atomsPerMolec <<
G4endl;
165 std::vector<G4double>
172 std::vector<G4double> vec(nmax,0.0);
181 std::vector<G4double>
189 size_t n = vec.size();
192 for(i=0; i<
n; ++i) { sum += vec[i]; }
195 for(i=0; i<
n; ++i) { vec[i] = vec[i]*sum; }
202 G4int G4PenelopeIonisationCrossSection::FindShellIDIndex(
const G4Material* mat,
206 if (verboseLevel > 1)
207 G4cout <<
"Entering in method G4PenelopeIonisationCrossSection::FindShellIDIndex()" <<
G4endl;
210 shellIDTable =
new std::map< std::pair<const G4Material*,G4int>,
G4DataVector*>;
212 std::pair<const G4Material*,G4int> theKey = std::make_pair(mat,Z);
216 if (shellIDTable->count(theKey))
218 if (verboseLevel > 2)
220 G4DataVector* theVec = shellIDTable->find(theKey)->second;
222 if (ishell>=0 && ishell < (
G4int) theVec->size())
223 result = (
G4int) (*theVec)[ishell];
227 ed <<
"Shell ID: " << ishell <<
" not available for material " << mat->
GetName() <<
" and Z = " <<
236 if (verboseLevel > 2)
240 size_t numberOfOscillators = theTable->size();
244 G4DataVector* dat =
new G4DataVector(nMaxLevels,-1);
245 for (
size_t iosc=0;iosc<numberOfOscillators;iosc++)
256 if ((shFlag-1) == ishell)
257 result = (
G4int) iosc;
260 shellIDTable->insert(std::make_pair(theKey,dat));
263 if (verboseLevel > 1)
264 G4cout <<
"Leaving method G4PenelopeIonisationCrossSection::FindShellIDIndex() with index = " << result <<
G4endl;
G4double G4ParticleHPJENDLHEData::G4double result
std::vector< G4double > Probabilities(G4int Z, G4double incidentEnergy, G4double mass, G4double deltaEnergy, const G4Material *mat)
G4PenelopeOscillatorTable * GetOscillatorTableIonisation(const G4Material *)
G4double GetIonisationEnergy()
G4PenelopeIonisationCrossSection()
Constructor.
G4int NumberOfShells(G4int Z) const
std::ostringstream G4ExceptionDescription
const G4String & GetName() const
const G4PenelopeCrossSection * GetCrossSectionTableForCouple(const G4ParticleDefinition *, const G4Material *, const G4double cut) const
G4PenelopeOscillator * GetOscillatorIonisation(const G4Material *, G4int)
G4GLOB_DLL std::ostream G4cout
static constexpr double eV
static G4PenelopeOscillatorManager * GetOscillatorManager()
G4double GetResonanceEnergy() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
~G4PenelopeIonisationCrossSection()
Destructor. Clean all tables.
std::vector< G4PenelopeOscillator * > G4PenelopeOscillatorTable
std::vector< G4double > GetCrossSection(G4int Z, G4double incidentEnergy, G4double mass, G4double deltaEnergy, const G4Material *mat)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static constexpr double GeV
static G4Electron * Electron()
void BuildXSTable(const G4Material *, G4double cut, const G4ParticleDefinition *, G4bool isMaster=true)
This can be inkoved only by the master.
G4double CrossSection(G4int Z, G4AtomicShellEnumerator shell, G4double incidentEnergy, G4double mass, const G4Material *mat)
G4double GetNumberOfZAtomsPerMolecule(const G4Material *, G4int Z)
static constexpr double barn
static G4AtomicTransitionManager * Instance()
static constexpr double keV
G4double GetShellCrossSection(size_t shellID, G4double energy) const
Returns the hard cross section for the given shell (per molecule)