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; }
161 nbin = std::max(nbin, 4);
167 ptr =
new std::vector<G4double>;
174 for (
G4int i=0; i<nn; ++i) {
178 for (
G4int j=0; j<=nbin; ++j) {
183 e = (j+1 < nbin) ? e*x : tmax;
201std::vector<G4TwoPeaksXS*>*
204 std::vector<G4TwoPeaksXS*>* ptr =
nullptr;
205 if(
nullptr == p) {
return ptr; }
208 ptr =
new std::vector<G4TwoPeaksXS*>;
209 ptr->resize(n,
nullptr);
212 G4double e1peak, e1deep, e2peak, e2deep, e3peak;
216 for (
G4int i=0; i<n; ++i) {
219 e1peak = e1deep = e2peak = e2deep = e3peak =
DBL_MAX;
222 for (
G4int j=0; j<nb; ++j) {
300 for (
G4int i=0; i<n; ++i) {
303 G4int j = (*theDensityIdx)[i];
304 if(j == i) {
continue; }
338 std::size_t numOfCouples = theCoupleTable->
GetTableSize();
342 if(
nullptr == elmSelectors) {
343 elmSelectors =
new std::vector<G4EmElementSelector*>;
345 std::size_t nSelectors = elmSelectors->size();
346 if(numOfCouples > nSelectors) {
347 for(std::size_t i=nSelectors; i<numOfCouples; ++i) {
348 elmSelectors->push_back(
nullptr);
350 nSelectors = numOfCouples;
354 for(std::size_t i=0; i<numOfCouples; ++i) {
357 if(cuts[i] ==
DBL_MAX) {
continue; }
364 delete (*elmSelectors)[i];
367 G4double emax = std::max(ehigh, 10*emin);
370 nbins = std::max(nbins, 3);
374 ((*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
const G4double * GetVecNbOfAtomsPerVolume() const
std::size_t GetNumberOfElements() 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 G4Material *, const G4ParticleDefinition *, G4double cut=0.0)
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
std::vector< G4EmElementSelector * > * GetElementSelectors()
void SetCurrentCouple(const G4MaterialCutsCouple *)