52 if(r ==
"") { r =
"DefaultRegionForTheWorld"; }
54 if(
nullptr == reg && verbose > 0) {
55 G4cout <<
"### G4EmUtility WARNING: fails to find a region <"
57 }
else if(verbose > 1) {
58 G4cout <<
"### G4EmUtility finds out G4Region <" << r <<
">"
73 for(std::size_t i=0; i<nElements; ++i) {
75 x -= y[i]*elm->
GetZ();
76 if(x <= 0.0) {
break; }
91 for(std::size_t idx=0; idx<ni; ++idx) {
106 std::vector<G4double>* ptr =
nullptr;
107 if(
nullptr == p) {
return ptr; }
109 const std::size_t n = p->
length();
110 ptr =
new std::vector<G4double>;
117 for (std::size_t i=0; i<n; ++i) {
122 for (
G4int j=0; j<nb; ++j) {
148std::vector<G4double>*
152 std::vector<G4double>* ptr =
nullptr;
153 if(
nullptr == p ||
nullptr == part) {
return ptr; }
165 ptr =
new std::vector<G4double>;
171 G4double e, sig, ee, x, sm, em, emin, emax;
174 for (std::size_t i=0; i<n; ++i) {
177 emax = std::max(tmax, 2*emin);
178 ee =
G4Log(emax/emin);
181 if(nbin < 4) { nbin = 4; }
186 for(
G4int j=0; j<=nbin; ++j) {
191 e = (j+1 < nbin) ? e*x : emax;
210std::vector<G4TwoPeaksXS*>*
213 std::vector<G4TwoPeaksXS*>* ptr =
nullptr;
214 if(
nullptr == p) {
return ptr; }
217 ptr =
new std::vector<G4TwoPeaksXS*>;
218 ptr->resize(n,
nullptr);
221 G4double e1peak, e1deep, e2peak, e2deep, e3peak;
225 for (
G4int i=0; i<n; ++i) {
228 e1peak = e1deep = e2peak = e2deep = e3peak =
DBL_MAX;
231 for (
G4int j=0; j<nb; ++j) {
309 for (
G4int i=0; i<n; ++i) {
312 G4int j = (*theDensityIdx)[i];
313 if(j == i) {
continue; }
347 std::size_t numOfCouples = theCoupleTable->
GetTableSize();
351 if(
nullptr == elmSelectors) {
352 elmSelectors =
new std::vector<G4EmElementSelector*>;
354 std::size_t nSelectors = elmSelectors->size();
355 if(numOfCouples > nSelectors) {
356 for(std::size_t i=nSelectors; i<numOfCouples; ++i) {
357 elmSelectors->push_back(
nullptr);
359 nSelectors = numOfCouples;
363 for(std::size_t i=0; i<numOfCouples; ++i) {
366 if(cuts[i] ==
DBL_MAX) {
continue; }
373 delete (*elmSelectors)[i];
376 G4double emax = std::max(ehigh, 10*emin);
379 nbins = std::max(nbins, 3);
383 ((*elmSelectors)[i])->Initialise(part, cuts[i]);
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
G4GLOB_DLL std::ostream G4cout
G4double * GetRelativeAbundanceVector() const
const G4Isotope * GetIsotope(G4int iso) const
size_t GetNumberOfIsotopes() const
static G4EmParameters * Instance()
G4double MinKinEnergy() const
G4int NumberOfBinsPerDecade() const
G4double MaxKinEnergy() const
static const G4Element * SampleRandomElement(const G4Material *)
static std::vector< G4TwoPeaksXS * > * FillPeaksStructure(G4PhysicsTable *, G4LossTableBuilder *)
static const G4Isotope * SampleRandomIsotope(const G4Element *)
static void InitialiseElementSelectors(G4VEmModel *, const G4ParticleDefinition *, const G4DataVector &cuts, const G4double emin, const G4double emax)
static const G4Region * FindRegion(const G4String ®ionName, const G4int verbose=0)
static std::vector< G4double > * FindCrossSectionMax(G4PhysicsTable *)
G4bool GetBaseMaterialFlag()
const std::vector< G4int > * GetCoupleIndexes() const
const G4Material * GetMaterial() const
const G4Element * GetElement(G4int iel) const
G4double GetTotNbOfElectPerVolume() const
size_t GetNumberOfElements() const
const G4double * GetVecNbOfAtomsPerVolume() const
std::size_t length() const
G4double Energy(const std::size_t index) const
std::size_t GetVectorLength() const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
std::size_t GetTableSize() const
static G4ProductionCutsTable * GetProductionCutsTable()
static G4RegionStore * GetInstance()
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
virtual G4double GetCrossSection(const G4double, const G4MaterialCutsCouple *)
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition *, const G4Material *)
virtual G4double MinPrimaryEnergy(const G4Material *, const G4ParticleDefinition *, G4double cut=0.0)
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
std::vector< G4EmElementSelector * > * GetElementSelectors()
void SetCurrentCouple(const G4MaterialCutsCouple *)