198{
199 if(verbose>1) {
200 G4cout <<
"### G4TablesForExtrapolator::Initialisation" <<
G4endl;
201 }
203 if(nmat == num) { return; }
204 nmat = num;
206 couples.resize(nmat, nullptr);
207
209 if(!pcuts) { pcuts = new G4ProductionCuts(); }
210
211 for(
G4int i=0; i<nmat; ++i) {
212 couples[i] = new G4MaterialCutsCouple((*mtable)[i],pcuts);
213 }
214
215 dedxElectron = PrepareTable(dedxElectron);
216 dedxPositron = PrepareTable(dedxPositron);
217 dedxMuon = PrepareTable(dedxMuon);
218 dedxProton = PrepareTable(dedxProton);
219 rangeElectron = PrepareTable(rangeElectron);
220 rangePositron = PrepareTable(rangePositron);
221 rangeMuon = PrepareTable(rangeMuon);
222 rangeProton = PrepareTable(rangeProton);
223 invRangeElectron = PrepareTable(invRangeElectron);
224 invRangePositron = PrepareTable(invRangePositron);
225 invRangeMuon = PrepareTable(invRangeMuon);
226 invRangeProton = PrepareTable(invRangeProton);
227 mscElectron = PrepareTable(mscElectron);
228
229 builder = new G4LossTableBuilder(true);
230 builder->SetBaseMaterialActive(false);
231
232 if(verbose>1) {
233 G4cout <<
"### G4TablesForExtrapolator Builds electron tables"
235 }
236 ComputeElectronDEDX(electron, dedxElectron);
237 builder->BuildRangeTable(dedxElectron,rangeElectron);
238 builder->BuildInverseRangeTable(rangeElectron, invRangeElectron);
239
240 if(verbose>1) {
241 G4cout <<
"### G4TablesForExtrapolator Builds positron tables"
243 }
244 ComputeElectronDEDX(positron, dedxPositron);
245 builder->BuildRangeTable(dedxPositron, rangePositron);
246 builder->BuildInverseRangeTable(rangePositron, invRangePositron);
247
248 if(verbose>1) {
249 G4cout <<
"### G4TablesForExtrapolator Builds muon tables" <<
G4endl;
250 }
251 ComputeMuonDEDX(muonPlus, dedxMuon);
252 builder->BuildRangeTable(dedxMuon, rangeMuon);
253 builder->BuildInverseRangeTable(rangeMuon, invRangeMuon);
254
255 if(verbose>2) {
262 }
263 if(verbose>1) {
264 G4cout <<
"### G4TablesForExtrapolator Builds proton tables"
266 }
267 ComputeProtonDEDX(proton, dedxProton);
268 builder->BuildRangeTable(dedxProton, rangeProton);
269 builder->BuildInverseRangeTable(rangeProton, invRangeProton);
270
271 ComputeTrasportXS(electron, mscElectron);
272}
std::vector< G4Material * > G4MaterialTable
G4GLOB_DLL std::ostream G4cout
static std::size_t GetNumberOfMaterials()
static G4MaterialTable * GetMaterialTable()