94{
95 std::vector<G4VEMDataSet*>* set = new std::vector<G4VEMDataSet*>;
96
97 G4DataVector* energies;
98 G4DataVector* cs;
99
100 G4DataVector* log_energies;
101 G4DataVector* log_cs;
102
103 std::size_t nOfBins = energyVector.size();
104
105 const G4ProductionCutsTable* theCoupleTable=
108
109 for (
G4int mLocal=0; mLocal<numOfCouples; ++mLocal) {
110
116
117 if(verbose > 0)
118 {
119 G4cout <<
"eIonisation CS for " << mLocal <<
"th material "
121 <<
" eEl= " << nElements <<
G4endl;
122 }
123
124 G4double tcut = (*energyCuts)[mLocal];
125
126 G4VDataSetAlgorithm* algo = interp->Clone();
127 G4VEMDataSet* setForMat = new G4CompositeEMDataSet(algo,1.,1.);
128
129 for (
G4int i=0; i<nElements; ++i) {
130
131 G4int Z = (
G4int) (*elementVector)[i]->GetZ();
133
134 energies = new G4DataVector;
135 cs = new G4DataVector;
136
137 log_energies = new G4DataVector;
138 log_cs = new G4DataVector;
139
140 G4double density = nAtomsPerVolume[i];
141
142 for (std::size_t bin=0; bin<nOfBins; ++bin) {
143
145 energies->push_back(e);
146 log_energies->push_back(std::log10(e));
149
150 if(e > tcut) {
151 for (
G4int n=0;
n<nShells;
n++) {
153 G4double p = theParam->Probability(Z, tcut, e, e, n);
154 value += cross * p * density;
155
156 if(verbose>0 && mLocal == 0 && e>=1. && e<=0.)
157 {
158 G4cout <<
"G4eIonCrossSH: e(MeV)= " << e/MeV
160 << " cross= " << cross
161 << " p= " << p
162 << " value= " << value
163 << " tcut(MeV)= " << tcut/MeV
164 << " rho= " << density
165 << " Z= " << Z
167 }
168 }
169 if (value == 0.) value = 1e-300;
170 log_value = std::log10(value);
171 }
172 cs->push_back(value);
173 log_cs->push_back(log_value);
174 }
175 G4VDataSetAlgorithm* algoLocal = interp->Clone();
176 G4VEMDataSet* elSet = new G4EMDataSet(i,energies,cs,log_energies,log_cs,algoLocal,1.,1.);
177
179 }
180 set->push_back(setForMat);
181 }
182
183 return set;
184}
std::vector< const G4Element * > G4ElementVector
G4GLOB_DLL std::ostream G4cout
const G4Material * GetMaterial() const
const G4ElementVector * GetElementVector() const
const G4double * GetAtomicNumDensityVector() const
std::size_t GetNumberOfElements() const
const G4String & GetName() const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
std::size_t GetTableSize() const
static G4ProductionCutsTable * GetProductionCutsTable()
G4double FindValue(G4int Z, G4double e) const
G4int NumberOfComponents(G4int Z) const
virtual void AddComponent(G4VEMDataSet *dataSet)=0