445 G4cout <<
"G4VEnergyLossProcess::PreparePhysicsTable for "
452 if(masterProcess && masterProcess !=
this) { isMaster =
false; }
454 currentCouple =
nullptr;
458 preStepKinEnergy = 0.0;
459 preStepRangeEnergy = 0.0;
467 if( !particle ) { particle = ∂ }
472 if(pname !=
"deuteron" && pname !=
"triton" &&
473 pname !=
"alpha+" && pname !=
"helium" &&
474 pname !=
"hydrogen") {
481 if(theGenericIon && particle != theGenericIon) {
484 size_t n = v->
size();
485 for(
size_t j=0; j<
n; ++j) {
486 if((*v)[j] ==
this) {
487 particle = theGenericIon;
495 if( particle != &part ) {
500 G4cout <<
"### G4VEnergyLossProcess::PreparePhysicsTable()"
501 <<
" interrupted for "
503 <<
" particle " << particle <<
" GenericIon " << theGenericIon
520 theDEDXAtMaxEnergy.resize(n, 0.0);
521 theRangeAtMaxEnergy.resize(n, 0.0);
522 theEnergyOfCrossSectionMax.resize(n, 0.0);
523 theCrossSectionMax.resize(n,
DBL_MAX);
526 if(!actIntegral) { integral = theParameters->
Integral(); }
527 if(!actLossFluc) { lossFluctuationFlag = theParameters->
LossFluctuation(); }
529 if(!actMinKinEnergy) { minKinEnergy = theParameters->
MinKinEnergy(); }
530 if(!actMaxKinEnergy) { maxKinEnergy = theParameters->
MaxKinEnergy(); }
533 *
G4lrint(std::log10(maxKinEnergy/minKinEnergy));
537 *
G4lrint(std::log10(maxKinEnergyCSDA/minKinEnergy));
538 if(!actLinLossLimit) { linLossLimit = theParameters->
LinearLossLimit(); }
551 massRatio = (baseParticle->
GetPDGMass())/initialMass;
554 if(chargeSqRatio > 0.0) { reduceFactor = 1.0/(chargeSqRatio*massRatio); }
556 if(initialMass <
MeV) {
563 if (isMaster && !baseParticle) {
565 if(theDEDXTable && isIonisation) {
566 if(theIonisationTable && theDEDXTable != theIonisationTable) {
569 theDEDXTable = theIonisationTable;
571 if(theDEDXSubTable && theIonisationSubTable &&
572 theDEDXSubTable != theIonisationSubTable) {
574 delete theDEDXSubTable;
575 theDEDXSubTable = theIonisationSubTable;
582 if(theDEDXSubTable) {
588 theDEDXunRestrictedTable =
597 theRangeTableForLoss =
599 theInverseRangeTable =
638 for(
G4int i=0; i<nmod; ++i) {
647 theCuts = modelManager->
Initialise(particle, secondaryParticle,
652 if(nSCoffRegions > 0) {
653 if(theParameters->
MinSubRange() < 1.0) { useSubCutoff =
true; }
657 idxSCoffRegions =
new G4bool[
n];
658 for (
size_t j=0; j<
n; ++j) {
665 for(
G4int i=0; i<nSCoffRegions; ++i) {
666 if( pcuts == scoffRegions[i]->GetProductionCuts()) {
671 idxSCoffRegions[j] =
reg;
676 G4cout <<
"G4VEnergyLossProcess::PrepearPhysicsTable() is done "
678 <<
" isIon= " << isIon;
682 G4cout <<
" chargeSqRatio= " << chargeSqRatio
683 <<
" massRatio= " << massRatio
684 <<
" reduceFactor= " << reduceFactor <<
G4endl;
686 G4cout <<
" SubCutoff Regime is ON for regions: " <<
G4endl;
687 for (
G4int i=0; i<nSCoffRegions; ++i) {
688 const G4Region* r = scoffRegions[i];
G4bool UseCutAsFinalRange() const
G4VSubCutProducer * SubCutProducer()
G4int NumberOfBinsPerDecade() const
const G4VProcess * GetMasterProcess() const
const G4String & GetName() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4int WorkerVerbose() const
G4double MaxKinEnergy() const
G4VEmModel * GetModel(G4int idx, G4bool ver=false)
G4double HighEnergyLimit() const
G4double LowestElectronEnergy() const
void DefineRegParamForLoss(G4VEnergyLossProcess *, G4bool isElectron) const
const G4DataVector * SubCutoff() const
static G4PhysicsTable * PreparePhysicsTable(G4PhysicsTable *physTable)
G4double MinSubRange() const
const G4String & GetParticleName() const
G4LossTableBuilder * GetTableBuilder()
static const G4double reg
void Initialise(const G4ParticleDefinition &part, const G4String &procName, G4int verbose)
void SetHighEnergyLimit(G4double)
G4bool BuildCSDARange() const
void SetAngularGeneratorFlag(G4bool)
G4double LinearLossLimit() const
G4double LambdaFactor() const
G4GLOB_DLL std::ostream G4cout
size_t GetTableSize() const
G4double LowestMuHadEnergy() const
static constexpr double MeV
const G4String & GetParticleType() const
G4double MinKinEnergy() const
const G4String & GetProcessName() const
void RegisterExtraParticle(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p)
const G4DataVector * Initialise(const G4ParticleDefinition *part, const G4ParticleDefinition *secPart, G4double minSubRange, G4int verb)
void SetMasterThread(G4bool val)
static G4ProductionCutsTable * GetProductionCutsTable()
G4int NumberOfModels() const
G4bool LossFluctuation() const
G4double GetPDGMass() const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
static G4ParticleTable * GetParticleTable()
G4ProcessManager * GetProcessManager() const
void InitialiseBaseMaterials(G4PhysicsTable *table)
G4bool UseAngularGeneratorForIonisation() const
static G4int Register(const G4String &)
void PreparePhysicsTable(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p, G4bool theMaster)
static constexpr double MeV
G4ProcessVector * GetAlongStepProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
G4double MaxEnergyForCSDARange() const
G4double GetPDGCharge() const
G4ProductionCuts * GetProductionCuts() const
void SetVerboseLevel(G4int value)
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition *, const G4ParticleDefinition *)=0