58 nElmMinusOne =
G4int(n - 1);
60 if(nElmMinusOne > 0) {
62 xSections.resize(n, first);
65 for(std::size_t i=1; i<n; ++i) {
68 std::vector<G4double> temp;
70 for(
G4int j=0; j<=bins; ++j) {
74 for(std::size_t i=0; i<n; ++i) {
78 G4double fact = (cross > 0.0) ? 1.0/cross : 0.0;
79 for(std::size_t i=0; i<n; ++i) {
80 G4double y = (i<n-1) ? temp[i]*fact : 1.0;
81 xSections[i]->PutValue(j, y);
91 if(nElmMinusOne > 0) {
92 for(
G4int i=0; i<=nElmMinusOne; ++i) {
delete xSections[i]; }
114 if(nn > nMaterials) {
115 if(0 == nMaterials) {
117 elmSelectors.reserve(nn);
120 G4int sbins = std::max(10, bins/5);
122 for(std::size_t i=nMaterials; i<nn; ++i) {
128 if(
nullptr == first) {
134 for(
G4int j=0; j<=bins; ++j) {
144 elmSelectors.push_back(es);
154 for(std::size_t i=0; i<nMaterials; ++i) {
156 delete elmSelectors[i];
std::vector< G4Material * > G4MaterialTable
G4double ComputeCrossSection(const G4DynamicParticle *, const G4Material *)
G4double GetCrossSection(const G4DynamicParticle *, const G4Material *)
void SetKineticEnergy(G4double aEnergy)
G4HadElementSelector(G4DynamicParticle *, G4CrossSectionDataStore *, const G4Material *, G4int bins, G4double emin, G4double emax, G4bool spline)
void Initialise(G4DynamicParticle *, G4CrossSectionDataStore *, G4int bins, G4double emin, G4double emax, G4bool spline)
const G4ElementVector * GetElementVector() const
static std::size_t GetNumberOfMaterials()
static G4MaterialTable * GetMaterialTable()
std::size_t GetNumberOfElements() const
void PutValue(const std::size_t index, const G4double value)
G4double Energy(const std::size_t index) const
void FillSecondDerivatives(const G4SplineType=G4SplineType::Base, const G4double dir1=0.0, const G4double dir2=0.0)