60 if(nElmMinusOne > 0) {
62 xSections.resize(n, first);
66 for(
G4int i=1; i<n; ++i) {
69 std::vector<double> temp;
71 for(
G4int j=0; j<=bins; ++j) {
75 for(
G4int i=0; i<n; ++i) {
79 G4double fact = (cross > 0.0) ? 1.0/cross : 0.0;
80 for(
G4int i=0; i<n; ++i) {
81 G4double y = (i<n-1) ? temp[i]*fact : 1.0;
82 xSections[i]->PutValue(j, y);
92 if(nElmMinusOne > 0) {
93 for(
G4int i=0; i<=nElmMinusOne; ++i) {
delete xSections[i]; }
115 if(nn > nMaterials) {
117 G4int sbins = std::max(10, bins/5);
119 for(
size_t i=nMaterials; i<nn; ++i) {
132 for(
G4int j=0; j<=bins; ++j) {
141 elmSelectors.push_back(es);
151 for(
size_t i=0; i<nMaterials; ++i) {
153 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 size_t GetNumberOfMaterials()
size_t GetNumberOfElements() const
static G4MaterialTable * GetMaterialTable()
G4double Energy(std::size_t index) const
void PutValue(std::size_t index, G4double theValue)