89 secondaryParticle(nullptr),
91 idxSCoffRegions(nullptr),
93 theDEDXTable(nullptr),
94 theDEDXSubTable(nullptr),
95 theDEDXunRestrictedTable(nullptr),
96 theIonisationTable(nullptr),
97 theIonisationSubTable(nullptr),
98 theRangeTableForLoss(nullptr),
99 theCSDARangeTable(nullptr),
100 theSecondaryRangeTable(nullptr),
101 theInverseRangeTable(nullptr),
102 theLambdaTable(nullptr),
103 theSubLambdaTable(nullptr),
104 baseParticle(nullptr),
105 lossFluctuationFlag(true),
107 tablesAreBuilt(false),
112 useDeexcitation(false),
113 currentCouple(nullptr),
128 minKinEnergy = 0.1*keV;
129 maxKinEnergy = 100.0*TeV;
131 maxKinEnergyCSDA = 1.0*GeV;
133 actMinKinEnergy = actMaxKinEnergy = actBinning = actLinLossLimit
134 = actLossFluc = actIntegral =
false;
139 finalRange = CLHEP::mm;
143 logLambdafactor =
G4Log(lambdaFactor);
152 theGenericIon =
nullptr;
169 fluctModel =
nullptr;
170 currentModel =
nullptr;
171 atomDeexcitation =
nullptr;
172 subcutProducer =
nullptr;
174 biasManager =
nullptr;
181 secParticles.reserve(5);
183 theCuts = theSubCuts =
nullptr;
186 massRatio = fFactor = reduceFactor = chargeSqRatio = 1.0;
190 secID = biasID = subsecID = -1;
208 if (isMaster && !baseParticle) {
212 if(theIonisationTable == theDEDXTable) { theIonisationTable =
nullptr; }
216 theDEDXTable =
nullptr;
217 if(theDEDXSubTable) {
218 if(theIonisationSubTable == theDEDXSubTable)
219 { theIonisationSubTable =
nullptr; }
221 delete theDEDXSubTable;
222 theDEDXSubTable =
nullptr;
226 if(theIonisationTable) {
229 delete theIonisationTable;
230 theIonisationTable =
nullptr;
232 if(theIonisationSubTable) {
234 delete theIonisationSubTable;
235 theIonisationSubTable =
nullptr;
237 if(theDEDXunRestrictedTable && isIonisation) {
239 delete theDEDXunRestrictedTable;
240 theDEDXunRestrictedTable =
nullptr;
242 if(theCSDARangeTable && isIonisation) {
244 delete theCSDARangeTable;
245 theCSDARangeTable =
nullptr;
248 if(theRangeTableForLoss && isIonisation) {
250 delete theRangeTableForLoss;
251 theRangeTableForLoss =
nullptr;
254 if(theInverseRangeTable && isIonisation ) {
256 delete theInverseRangeTable;
257 theInverseRangeTable =
nullptr;
262 delete theLambdaTable;
263 theLambdaTable =
nullptr;
265 if(theSubLambdaTable) {
267 delete theSubLambdaTable;
268 theSubLambdaTable =
nullptr;
280void G4VEnergyLossProcess::Clean()
288 delete [] idxSCoffRegions;
290 tablesAreBuilt =
false;
316 modelManager->
AddEmModel(order, p, fluc, region);
332 for(
auto & em : emModels) {
if(em == ptr) {
return; } }
333 emModels.push_back(ptr);
340 return (index < emModels.size()) ? emModels[index] :
nullptr;
347 return modelManager->
GetModel(idx, ver);
363 G4cout <<
"G4VEnergyLossProcess::PreparePhysicsTable for "
384 if( !particle ) { particle = ∂ }
389 if(pname !=
"deuteron" && pname !=
"triton" &&
390 pname !=
"alpha+" && pname !=
"helium" &&
391 pname !=
"hydrogen") {
398 if(theGenericIon && particle != theGenericIon) {
401 size_t n = v->
size();
402 for(
size_t j=0; j<n; ++j) {
403 if((*v)[j] ==
this) {
404 particle = theGenericIon;
412 if( particle != &part ) {
417 G4cout <<
"### G4VEnergyLossProcess::PreparePhysicsTable()"
418 <<
" interrupted for "
420 <<
" particle " << particle <<
" GenericIon " << theGenericIon
437 theDEDXAtMaxEnergy.resize(n, 0.0);
438 theRangeAtMaxEnergy.resize(n, 0.0);
439 theEnergyOfCrossSectionMax.resize(n, 0.0);
440 theCrossSectionMax.resize(n,
DBL_MAX);
443 if(!actIntegral) { integral = theParameters->
Integral(); }
444 if(!actLossFluc) { lossFluctuationFlag = theParameters->
LossFluctuation(); }
446 if(!actMinKinEnergy) { minKinEnergy = theParameters->
MinKinEnergy(); }
447 if(!actMaxKinEnergy) { maxKinEnergy = theParameters->
MaxKinEnergy(); }
450 *
G4lrint(std::log10(maxKinEnergy/minKinEnergy));
454 *
G4lrint(std::log10(maxKinEnergyCSDA/minKinEnergy));
455 if(!actLinLossLimit) { linLossLimit = theParameters->
LinearLossLimit(); }
457 logLambdafactor =
G4Log(lambdaFactor);
469 massRatio = (baseParticle->
GetPDGMass())/initialMass;
470 logMassRatio =
G4Log(massRatio);
473 if(chargeSqRatio > 0.0) { reduceFactor = 1.0/(chargeSqRatio*massRatio); }
479 if (isMaster && !baseParticle) {
481 if(theDEDXTable && isIonisation) {
482 if(theIonisationTable && theDEDXTable != theIonisationTable) {
485 theDEDXTable = theIonisationTable;
487 if(theDEDXSubTable && theIonisationSubTable &&
488 theDEDXSubTable != theIonisationSubTable) {
490 delete theDEDXSubTable;
491 theDEDXSubTable = theIonisationSubTable;
498 if(theDEDXSubTable) {
504 theDEDXunRestrictedTable =
513 theRangeTableForLoss =
515 theInverseRangeTable =
554 for(
G4int i=0; i<nmod; ++i) {
563 theCuts = modelManager->
Initialise(particle, secondaryParticle,
568 if(nSCoffRegions > 0) {
569 if(theParameters->
MinSubRange() < 1.0) { useSubCutoff =
true; }
573 idxSCoffRegions =
new G4bool[n];
574 for (
size_t j=0; j<n; ++j) {
581 for(
G4int i=0; i<nSCoffRegions; ++i) {
582 if( pcuts == scoffRegions[i]->GetProductionCuts()) {
587 idxSCoffRegions[j] = reg;
592 G4cout <<
"G4VEnergyLossProcess::PrepearPhysicsTable() is done "
594 <<
" isIon= " << isIon;
598 G4cout <<
" chargeSqRatio= " << chargeSqRatio
599 <<
" massRatio= " << massRatio
600 <<
" reduceFactor= " << reduceFactor <<
G4endl;
602 G4cout <<
" SubCutoff Regime is ON for regions: " <<
G4endl;
603 for (
G4int i=0; i<nSCoffRegions; ++i) {
604 const G4Region* r = scoffRegions[i];
616 G4cout <<
"### G4VEnergyLossProcess::BuildPhysicsTable() for "
623 G4cout <<
" TablesAreBuilt= " << tablesAreBuilt
624 <<
" isIon= " << isIon <<
" " <<
this <<
G4endl;
627 if(&part == particle) {
651 tablesAreBuilt =
true;
655 for(
G4int i=0; i<numberOfModels; ++i) {
671 num ==
"e+" || num ==
"mu+" ||
672 num ==
"mu-" || num ==
"proton"||
673 num ==
"pi+" || num ==
"pi-" ||
674 num ==
"kaon+" || num ==
"kaon-" ||
675 num ==
"alpha" || num ==
"anti_proton" ||
676 num ==
"GenericIon"|| num ==
"alpha++" ||
686 if(nSCoffRegions > 0) { subcutProducer = lManager->
SubCutProducer(); }
687 if(atomDeexcitation) {
688 if(atomDeexcitation->
IsPIXEActive()) { useDeexcitation =
true; }
703 G4cout <<
"### G4VEnergyLossProcess::BuildPhysicsTable() done for "
706 if(isIonisation) {
G4cout <<
" isIonisation flag = 1"; }
716 G4cout <<
"G4VEnergyLossProcess::BuildDEDXTable() of type " << tType
726 emax = maxKinEnergyCSDA;
728 table = theDEDXunRestrictedTable;
730 table = theDEDXTable;
732 table = theDEDXSubTable;
734 G4cout <<
"G4VEnergyLossProcess::BuildDEDXTable WARNING: wrong type "
744 G4cout << numOfCouples <<
" materials"
745 <<
" minKinEnergy= " << minKinEnergy
746 <<
" maxKinEnergy= " << emax
748 <<
" EmTableType= " << tType
749 <<
" table= " << table <<
" " <<
this
752 if(!table) {
return table; }
759 for(
size_t i=0; i<numOfCouples; ++i) {
762 G4cout <<
"G4VEnergyLossProcess::BuildDEDXVector Idx= " << i
763 <<
" flagTable= " << table->
GetFlag(i)
771 if((*table)[i]) {
delete (*table)[i]; }
789 G4cout <<
"G4VEnergyLossProcess::BuildDEDXTable(): table is built for "
806 table = theLambdaTable;
808 table = theSubLambdaTable;
810 G4cout <<
"G4VEnergyLossProcess::BuildLambdaTable WARNING: wrong type "
815 G4cout <<
"G4VEnergyLossProcess::BuildLambdaTable() of type "
816 << tType <<
" for process "
819 <<
" EmTableType= " << tType
820 <<
" table= " << table
823 if(!table) {
return table;}
838 for(
size_t i=0; i<numOfCouples; ++i) {
850 if(minKinEnergy > emin) {
856 if(emax <= emin) { emax = 2*emin; }
858 bin = std::max(bin, 3);
871 G4cout <<
"Lambda table is built for "
881void G4VEnergyLossProcess::StreamInfo(std::ostream& out,
885 out << std::setprecision(6);
889 <<
" dE/dx and range tables from "
891 <<
" to " <<
G4BestUnit(maxKinEnergy,
"Energy")
892 <<
" in " << nBins <<
" bins" <<
G4endl
893 <<
" Lambda tables from threshold to "
896 <<
" bins/decade, spline: "
897 << theParameters->
Spline()
899 if(theRangeTableForLoss && isIonisation) {
900 out <<
" StepFunction=(" << dRoverRange <<
", "
901 << finalRange/mm <<
" mm)"
902 <<
", integ: " << integral
903 <<
", fluct: " << lossFluctuationFlag
904 <<
", linLossLim= " << linLossLimit
909 if(theCSDARangeTable && isIonisation) {
910 out <<
" CSDA range table up"
911 <<
" to " <<
G4BestUnit(maxKinEnergyCSDA,
"Energy")
912 <<
" in " << nBinsCSDA <<
" bins" <<
G4endl;
914 if(nSCoffRegions>0 && isIonisation) {
915 out <<
" Subcutoff sampling in " << nSCoffRegions
919 out <<
" DEDXTable address= " << theDEDXTable <<
G4endl;
920 if(theDEDXTable && isIonisation) out << (*theDEDXTable) <<
G4endl;
921 out <<
"non restricted DEDXTable address= "
922 << theDEDXunRestrictedTable <<
G4endl;
923 if(theDEDXunRestrictedTable && isIonisation) {
924 out << (*theDEDXunRestrictedTable) <<
G4endl;
926 if(theDEDXSubTable && isIonisation) {
927 out << (*theDEDXSubTable) <<
G4endl;
929 out <<
" CSDARangeTable address= " << theCSDARangeTable <<
G4endl;
930 if(theCSDARangeTable && isIonisation) {
931 out << (*theCSDARangeTable) <<
G4endl;
933 out <<
" RangeTableForLoss address= " << theRangeTableForLoss
935 if(theRangeTableForLoss && isIonisation) {
936 out << (*theRangeTableForLoss) <<
G4endl;
938 out <<
" InverseRangeTable address= " << theInverseRangeTable
940 if(theInverseRangeTable && isIonisation) {
941 out << (*theInverseRangeTable) <<
G4endl;
943 out <<
" LambdaTable address= " << theLambdaTable <<
G4endl;
944 if(theLambdaTable && isIonisation) {
945 out << (*theLambdaTable) <<
G4endl;
947 out <<
" SubLambdaTable address= " << theSubLambdaTable <<
G4endl;
948 if(theSubLambdaTable && isIonisation) {
949 out << (*theSubLambdaTable) <<
G4endl;
961 reg = regionStore->
GetRegion(
"DefaultRegionForTheWorld",
false);
965 if (nSCoffRegions > 0) {
966 for (
G4int i=0; i<nSCoffRegions; ++i) {
967 if (reg == scoffRegions[i]) {
974 scoffRegions.push_back(reg);
1001 massRatio = baseParticle->
GetPDGMass()/newmass;
1002 logMassRatio =
G4Log(massRatio);
1003 }
else if(theGenericIon) {
1004 massRatio = proton_mass_c2/newmass;
1005 logMassRatio =
G4Log(massRatio);
1028 *selection = aGPILSelection;
1032 G4double finR = (rndmStepFlag) ? std::min(finalRange,
1081 if(q2 != chargeSqRatio && q2 > 0.0) {
1084 reduceFactor = 1.0/(fFactor*massRatio);
1139 G4cout <<
"G4VEnergyLossProcess::PostStepGetPhysicalInteractionLength ";
1147 <<
"InteractionLength= " << x/cm <<
"[cm] " <<
G4endl;
1156G4VEnergyLossProcess::ComputeLambdaForScaledEnergy(
G4double e,
G4double loge)
1160 if(e <= epeak && e/lambdaFactor >=
mfpKinEnergy) {
return; }
1167 const G4double e1 = e*lambdaFactor;
1172 GetLambdaForScaledEnergy(e1, loge+logLambdafactor);
1223 weight /= biasFactor;
1230 if (useDeexcitation) {
1233 if(scTracks.size() > 0) { FillSecondariesAlongStep(eloss, weight); }
1234 eloss = std::max(eloss, 0.0);
1288 if(useSubCutoff && !subcutProducer) {
1304 if(preSafety < rcut) {
1309 if(preSafety < rcut) { yes =
true; }
1313 G4double postSafety = preSafety - length;
1314 if(postSafety < rcut) {
1317 if(postSafety < rcut) { yes =
true; }
1349 eloss, eadd, length);
1350 if(eloss < 0.0) { eloss = 0.5*eloss_before; }
1354 if (lossFluctuationFlag) {
1375 if (useDeexcitation) {
1391 if(eloss >= esecfluo) {
1412 if(scTracks.size() > 0) { FillSecondariesAlongStep(eloss, weight); }
1416 if (finalT <= lowestKinEnergy) {
1425 eloss = std::max(eloss, 0.0);
1449 G4int n0 = scTracks.size();
1460 G4int n = scTracks.size();
1463 for(
G4int i=0; i<
n; ++i) {
1486 G4double subcut = (*theSubCuts)[idx];
1488 if(cut <= subcut) {
return esec; }
1493 G4double cross = (*theDensityFactor)[idx]*chargeSqRatio
1494 *(((*theSubLambdaTable)[(*theDensityIdx)[idx]])->Value(e, idxSubLambda));
1498 if(length*cross < perMillion) {
return esec; }
1519 fragment += del/length;
1520 if (fragment > 1.0) {
break; }
1523 secParticles.clear();
1529 std::vector<G4DynamicParticle*>::iterator it;
1530 for(it=secParticles.begin(); it!=secParticles.end(); ++it) {
1535 tracks.push_back(t);
1538 esec += 2.0*electron_mass_c2;
1551 }
while (fragment <= 1.0);
1568 G4double postStepScaledEnergy = finalT*massRatio;
1571 if(!currentModel->
IsActive(postStepScaledEnergy)) {
1595 const G4double lx = GetLambdaForScaledEnergy(postStepScaledEnergy,
1596 logFinalT + logMassRatio);
1617 weight /= biasFactor;
1624 secParticles.clear();
1629 G4int num0 = secParticles.size();
1637 track, currentModel,
1649 G4int num = secParticles.size();
1655 for (
G4int i=0; i<num; ++i) {
1656 if(secParticles[i]) {
1706 if (!isMaster || baseParticle || part != particle )
return res;
1708 if(!StoreTable(part,theDEDXTable,ascii,directory,
"DEDX"))
1711 if(!StoreTable(part,theDEDXunRestrictedTable,ascii,directory,
"DEDXnr"))
1714 if(!StoreTable(part,theDEDXSubTable,ascii,directory,
"SubDEDX"))
1717 if(!StoreTable(part,theIonisationTable,ascii,directory,
"Ionisation"))
1720 if(!StoreTable(part,theIonisationSubTable,ascii,directory,
"SubIonisation"))
1724 !StoreTable(part,theCSDARangeTable,ascii,directory,
"CSDARange"))
1728 !StoreTable(part,theRangeTableForLoss,ascii,directory,
"Range"))
1732 !StoreTable(part,theInverseRangeTable,ascii,directory,
"InverseRange"))
1735 if(!StoreTable(part,theLambdaTable,ascii,directory,
"Lambda"))
1738 if(!StoreTable(part,theSubLambdaTable,ascii,directory,
"SubLambda"))
1743 G4cout <<
"Physics tables are stored for "
1746 <<
" in the directory <" << directory
1750 G4cout <<
"Fail to store Physics Tables for "
1753 <<
" in the directory <" << directory
1767 if (!isMaster)
return res;
1771 G4cout <<
"G4VEnergyLossProcess::RetrievePhysicsTable() for "
1773 <<
"; tables_are_built= " << tablesAreBuilt
1776 if(particle == part) {
1778 if ( !baseParticle ) {
1781 if(!RetrieveTable(part,theDEDXTable,ascii,directory,
"DEDX",fpi))
1785 if(!RetrieveTable(part,theDEDXTable,ascii,directory,
"Ionisation",
false))
1788 if(!RetrieveTable(part,theRangeTableForLoss,ascii,directory,
"Range",fpi))
1791 if(!RetrieveTable(part,theDEDXunRestrictedTable,ascii,directory,
1795 if(!RetrieveTable(part,theCSDARangeTable,ascii,directory,
1799 if(!RetrieveTable(part,theInverseRangeTable,ascii,directory,
1800 "InverseRange",fpi))
1803 if(!RetrieveTable(part,theLambdaTable,ascii,directory,
"Lambda",
true))
1807 if(nSCoffRegions > 0) {yes =
true;}
1809 if(!RetrieveTable(part,theDEDXSubTable,ascii,directory,
"SubDEDX",yes))
1812 if(!RetrieveTable(part,theSubLambdaTable,ascii,directory,
1816 if(!fpi) yes =
false;
1817 if(!RetrieveTable(part,theIonisationSubTable,ascii,directory,
1818 "SubIonisation",yes))
1855 G4bool isRetrieved =
false;
1861 if(theParameters->
Spline()) {
1863 for(
size_t i=0; i<
n; ++i) {
1864 if((*aTable)[i]) { (*aTable)[i]->SetSpline(
true); }
1869 <<
" is Retrieved from <" << filename <<
">"
1875 if(mandatory && !isRetrieved) {
1879 << filename <<
"> is not Retrieved"
1894 DefineMaterial(couple);
1913 DefineMaterial(couple);
1915 if (theLambdaTable) {
1916 cross = GetLambdaForScaledEnergy(kineticEnergy * massRatio,
1917 logKineticEnergy + logMassRatio);
1922 particle, kineticEnergy,
1925 return std::max(cross, 0.0);
1935 const G4double cs = GetLambdaForScaledEnergy(kinEnergy * massRatio,
1936 logKinEnergy + logMassRatio);
1937 return (0.0 < cs) ? 1.0/cs :
DBL_MAX;
1990 if(add && nProcesses > 0) {
1991 for(
G4int i=0; i<nProcesses; ++i) {
1992 if(p == scProcesses[i]) {
1999 scProcesses.push_back(p);
2003 <<
" is added to the list of collaborative processes of "
2015 theDEDXunRestrictedTable = p;
2025 for (
size_t i=0; i<n; ++i) {
2029 dedx = pv->
Value(emax, idxDEDXunRestricted);
2031 pv = (*p)[(*theDensityIdx)[i]];
2034 pv->
Value(emax, idxDEDXunRestricted)*(*theDensityFactor)[i];
2037 theDEDXAtMaxEnergy[i] = dedx;
2055 theDEDXSubTable = p;
2065 theIonisationTable = p;
2067 theIonisationSubTable = p;
2075 theCSDARangeTable = p;
2082 for (
size_t i=0; i<n; ++i) {
2085 if(pv) { rmax = pv->
Value(emax, idxCSDA); }
2087 pv = (*p)[(*theDensityIdx)[i]];
2088 if(pv) { rmax = pv->
Value(emax, idxCSDA)/(*theDensityFactor)[i]; }
2090 theRangeAtMaxEnergy[i] = rmax;
2101 theRangeTableForLoss = p;
2103 G4cout <<
"### Set Range table " << p
2113 theSecondaryRangeTable = p;
2115 G4cout <<
"### Set SecondaryRange table " << p
2125 theInverseRangeTable = p;
2127 G4cout <<
"### Set InverseRange table " << p
2138 G4cout <<
"### Set Lambda table " << p
2144 tablesAreBuilt =
true;
2150 if(theLambdaTable) {
2151 size_t n = theLambdaTable->
length();
2158 for (i=0; i<n; ++i) {
2159 pv = (*theLambdaTable)[i];
2165 for (
size_t j=0; j<nb; ++j) {
2174 theEnergyOfCrossSectionMax[i] = emax;
2175 theCrossSectionMax[i] = smax;
2178 <<
" Max CS at i= " << i <<
" emax(MeV)= " << emax/MeV
2179 <<
" lambda= " << smax <<
G4endl;
2184 for (i=0; i<n; ++i) {
2185 pv = (*theLambdaTable)[i];
2187 G4int j = (*theDensityIdx)[i];
2188 theEnergyOfCrossSectionMax[i] = theEnergyOfCrossSectionMax[j];
2189 theCrossSectionMax[i] = (*theDensityFactor)[i]*theCrossSectionMax[j];
2199 theSubLambdaTable = p;
2201 G4cout <<
"### Set SebLambda table " << p
2225 G4cout <<
"### SetCrossSectionBiasingFactor: for "
2227 <<
" biasFactor= " << f <<
" weightFlag= " << flag
2242 G4cout <<
"### ActivateForcedInteraction: for "
2244 <<
" length(mm)= " << length/mm
2245 <<
" in G4Region <" << region
2246 <<
"> weightFlag= " << flag
2260 if (0.0 <= factor) {
2269 G4cout <<
"### ActivateSecondaryBiasing: for "
2271 <<
" factor= " << factor
2272 <<
" in G4Region <" << region
2273 <<
"> energyLimit(MeV)= " << energyLimit/MeV
2291 if(0.0 < val && val < 1.0) {
2293 actLinLossLimit =
true;
2294 }
else { PrintWarning(
"SetLinearLossLimit", val); }
2301 if(0.0 < v1 && 0.0 < v2) {
2302 dRoverRange = std::min(1.0, v1);
2303 finalRange = std::min(v2, 1.e+50);
2305 PrintWarning(
"SetStepFunctionV1", v1);
2306 PrintWarning(
"SetStepFunctionV2", v2);
2314 if(1.e-18 < val && val < 1.e+50) { lowestKinEnergy = val; }
2315 else { PrintWarning(
"SetLowestEnergyLimit", val); }
2322 if(2 < n && n < 1000000000) {
2327 PrintWarning(
"SetDEDXBinning", e);
2335 if(1.e-18 < e && e < maxKinEnergy) {
2337 actMinKinEnergy =
true;
2338 }
else { PrintWarning(
"SetMinKinEnergy", e); }
2345 if(minKinEnergy < e && e < 1.e+50) {
2347 actMaxKinEnergy =
true;
2348 if(e < maxKinEnergyCSDA) { maxKinEnergyCSDA = e; }
2349 }
else { PrintWarning(
"SetMaxKinEnergy", e); }
2356 G4String ss =
"G4VEnergyLossProcess::" + tit;
2358 ed <<
"Parameter is out of range: " << val
2359 <<
" it will have no effect!\n" <<
" Process "
2361 <<
" Emin(keV)= " << minKinEnergy/keV
2362 <<
" Emax(GeV)= " << maxKinEnergy/GeV;
2370 if(particle) { StreamInfo(out, *particle,
true); }
G4double condition(const G4ErrorSymMatrix &m)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
@ NotCandidateForSelection
G4double G4Log(G4double x)
G4GLOB_DLL std::ostream G4cout
G4double GetLogKineticEnergy() const
G4double GetKineticEnergy() const
static G4Electron * Electron()
G4bool ForcedInteractionRegion(G4int coupleIdx)
G4double ApplySecondaryBiasing(std::vector< G4DynamicParticle * > &, const G4Track &track, G4VEmModel *currentModel, G4ParticleChangeForGamma *pParticleChange, G4double &eloss, G4int coupleIdx, G4double tcut, G4double safety=0.0)
void ActivateSecondaryBiasing(const G4String ®ion, G4double factor, G4double energyLimit)
void ResetForcedInteraction()
void Initialise(const G4ParticleDefinition &part, const G4String &procName, G4int verbose)
G4double GetWeight(G4int i)
void ActivateForcedInteraction(G4double length=0.0, const G4String &r="")
G4bool SecondaryBiasingRegion(G4int coupleIdx)
G4double GetStepLimit(G4int coupleIdx, G4double previousStep)
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *, const G4Region *)
void UpdateEmModel(const G4String &model_name, G4double emin, G4double emax)
void DumpModelList(std::ostream &out, G4int verb)
G4int NumberOfModels() const
const G4DataVector * Initialise(const G4ParticleDefinition *part, const G4ParticleDefinition *secPart, G4double minSubRange, G4int verb)
void FillLambdaVector(G4PhysicsVector *, const G4MaterialCutsCouple *, G4bool startFromNull=true, G4EmTableType t=fRestricted)
void FillDEDXVector(G4PhysicsVector *, const G4MaterialCutsCouple *, G4EmTableType t=fRestricted)
const G4DataVector * SubCutoff() const
G4VEmModel * GetModel(G4int idx, G4bool ver=false)
void DefineRegParamForLoss(G4VEnergyLossProcess *) const
void FillStepFunction(const G4ParticleDefinition *, G4VEnergyLossProcess *) const
static G4EmParameters * Instance()
G4double MinKinEnergy() const
G4int NumberOfBinsPerDecade() const
G4bool BuildCSDARange() const
G4bool LossFluctuation() const
G4bool UseCutAsFinalRange() const
G4double MinSubRange() const
G4int WorkerVerbose() const
G4double MaxKinEnergy() const
G4double MaxEnergyForCSDARange() const
G4bool UseAngularGeneratorForIonisation() const
G4double LinearLossLimit() const
G4double LowestMuHadEnergy() const
G4double LambdaFactor() const
G4double LowestElectronEnergy() const
const std::vector< G4double > * GetDensityFactors() const
const std::vector< G4int > * GetCoupleIndexes() const
void InitialiseBaseMaterials(const G4PhysicsTable *table=nullptr)
G4bool GetFlag(size_t idx)
static G4LossTableManager * Instance()
void LocalPhysicsTables(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p)
G4LossTableBuilder * GetTableBuilder()
void PreparePhysicsTable(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p, G4bool theMaster)
void BuildPhysicsTable(const G4ParticleDefinition *aParticle)
G4VSubCutProducer * SubCutProducer()
void DeRegister(G4VEnergyLossProcess *p)
void Register(G4VEnergyLossProcess *p)
G4VAtomDeexcitation * AtomDeexcitation()
void RegisterExtraParticle(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p)
const G4Material * GetMaterial() const
G4ProductionCuts * GetProductionCuts() const
const G4String & GetName() const
void InitializeForPostStep(const G4Track &)
void InitializeForAlongStep(const G4Track &)
G4double GetProposedKineticEnergy() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void SetProposedCharge(G4double theCharge)
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleType() const
G4double GetPDGMass() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
static G4int Register(const G4String &)
static G4PhysicsTable * PreparePhysicsTable(G4PhysicsTable *physTable)
static void SetPhysicsVector(G4PhysicsTable *physTable, std::size_t idx, G4PhysicsVector *vec)
static G4bool RetrievePhysicsTable(G4PhysicsTable *physTable, const G4String &fileName, G4bool ascii)
G4bool GetFlag(std::size_t i) const
G4bool ExistPhysicsTable(const G4String &fileName) const
G4bool StorePhysicsTable(const G4String &filename, G4bool ascii=false)
std::size_t length() const
G4double Energy(std::size_t index) const
G4double Value(G4double theEnergy, std::size_t &lastidx) const
void FillSecondDerivatives()
std::size_t GetVectorLength() const
static G4Positron * Positron()
G4ProcessVector * GetAlongStepProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
G4ProcessVector * GetAtRestProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
std::size_t GetTableSize() const
static G4ProductionCutsTable * GetProductionCutsTable()
G4double GetProductionCut(G4int index) const
static G4RegionStore * GetInstance()
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
const G4String & GetName() const
G4double ComputeSafety(const G4ThreeVector &pGlobalPoint, G4double maxRadius=DBL_MAX)
G4StepStatus GetStepStatus() const
G4double GetGlobalTime() const
G4double GetSafety() const
const G4ThreeVector & GetPosition() const
G4Track * GetTrack() const
G4StepPoint * GetPreStepPoint() const
G4double GetStepLength() const
G4StepPoint * GetPostStepPoint() const
const G4ParticleDefinition * GetParticleDefinition() const
void SetWeight(G4double aValue)
const G4ThreeVector & GetPosition() const
void SetTouchableHandle(const G4TouchableHandle &apValue)
G4double GetGlobalTime() const
G4Material * GetMaterial() const
G4ParticleDefinition * GetDefinition() const
const G4DynamicParticle * GetDynamicParticle() const
const G4TouchableHandle & GetTouchableHandle() const
G4double GetKineticEnergy() const
G4int GetParentID() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
void SetCreatorModelIndex(G4int idx)
static G4TransportationManager * GetTransportationManager()
G4SafetyHelper * GetSafetyHelper() const
void AlongStepDeexcitation(std::vector< G4Track * > &tracks, const G4Step &step, G4double &eLoss, G4int coupleIndex)
G4bool IsPIXEActive() const
virtual G4double SampleFluctuations(const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmax, G4double length, G4double meanLoss)=0
virtual G4double Dispersion(const G4Material *, const G4DynamicParticle *, G4double tmax, G4double length)=0
void SetHighEnergyLimit(G4double)
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double &eloss, G4double &niel, G4double length)
void SetMasterThread(G4bool val)
G4VEmFluctuationModel * GetModelOfFluctuations()
virtual G4double GetParticleCharge(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
const G4Element * GetCurrentElement() const
void SetAngularGeneratorFlag(G4bool)
void SetParticleChange(G4VParticleChange *, G4VEmFluctuationModel *f=nullptr)
G4double HighEnergyLimit() const
G4bool IsActive(G4double kinEnergy) const
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double tmax=DBL_MAX)=0
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel)
G4double MaxSecondaryKinEnergy(const G4DynamicParticle *dynParticle)
virtual G4double ChargeSquareRatio(const G4Track &)
G4PhysicsTable * RangeTableForLoss() const
virtual G4double GetContinuousStepLimit(const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double ¤tSafety) override
void SetMaxKinEnergy(G4double e)
G4ParticleChangeForLoss fParticleChange
virtual void PreparePhysicsTable(const G4ParticleDefinition &) override
G4PhysicsTable * InverseRangeTable() const
void ActivateSubCutoff(G4bool val, const G4Region *region=nullptr)
G4double MeanFreePath(const G4Track &track)
G4double preStepLogScaledEnergy
G4PhysicsTable * CSDARangeTable() const
G4VEmModel * GetModelByIndex(G4int idx=0, G4bool ver=false) const
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition *, const G4ParticleDefinition *)=0
void SelectModel(G4double kinEnergy)
void SetRangeTableForLoss(G4PhysicsTable *p)
G4PhysicsVector * LambdaPhysicsVector(const G4MaterialCutsCouple *, G4double cut)
virtual void ProcessDescription(std::ostream &outFile) const override
void UpdateEmModel(const G4String &, G4double, G4double)
G4PhysicsTable * BuildDEDXTable(G4EmTableType tType=fRestricted)
const G4MaterialCutsCouple * currentCouple
void AddCollaborativeProcess(G4VEnergyLossProcess *)
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition *, const G4Material *, G4double cut)
G4double preStepScaledEnergy
void ActivateSecondaryBiasing(const G4String ®ion, G4double factor, G4double energyLimit)
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
const G4Element * GetCurrentElement() const
void SetDEDXBinning(G4int nbins)
void SetStepFunction(G4double v1, G4double v2)
G4PhysicsTable * DEDXTableForSubsec() const
G4int NumberOfModels() const
void SetEmModel(G4VEmModel *, G4int index=0)
void SetCrossSectionBiasingFactor(G4double f, G4bool flag=true)
G4PhysicsTable * IonisationTableForSubsec() const
const G4Material * currentMaterial
virtual G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
G4double ContinuousStepLimit(const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double ¤tSafety)
G4VEmModel * EmModel(size_t index=0) const
G4PhysicsTable * SecondaryRangeTable() const
void SetInverseRangeTable(G4PhysicsTable *p)
virtual G4bool RetrievePhysicsTable(const G4ParticleDefinition *, const G4String &directory, G4bool ascii) override
G4double SampleSubCutSecondaries(std::vector< G4Track * > &, const G4Step &, G4VEmModel *model, G4int matIdx)
void ActivateForcedInteraction(G4double length, const G4String ®ion, G4bool flag=true)
virtual ~G4VEnergyLossProcess()
G4PhysicsTable * SubLambdaTable() const
size_t currentCoupleIndex
G4bool IsIonisationProcess() const
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *fluc=0, const G4Region *region=nullptr)
G4double CrossSectionPerVolume(G4double kineticEnergy, const G4MaterialCutsCouple *couple)
void SetDEDXTable(G4PhysicsTable *p, G4EmTableType tType)
void SetSecondaryRangeTable(G4PhysicsTable *p)
G4PhysicsTable * BuildLambdaTable(G4EmTableType tType=fRestricted)
virtual G4bool StorePhysicsTable(const G4ParticleDefinition *, const G4String &directory, G4bool ascii=false) override
void SetIonisation(G4bool val)
void SetSubLambdaTable(G4PhysicsTable *p)
virtual G4double AlongStepGetPhysicalInteractionLength(const G4Track &, G4double previousStepSize, G4double currentMinimumStep, G4double ¤tSafety, G4GPILSelection *selection) override
void SetLinearLossLimit(G4double val)
void SetLowestEnergyLimit(G4double)
void SetLambdaTable(G4PhysicsTable *p)
virtual void BuildPhysicsTable(const G4ParticleDefinition &) override
G4VEnergyLossProcess(const G4String &name="EnergyLoss", G4ProcessType type=fElectromagnetic)
G4double preStepKinEnergy
virtual G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &) override
G4double GetDEDXDispersion(const G4MaterialCutsCouple *couple, const G4DynamicParticle *dp, G4double length)
G4PhysicsTable * IonisationTable() const
G4PhysicsTable * LambdaTable() const
void SetCSDARangeTable(G4PhysicsTable *pRange)
G4double preStepLogKinEnergy
G4PhysicsTable * DEDXunRestrictedTable() const
G4double preStepRangeEnergy
virtual void StreamProcessInfo(std::ostream &) const
G4PhysicsTable * DEDXTable() const
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &) override
virtual void StartTracking(G4Track *) override
void SetMinKinEnergy(G4double e)
G4double GetParentWeight() const
void ProposeTrackStatus(G4TrackStatus status)
void SetSecondaryWeightByProcess(G4bool)
void ProposeWeight(G4double finalWeight)
G4double GetLocalEnergyDeposit() const
void AddSecondary(G4Track *aSecondary)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void SetNumberOfSecondaries(G4int totSecondaries)
G4TrackStatus GetTrackStatus() const
G4double currentInteractionLength
G4double theInitialNumberOfInteractionLength
void SetVerboseLevel(G4int value)
const G4VProcess * GetMasterProcess() const
G4double theNumberOfInteractionLengthLeft
G4VParticleChange * pParticleChange
G4int GetProcessSubType() const
const G4String & GetPhysicsTableFileName(const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
const G4String & GetProcessName() const
virtual void SampleSecondaries(const G4Step &step, std::vector< G4Track * > &tracks, G4double &eloss, G4double cut) const =0