164 MaxExcitationNumber (1.e6),
166 nmaxDirectFluct (100),
171 MinKineticEnergy(0.0)
313 for (
size_t J=0; J<numOfCouples; J++)
330 Value += (*pointer)[J]->
331 GetValue(LowEdgeEnergy,isOutRange) ;
412 for (
size_t J=0; J<numOfCouples; J++)
461 for (
size_t J=0; J<numOfCouples; J++)
499 G4double de = (energy2 - energy1) * del ;
502 for (
G4int i=1; i<
n; i++) {
505 range += 0.5*de*(1.0/dedx1 + 1.0/dedx2);
523 G4double tlim=5.*
keV,parlowen=0.4,ppar=0.5-parlowen ;
525 G4double losslim,clim,taulim,timelim,
526 LowEdgeEnergy,tau,Value ;
531 losslim = physicsVector->
GetValue(tlim,isOut);
547 Value = clim*std::exp(ppar*std::log(tau/taulim)) ;
559 }
while (tau<=taulim) ;
584 G4double tlim=5.*
keV,parlowen=0.4,ppar=0.5-parlowen ;
586 G4double losslim,clim,taulim,timelim,
587 LowEdgeEnergy,tau,Value ;
592 losslim = physicsVector->
GetValue(tlim,isOut);
608 Value = clim*std::exp(ppar*std::log(tau/taulim)) ;
620 }
while (tau<=taulim) ;
643 G4double dtau,Value,taui,ti,lossi,ci;
648 for (
G4int i=0; i<=nbin; i++)
652 lossi = physicsVector->
GetValue(ti,isOut);
675 G4double ltt,dltau,Value,ui,taui,ti,lossi,ci;
681 for (
G4int i=0; i<=nbin; i++)
683 ui = ltaulow+dltau*i;
686 lossi = physicsVector->
GetValue(ti,isOut);
696 Value += ci*taui/lossi;
709 G4double ltt,dltau,Value,ui,taui,ti,lossi,ci;
715 for (
G4int i=0; i<=nbin; i++)
717 ui = ltaulow+dltau*i;
720 lossi = physicsVector->
GetValue(ti,isOut);
743 G4double ltt,dltau,Value,ui,taui,ti,lossi,ci;
749 for (
G4int i=0; i<=nbin; i++)
751 ui = ltaulow+dltau*i;
754 lossi = physicsVector->
GetValue(ti,isOut);
801 G4double w1 = RTable/
w , w2 = -RTable*R1/
w , w3 = R2/
w ;
802 G4double Ti , Tim , Tip , Ri , Rim , Rip , Value ;
806 for (
G4int J=0; J<numOfCouples; J++)
817 Ri = rangeVector->
GetValue(Ti,isOut) ;
834 Rim = rangeVector->
GetValue(Tim,isOut);
841 Rip = rangeVector->
GetValue(Tip,isOut);
843 Value = (w1*Rip + w2*Ri + w3*Rim)/(Ti*Ti) ;
886 G4double w1 = -R1/
w , w2 = R1*(R2+1.)/
w , w3 = -R2*R1/
w ;
887 G4double Ti , Tim , Tip , Ri , Rim , Rip , Value ;
891 for (
G4int J=0; J<numOfCouples; J++)
902 Ri = rangeVector->
GetValue(Ti,isOut) ;
910 Rim = rangeVector->
GetValue(Tim,isOut);
917 Rip = rangeVector->
GetValue(Tip,isOut);
920 Value = (w1*Rip + w2*Ri + w3*Rim)/Ti;
961 G4double w1 = 1./
w , w2 = -RTable*R1/
w , w3 = RTable*R2/
w ;
962 G4double Ti , Tim , Tip , Ri , Rim , Rip , Value ;
966 for (
G4int J=0; J<numOfCouples; J++)
976 Ri = rangeVector->
GetValue(Ti,isOut) ;
982 Rim = rangeVector->
GetValue(Tim,isOut);
989 Rip = rangeVector->
GetValue(Tip,isOut);
991 Value = w1*Rip + w2*Ri + w3*Rim ;
1042 for (
size_t i=0; i<numOfCouples; i++)
1052 if (rlow <
DBL_MIN) rlow = 1.e-8;
1053 if (rhigh > 1.e16) rhigh = 1.e16;
1054 if (rhigh < 1.
e-8) rhigh =1.e-8;
1061 if (tmpTrick <= 0. || tmpTrick <
DBL_MIN) tmpTrick = 1.e-8;
1062 if (tmpTrick > 1.e16) tmpTrick = 1.e16;
1064 rhigh *= std::exp(std::log(tmpTrick)/((
G4double)(nbins-1)));
1076 for (
size_t j=1; j<nbins; j++) {
1080 for (ihigh=ilow+1; ihigh<nbins; ihigh++) {
1083 if(range2 >= range || ihigh == nbins-1) {
1091 G4double e = std::log(energy1) + std::log(energy2/energy1)*std::log(range/range1)/std::log(range2/range1);
1110 G4int binnumber = -1 ;
1119 if( rangebin < LowEdgeRange )
1125 rangebin = (*theRangeTable)(materialIndex)->GetValue(Tbin,isOut) ;
1127 while ((rangebin < LowEdgeRange) && (binnumber < TotBin )) ;
1132 else if(binnumber == TotBin-1)
1136 A = (*(*theRangeCoeffATable)(materialIndex))(binnumber-1) ;
1137 B = (*(*theRangeCoeffBTable)(materialIndex))(binnumber-1) ;
1138 C = (*(*theRangeCoeffCTable)(materialIndex))(binnumber-1) ;
1140 KineticEnergy = (LowEdgeRange -
C )/B ;
1143 discr = B*B - 4.*A*(C-LowEdgeRange);
1144 discr = discr>0. ? std::sqrt(discr) : 0.;
1145 KineticEnergy = 0.5*(discr-
B)/A ;
1149 aVector->
PutValue(i,KineticEnergy) ;
1157 G4bool wasModified =
false;
1162 for (
size_t j=0; j<numOfCouples; j++){
G4PhysicsTable * theLossTable
static G4ThreadLocal G4PhysicsTable * thepbarRangeCoeffBTable
static void BuildLabTimeVector(G4int materialIndex, G4PhysicsLogVector *rangeVector)
static G4ThreadLocal G4double Mass
static G4int GetNumberOfProcesses()
static void BuildTimeTables(const G4ParticleDefinition &aParticleType)
static G4double RangeIntLog(G4PhysicsVector *physicsVector, G4int nbin)
static G4ThreadLocal G4double c2lim
static G4ThreadLocal G4double c3lim
G4double GetLowEdgeEnergy(size_t binNumber) const
static G4ThreadLocal G4PhysicsTable * theDEDXTable
static void BuildInverseRangeTable(const G4ParticleDefinition &aParticleType)
static G4ThreadLocal G4int CounterOfProcess
static constexpr double keV
static void SetNumberOfProcesses(G4int number)
static G4ThreadLocal G4PhysicsTable * thepbarRangeCoeffCTable
static G4ThreadLocal G4double RTable
static G4ThreadLocal G4double tauhigh
static G4AntiProton * AntiProton()
static G4ThreadLocal G4int TotBin
G4bool CutsWhereModified()
G4double GetPDGCharge() const
static G4double RangeIntLin(G4PhysicsVector *physicsVector, G4int nbin)
static G4ThreadLocal G4int NumberOfProcesses
static G4ThreadLocal G4PhysicsTable * thepRangeCoeffCTable
static G4Proton * Proton()
static void BuildRangeCoeffCTable(const G4ParticleDefinition &aParticleType)
static void BuildRangeCoeffATable(const G4ParticleDefinition &aParticleType)
static G4ThreadLocal G4double ParticleMass
G4double GetPDGMass() const
static G4ThreadLocal G4PhysicsTable * theLabTimepbarTable
G4hRDEnergyLoss(const G4String &)
static G4ThreadLocal G4double LowestKineticEnergy
G4double GetValue(G4double theEnergy, G4bool &isOutRange) const
static constexpr double proton_mass_c2
static G4ThreadLocal G4PhysicsTable * theInverseRangepTable
static G4ThreadLocal G4int CounterOfpProcess
static G4ThreadLocal G4PhysicsTable * theInverseRangepbarTable
static void BuildProperTimeVector(G4int materialIndex, G4PhysicsLogVector *rangeVector)
static G4ThreadLocal G4double c1lim
static G4ThreadLocal G4PhysicsTable ** RecorderOfpbarProcess
const XML_Char int const XML_Char * value
static void PlusNumberOfProcesses()
const G4ParticleDefinition const G4Material *G4double range
static G4ThreadLocal G4double Charge
static G4ThreadLocal G4PhysicsTable * theProperTimeTable
static G4ThreadLocal G4double taulow
static G4ThreadLocal G4PhysicsTable * thepbarRangeCoeffATable
static G4ThreadLocal G4double ltauhigh
static void SetStepFunction(G4double c1, G4double c2)
static void SetdRoverRange(G4double value)
double A(double temperature)
static G4ThreadLocal G4PhysicsTable * theDEDXpbarTable
static G4ThreadLocal G4double HighestKineticEnergy
static G4ThreadLocal G4double ltaulow
static G4ThreadLocal G4PhysicsTable * theRangeTable
static G4ThreadLocal G4PhysicsTable * thepRangeCoeffBTable
static void MinusNumberOfProcesses()
static void BuildRangeTable(const G4ParticleDefinition &aParticleType)
static G4ThreadLocal G4double finalRange
size_t GetTableSize() const
static void BuildDEDXTable(const G4ParticleDefinition &aParticleType)
static G4ThreadLocal G4PhysicsTable * theProperTimepTable
static G4ThreadLocal G4PhysicsTable ** RecorderOfProcess
static G4ThreadLocal G4PhysicsTable * theRangeCoeffATable
static G4ThreadLocal G4PhysicsTable * theRangeCoeffBTable
static G4ProductionCutsTable * GetProductionCutsTable()
static constexpr double eplus
static G4ThreadLocal G4PhysicsTable * thepRangeCoeffATable
static G4ThreadLocal G4int CounterOfpbarProcess
static G4double LabTimeIntLog(G4PhysicsVector *physicsVector, G4int nbin)
static G4ThreadLocal G4PhysicsTable * theRangepTable
static constexpr double c_light
static G4double ProperTimeIntLog(G4PhysicsVector *physicsVector, G4int nbin)
static G4ThreadLocal G4PhysicsTable * theRangeCoeffCTable
void insert(G4PhysicsVector *)
static G4ThreadLocal G4double pbartableElectronCutInRange
G4bool IsRecalcNeeded() const
static G4ThreadLocal G4double ptableElectronCutInRange
static G4ThreadLocal G4PhysicsTable ** RecorderOfpProcess
static G4ThreadLocal G4double LOGRTable
static G4ThreadLocal G4PhysicsTable * theInverseRangeTable
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
static G4ThreadLocal G4PhysicsTable * theLabTimepTable
static void BuildRangeCoeffBTable(const G4ParticleDefinition &aParticleType)
static G4ThreadLocal G4PhysicsTable * theProperTimepbarTable
static G4ThreadLocal G4PhysicsTable * theDEDXpTable
static void SetRndmStep(G4bool value)
double B(double temperature)
static G4ThreadLocal G4bool rndmStepFlag
static void SetEnlossFluc(G4bool value)
static void InvertRangeVector(G4int materialIndex, G4PhysicsLogVector *rangeVector)
static void BuildRangeVector(G4int materialIndex, G4PhysicsLogVector *rangeVector)
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)
void PutValue(size_t index, G4double theValue)
size_t GetVectorLength() const
static G4ThreadLocal G4double dRoverRange
static G4ThreadLocal G4bool EnlossFlucFlag
static G4ThreadLocal G4PhysicsTable * theLabTimeTable
static G4ThreadLocal G4PhysicsTable * theRangepbarTable