62 lowEnergy(emin), highEnergy(emax)
67 if(nElmMinusOne > 0) {
70 xSections.push_back(v0);
74 xSections.push_back(v);
88 if(nElmMinusOne > 0) {
89 for(
G4int i=0; i<=nElmMinusOne; ++i) {
delete xSections[i]; }
100 if(0 == nElmMinusOne || cut == cutEnergy) {
return; }
106 const G4double* theAtomNumDensityVector =
110 for(
G4int j=0; j<=nbins; ++j) {
111 G4double e = (xSections[0])->Energy(j);
112 model->SetupForMaterial(part, material, e);
115 for (
G4int i=0; i<=nElmMinusOne; ++i) {
116 cross += theAtomNumDensityVector[i]*
117 model->ComputeCrossSectionPerAtom(part, (*theElementVector)[i], e,
119 xSections[i]->PutValue(j, cross);
124 if(0.0 == (*xSections[nElmMinusOne])[0]) {
125 for (
G4int i=0; i<=nElmMinusOne; ++i) {
126 xSections[i]->PutValue(0, (*xSections[i])[1]);
130 if(0.0 == (*xSections[nElmMinusOne])[nbins]) {
131 for (
G4int i=0; i<=nElmMinusOne; ++i) {
132 xSections[i]->PutValue(nbins, (*xSections[i])[nbins-1]);
136 for(
G4int j=0; j<=nbins; ++j) {
137 cross = (*xSections[nElmMinusOne])[j];
140 for (
G4int i=0; i<nElmMinusOne; ++i) {
142 xSections[i]->PutValue(j, x);
154 G4cout <<
"======== G4EmElementSelector for the " <<
model->GetName();
157 if(0 < nElmMinusOne) {
158 for(
G4int i=0; i<nElmMinusOne; i++) {
159 G4cout <<
" " << (*theElementVector)[i]->GetName() <<
" : " <<
G4endl;
163 G4cout <<
"Last Element in element vector "
164 << (*theElementVector)[nElmMinusOne]->GetName()
const G4String & GetName() const
void Dump(const G4ParticleDefinition *p=nullptr)
const G4ElementVector * GetElementVector() const
const G4String & GetParticleName() const
const G4double * GetVecNbOfAtomsPerVolume() const
G4GLOB_DLL std::ostream G4cout
static const G4double emax
size_t GetNumberOfElements() const
G4EmElementSelector(G4VEmModel *, const G4Material *, G4int bins, G4double emin, G4double emax, G4bool spline=true)
const XML_Char XML_Content * model
void Initialise(const G4ParticleDefinition *, G4double cut=0.0)