74 : builder(nullptr), verbose(verb), nbins(bins), nmat(0), emin(e1), emax(e2)
81 dedxElectron = dedxPositron = dedxProton = dedxMuon = rangeElectron =
82 rangePositron = rangeProton = rangeMuon = invRangeElectron =
83 invRangePositron = invRangeProton = invRangeMuon = mscElectron =
nullptr;
92 for(
G4int i=0; i<nmat; i++) {
delete couples[i]; }
112 delete rangeElectron;
113 delete rangePositron;
116 delete invRangeElectron;
117 delete invRangePositron;
118 delete invRangeProton;
134 table = dedxElectron;
137 table = dedxPositron;
146 table = rangeElectron;
149 table = rangePositron;
158 table = invRangeElectron;
161 table = invRangePositron;
164 table = invRangeProton;
167 table = invRangeMuon;
180 G4cout <<
"### G4TablesForExtrapolator::Initialisation" <<
G4endl;
182 currentParticle =
nullptr;
183 mass = charge2 = 0.0;
189 G4int i0 = couples.size();
191 couples.reserve(nmat);
194 for(
G4int i=i0; i<nmat; ++i) {
201 dedxElectron = PrepareTable(dedxElectron);
202 dedxPositron = PrepareTable(dedxPositron);
203 dedxMuon = PrepareTable(dedxMuon);
204 dedxProton = PrepareTable(dedxProton);
205 rangeElectron = PrepareTable(rangeElectron);
206 rangePositron = PrepareTable(rangePositron);
207 rangeMuon = PrepareTable(rangeMuon);
208 rangeProton = PrepareTable(rangeProton);
209 invRangeElectron = PrepareTable(invRangeElectron);
210 invRangePositron = PrepareTable(invRangePositron);
211 invRangeMuon = PrepareTable(invRangeMuon);
212 invRangeProton = PrepareTable(invRangeProton);
213 mscElectron = PrepareTable(mscElectron);
219 G4cout <<
"### G4TablesForExtrapolator Builds electron tables"
222 ComputeElectronDEDX(electron, dedxElectron);
227 G4cout <<
"### G4TablesForExtrapolator Builds positron tables"
230 ComputeElectronDEDX(positron, dedxPositron);
235 G4cout <<
"### G4TablesForExtrapolator Builds muon tables" <<
G4endl;
237 ComputeMuonDEDX(muonPlus, dedxMuon);
249 G4cout <<
"### G4TablesForExtrapolator Builds proton tables"
252 ComputeProtonDEDX(proton, dedxProton);
256 ComputeTrasportXS(electron, mscElectron);
271 for(
G4int i=i0; i<nmat; ++i) {
281void G4TablesForExtrapolator::ComputeElectronDEDX(
292 mass = electron_mass_c2;
294 currentParticle = part;
298 G4cout <<
"G4TablesForExtrapolator::ComputeElectronDEDX for "
302 for(
G4int i=0; i<nmat; ++i) {
311 for(
G4int j=0; j<=nbins; ++j) {
318 <<
" e(MeV)= " << e/MeV
319 <<
" dedx(Mev/cm)= " << dedx*cm/MeV
320 <<
" dedx(Mev.cm2/g)= "
350 currentParticle = part;
355 G4cout <<
"G4TablesForExtrapolator::ComputeMuonDEDX for "
360 for(
G4int i=0; i<nmat; ++i) {
368 for(
G4int j=0; j<=nbins; j++) {
377 <<
" e(MeV)= " << e/MeV
378 <<
" dedx(Mev/cm)= " << dedx*cm/MeV
379 <<
" dedx(Mev/(g/cm2)= "
401 currentParticle = part;
406 G4cout <<
"G4TablesForExtrapolator::ComputeProtonDEDX for "
411 for(
G4int i=0; i<nmat; ++i) {
418 for(
G4int j=0; j<=nbins; j++) {
425 <<
" e(MeV)= " << e/MeV
426 <<
" dedx(Mev/cm)= " << dedx*cm/MeV
427 <<
" dedx(Mev.cm2/g)= " << dedx/((mat->
GetDensity())/(g/cm2))
449 currentParticle = part;
454 G4cout <<
"G4TablesForExtrapolator::ComputeProtonDEDX for "
459 for(
G4int i=0; i<nmat; ++i) {
466 for(
G4int j=0; j<=nbins; j++) {
472 G4cout <<
"j= " << j <<
" e(MeV)= " << e/MeV
473 <<
" xs(1/mm)= " << xs*mm <<
G4endl;
std::vector< G4Material * > G4MaterialTable
G4GLOB_DLL std::ostream G4cout
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
static G4Electron * Electron()
static G4EmParameters * Instance()
void BuildInverseRangeTable(const G4PhysicsTable *rangeTable, G4PhysicsTable *invRangeTable, G4bool useBM=false)
void BuildRangeTable(const G4PhysicsTable *dedxTable, G4PhysicsTable *rangeTable, G4bool useBM=false)
void InitialiseBaseMaterials(const G4PhysicsTable *table=nullptr)
G4double GetDensity() const
static size_t GetNumberOfMaterials()
static G4MaterialTable * GetMaterialTable()
const G4String & GetName() const
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
static G4MuonMinus * MuonMinus()
static G4MuonPlus * MuonPlus()
G4double GetPDGMass() const
const G4String & GetParticleName() const
void push_back(G4PhysicsVector *)
G4double Energy(std::size_t index) const
void PutValue(std::size_t index, G4double theValue)
void FillSecondDerivatives()
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 *)
virtual G4double ComputeDEDX(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
void SetUseBaseMaterials(G4bool val)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) override