163 MaxExcitationNumber (1.e6),
165 nmaxDirectFluct (100),
170 MinKineticEnergy(0.0)
312 for (
size_t J=0; J<numOfCouples; J++)
329 Value += (*pointer)[J]->
330 GetValue(LowEdgeEnergy,isOutRange) ;
411 for (
size_t J=0; J<numOfCouples; J++)
460 for (
size_t J=0; J<numOfCouples; J++)
498 G4double de = (energy2 - energy1) * del ;
501 for (
G4int i=1; i<
n; i++) {
504 range += 0.5*de*(1.0/dedx1 + 1.0/dedx2);
522 G4double tlim=5.*
keV,parlowen=0.4,ppar=0.5-parlowen ;
524 G4double losslim,clim,taulim,timelim,
525 LowEdgeEnergy,tau,Value ;
530 losslim = physicsVector->
GetValue(tlim,isOut);
546 Value = clim*std::exp(ppar*std::log(tau/taulim)) ;
558 }
while (tau<=taulim) ;
583 G4double tlim=5.*
keV,parlowen=0.4,ppar=0.5-parlowen ;
585 G4double losslim,clim,taulim,timelim,
586 LowEdgeEnergy,tau,Value ;
591 losslim = physicsVector->
GetValue(tlim,isOut);
607 Value = clim*std::exp(ppar*std::log(tau/taulim)) ;
619 }
while (tau<=taulim) ;
642 G4double dtau,Value,taui,ti,lossi,ci;
647 for (
G4int i=0; i<=nbin; i++)
651 lossi = physicsVector->
GetValue(ti,isOut);
674 G4double ltt,dltau,Value,ui,taui,ti,lossi,ci;
680 for (
G4int i=0; i<=nbin; i++)
685 lossi = physicsVector->
GetValue(ti,isOut);
695 Value += ci*taui/lossi;
708 G4double ltt,dltau,Value,ui,taui,ti,lossi,ci;
714 for (
G4int i=0; i<=nbin; i++)
719 lossi = physicsVector->
GetValue(ti,isOut);
742 G4double ltt,dltau,Value,ui,taui,ti,lossi,ci;
748 for (
G4int i=0; i<=nbin; i++)
753 lossi = physicsVector->
GetValue(ti,isOut);
801 G4double Ti , Tim , Tip , Ri , Rim , Rip , Value ;
805 for (
G4int J=0; J<numOfCouples; J++)
816 Ri = rangeVector->
GetValue(Ti,isOut) ;
833 Rim = rangeVector->
GetValue(Tim,isOut);
840 Rip = rangeVector->
GetValue(Tip,isOut);
842 Value = (w1*Rip + w2*Ri + w3*Rim)/(Ti*Ti) ;
885 G4double w1 = -R1/w , w2 = R1*(R2+1.)/w , w3 = -R2*R1/w ;
886 G4double Ti , Tim , Tip , Ri , Rim , Rip , Value ;
890 for (
G4int J=0; J<numOfCouples; J++)
901 Ri = rangeVector->
GetValue(Ti,isOut) ;
909 Rim = rangeVector->
GetValue(Tim,isOut);
916 Rip = rangeVector->
GetValue(Tip,isOut);
919 Value = (w1*Rip + w2*Ri + w3*Rim)/Ti;
961 G4double Ti , Tim , Tip , Ri , Rim , Rip , Value ;
965 for (
G4int J=0; J<numOfCouples; J++)
975 Ri = rangeVector->
GetValue(Ti,isOut) ;
981 Rim = rangeVector->
GetValue(Tim,isOut);
988 Rip = rangeVector->
GetValue(Tip,isOut);
990 Value = w1*Rip + w2*Ri + w3*Rim ;
1041 for (
size_t i=0; i<numOfCouples; i++)
1051 if (rlow <
DBL_MIN) rlow = 1.e-8;
1052 if (rhigh > 1.e16) rhigh = 1.e16;
1053 if (rhigh < 1.e-8) rhigh =1.e-8;
1060 if (tmpTrick <= 0. || tmpTrick <
DBL_MIN) tmpTrick = 1.e-8;
1061 if (tmpTrick > 1.e16) tmpTrick = 1.e16;
1063 rhigh *= std::exp(std::log(tmpTrick)/((
G4double)(nbins-1)));
1075 for (
size_t j=1; j<nbins; j++) {
1079 for (ihigh=ilow+1; ihigh<nbins; ihigh++) {
1082 if(range2 >= range || ihigh == nbins-1) {
1090 G4double e = std::log(energy1) + std::log(energy2/energy1)*std::log(range/range1)/std::log(range2/range1);
1109 G4int binnumber = -1 ;
1118 if( rangebin < LowEdgeRange )
1124 rangebin = (*theRangeTable)(materialIndex)->GetValue(Tbin,isOut) ;
1126 while ((rangebin < LowEdgeRange) && (binnumber <
TotBin )) ;
1131 else if(binnumber ==
TotBin-1)
1135 A = (*(*theRangeCoeffATable)(materialIndex))(binnumber-1) ;
1136 B = (*(*theRangeCoeffBTable)(materialIndex))(binnumber-1) ;
1137 C = (*(*theRangeCoeffCTable)(materialIndex))(binnumber-1) ;
1139 KineticEnergy = (LowEdgeRange -
C )/
B ;
1142 discr =
B*
B - 4.*
A*(
C-LowEdgeRange);
1143 discr = discr>0. ? std::sqrt(discr) : 0.;
1144 KineticEnergy = 0.5*(discr-
B)/
A ;
1148 aVector->
PutValue(i,KineticEnergy) ;
1156 G4bool wasModified =
false;
1161 for (
size_t j=0; j<numOfCouples; j++){
G4double C(G4double temp)
G4double B(G4double temperature)
static constexpr double eplus
static constexpr double keV
static G4AntiProton * AntiProton()
static void Register(const G4ParticleDefinition *p, const G4PhysicsTable *tDEDX, const G4PhysicsTable *tRange, const G4PhysicsTable *tInverseRange, const G4PhysicsTable *tLabTime, const G4PhysicsTable *tProperTime, G4double lowestKineticEnergy, G4double highestKineticEnergy, G4double massRatio, G4int NumberOfBins)
G4bool IsRecalcNeeded() const
G4double GetPDGMass() const
G4double GetPDGCharge() const
void insert(G4PhysicsVector *)
G4double GetLowEdgeEnergy(const std::size_t index) const
void PutValue(const std::size_t index, const G4double value)
G4double GetValue(const G4double energy, G4bool &isOutRange) const
std::size_t GetVectorLength() const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
std::size_t GetTableSize() const
static G4ProductionCutsTable * GetProductionCutsTable()
static G4Proton * Proton()
static void InvertRangeVector(G4int materialIndex, G4PhysicsLogVector *rangeVector)
static G4ThreadLocal G4PhysicsTable * theDEDXpTable
static G4ThreadLocal G4PhysicsTable * theInverseRangepTable
static void SetStepFunction(G4double c1, G4double c2)
static void BuildLabTimeVector(G4int materialIndex, G4PhysicsLogVector *rangeVector)
static G4ThreadLocal G4double Charge
static G4ThreadLocal G4double ltaulow
static G4ThreadLocal G4PhysicsTable * theProperTimeTable
static G4ThreadLocal G4PhysicsTable * theRangeTable
static void BuildProperTimeVector(G4int materialIndex, G4PhysicsLogVector *rangeVector)
static G4ThreadLocal G4double finalRange
static G4ThreadLocal G4double c3lim
static G4ThreadLocal G4PhysicsTable * theDEDXpbarTable
static G4ThreadLocal G4PhysicsTable ** RecorderOfpProcess
static G4ThreadLocal G4int CounterOfProcess
static void BuildRangeCoeffATable(const G4ParticleDefinition &aParticleType)
static G4ThreadLocal G4PhysicsTable * thepbarRangeCoeffBTable
static G4ThreadLocal G4double dRoverRange
static G4double RangeIntLin(G4PhysicsVector *physicsVector, G4int nbin)
static G4ThreadLocal G4int TotBin
static G4ThreadLocal G4PhysicsTable * theProperTimepTable
static G4ThreadLocal G4double c1lim
G4PhysicsTable * theLossTable
static G4ThreadLocal G4PhysicsTable * theLabTimepTable
static void BuildRangeVector(G4int materialIndex, G4PhysicsLogVector *rangeVector)
static G4double ProperTimeIntLog(G4PhysicsVector *physicsVector, G4int nbin)
G4hRDEnergyLoss(const G4String &)
static G4ThreadLocal G4double c2lim
static G4ThreadLocal G4PhysicsTable * theRangepTable
static G4ThreadLocal G4PhysicsTable * theLabTimeTable
static G4ThreadLocal G4int NumberOfProcesses
static G4ThreadLocal G4PhysicsTable * theLabTimepbarTable
static void SetdRoverRange(G4double value)
static G4ThreadLocal G4PhysicsTable * theInverseRangepbarTable
static void PlusNumberOfProcesses()
static G4ThreadLocal G4int CounterOfpProcess
static G4ThreadLocal G4double ParticleMass
static G4ThreadLocal G4double Mass
static G4ThreadLocal G4PhysicsTable * thepbarRangeCoeffCTable
static G4ThreadLocal G4double HighestKineticEnergy
static void BuildRangeTable(const G4ParticleDefinition &aParticleType)
static void SetRndmStep(G4bool value)
static void BuildRangeCoeffBTable(const G4ParticleDefinition &aParticleType)
static G4ThreadLocal G4double LOGRTable
static G4double RangeIntLog(G4PhysicsVector *physicsVector, G4int nbin)
static void BuildInverseRangeTable(const G4ParticleDefinition &aParticleType)
static G4ThreadLocal G4int CounterOfpbarProcess
static G4ThreadLocal G4PhysicsTable * thepRangeCoeffBTable
static G4ThreadLocal G4PhysicsTable * theProperTimepbarTable
static G4ThreadLocal G4PhysicsTable * theInverseRangeTable
static G4ThreadLocal G4double pbartableElectronCutInRange
static G4ThreadLocal G4PhysicsTable ** RecorderOfProcess
static G4ThreadLocal G4PhysicsTable ** RecorderOfpbarProcess
static G4ThreadLocal G4double LowestKineticEnergy
static G4ThreadLocal G4double ptableElectronCutInRange
static G4ThreadLocal G4PhysicsTable * thepRangeCoeffCTable
static G4ThreadLocal G4PhysicsTable * theDEDXTable
static G4ThreadLocal G4PhysicsTable * theRangepbarTable
static G4ThreadLocal G4bool rndmStepFlag
static void MinusNumberOfProcesses()
static void BuildTimeTables(const G4ParticleDefinition &aParticleType)
static G4ThreadLocal G4bool EnlossFlucFlag
static G4ThreadLocal G4double tauhigh
G4bool CutsWhereModified()
static void SetNumberOfProcesses(G4int number)
static void BuildRangeCoeffCTable(const G4ParticleDefinition &aParticleType)
static void SetEnlossFluc(G4bool value)
static G4ThreadLocal G4PhysicsTable * thepbarRangeCoeffATable
static G4int GetNumberOfProcesses()
static G4ThreadLocal G4PhysicsTable * theRangeCoeffATable
static G4ThreadLocal G4PhysicsTable * thepRangeCoeffATable
static G4ThreadLocal G4PhysicsTable * theRangeCoeffCTable
static G4ThreadLocal G4double RTable
static G4ThreadLocal G4double taulow
static G4double LabTimeIntLog(G4PhysicsVector *physicsVector, G4int nbin)
static G4ThreadLocal G4PhysicsTable * theRangeCoeffBTable
static G4ThreadLocal G4double ltauhigh
static void BuildDEDXTable(const G4ParticleDefinition &aParticleType)
G4double energy(const ThreeVector &p, const G4double m)