76 : emin(e1), emax(e2), verbose(verb), nbins(bins)
89 if(
nullptr != dedxElectron) {
93 if(
nullptr != dedxPositron) {
97 if(
nullptr != dedxProton) {
101 if(
nullptr != dedxMuon) {
105 if(
nullptr != rangeElectron) {
107 delete rangeElectron;
109 if(
nullptr != rangePositron) {
111 delete rangePositron;
113 if(
nullptr != rangeProton) {
117 if(
nullptr != rangeMuon) {
121 if(
nullptr != invRangeElectron) {
123 delete invRangeElectron;
125 if(
nullptr != invRangePositron) {
127 delete invRangePositron;
129 if(
nullptr != invRangeProton) {
131 delete invRangeProton;
133 if(
nullptr != invRangeMuon) {
137 if(
nullptr != mscElectron) {
154 table = dedxElectron;
157 table = dedxPositron;
166 table = rangeElectron;
169 table = rangePositron;
178 table = invRangeElectron;
181 table = invRangePositron;
184 table = invRangeProton;
187 table = invRangeMuon;
200 G4cout <<
"### G4TablesForExtrapolator::Initialisation" <<
G4endl;
203 if(nmat == num) {
return; }
206 couples.resize(nmat,
nullptr);
211 for(
G4int i=0; i<nmat; ++i) {
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);
233 G4cout <<
"### G4TablesForExtrapolator Builds electron tables"
236 ComputeElectronDEDX(electron, dedxElectron);
241 G4cout <<
"### G4TablesForExtrapolator Builds positron tables"
244 ComputeElectronDEDX(positron, dedxPositron);
249 G4cout <<
"### G4TablesForExtrapolator Builds muon tables" <<
G4endl;
251 ComputeMuonDEDX(muonPlus, dedxMuon);
264 G4cout <<
"### G4TablesForExtrapolator Builds proton tables"
267 ComputeProtonDEDX(proton, dedxProton);
271 ComputeTrasportXS(electron, mscElectron);
281 for(
G4int i=n; i<nmat; ++i) {
290void G4TablesForExtrapolator::ComputeElectronDEDX(
301 mass = electron_mass_c2;
303 currentParticle = part;
307 G4cout <<
"G4TablesForExtrapolator::ComputeElectronDEDX for "
311 for(
G4int i=0; i<nmat; ++i) {
319 for(
G4int j=0; j<=nbins; ++j) {
326 <<
" e(MeV)= " << e/MeV
327 <<
" dedx(Mev/cm)= " << dedx*cm/MeV
328 <<
" dedx(Mev.cm2/g)= "
356 currentParticle = part;
361 G4cout <<
"G4TablesForExtrapolator::ComputeMuonDEDX for "
366 for(
G4int i=0; i<nmat; ++i) {
373 for(
G4int j=0; j<=nbins; ++j) {
382 <<
" e(MeV)= " << e/MeV
383 <<
" dedx(Mev/cm)= " << dedx*cm/MeV
384 <<
" dedx(Mev/(g/cm2)= "
405 currentParticle = part;
410 G4cout <<
"G4TablesForExtrapolator::ComputeProtonDEDX for "
415 for(
G4int i=0; i<nmat; ++i) {
421 for(
G4int j=0; j<=nbins; ++j) {
428 <<
" e(MeV)= " << e/MeV
429 <<
" dedx(Mev/cm)= " << dedx*cm/MeV
430 <<
" dedx(Mev.cm2/g)= " << dedx/((mat->
GetDensity())/(g/cm2))
451 currentParticle = part;
456 G4cout <<
"G4TablesForExtrapolator::ComputeTransportXS for "
461 for(
G4int i=0; i<nmat; ++i) {
468 for(
G4int j=0; j<=nbins; ++j) {
474 G4cout <<
"j= " << j <<
" e(MeV)= " << e/MeV
475 <<
" xs(1/mm)= " << xs*mm <<
G4endl;
std::vector< G4Material * > G4MaterialTable
G4GLOB_DLL std::ostream G4cout
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override
static G4Electron * Electron()
void BuildRangeTable(const G4PhysicsTable *dedxTable, G4PhysicsTable *rangeTable)
void BuildInverseRangeTable(const G4PhysicsTable *rangeTable, G4PhysicsTable *invRangeTable)
void SetBaseMaterialActive(G4bool flag)
G4double GetDensity() const
static std::size_t GetNumberOfMaterials()
static G4MaterialTable * GetMaterialTable()
const G4String & GetName() const
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override
static G4MuonMinus * MuonMinus()
static G4MuonPlus * MuonPlus()
G4double GetPDGMass() const
const G4String & GetParticleName() const
void push_back(G4PhysicsVector *)
std::size_t length() 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)
static G4Positron * Positron()
static G4Proton * Proton()
void SetPolarAngleLimit(G4double)
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
void SetCurrentCouple(const G4MaterialCutsCouple *)
void SetUseBaseMaterials(G4bool val)
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double ekin, G4double cutEnergy) override
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override