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),
335 for(
auto & em :
emModels) {
if(em == ptr) {
return; } }
336 emModels.push_back(ptr);
366 G4cout <<
"G4VEnergyLossProcess::PreparePhysicsTable for "
392 if(pname !=
"deuteron" && pname !=
"triton" &&
393 pname !=
"alpha+" && pname !=
"helium" &&
394 pname !=
"hydrogen") {
404 size_t n = v->
size();
405 for(
size_t j=0; j<
n; ++j) {
406 if((*v)[j] ==
this) {
420 G4cout <<
"### G4VEnergyLossProcess::PreparePhysicsTable()"
421 <<
" interrupted for "
557 for(
G4int i=0; i<nmod; ++i) {
577 for (
size_t j=0; j<
n; ++j) {
595 G4cout <<
"G4VEnergyLossProcess::PrepearPhysicsTable() is done "
597 <<
" isIon= " <<
isIon;
605 G4cout <<
" SubCutoff Regime is ON for regions: " <<
G4endl;
619 G4cout <<
"### G4VEnergyLossProcess::BuildPhysicsTable() for "
658 for(
G4int i=0; i<numberOfModels; ++i) {
674 num ==
"e+" || num ==
"mu+" ||
675 num ==
"mu-" || num ==
"proton"||
676 num ==
"pi+" || num ==
"pi-" ||
677 num ==
"kaon+" || num ==
"kaon-" ||
678 num ==
"alpha" || num ==
"anti_proton" ||
679 num ==
"GenericIon"|| num ==
"alpha++" ||
706 G4cout <<
"### G4VEnergyLossProcess::BuildPhysicsTable() done for "
719 G4cout <<
"G4VEnergyLossProcess::BuildDEDXTable() of type " << tType
737 G4cout <<
"G4VEnergyLossProcess::BuildDEDXTable WARNING: wrong type "
747 G4cout << numOfCouples <<
" materials"
749 <<
" maxKinEnergy= " << emax
751 <<
" EmTableType= " << tType
752 <<
" table= " << table <<
" " <<
this
755 if(!table) {
return table; }
762 for(
size_t i=0; i<numOfCouples; ++i) {
765 G4cout <<
"G4VEnergyLossProcess::BuildDEDXVector Idx= " << i
766 <<
" flagTable= " << table->
GetFlag(i)
774 if((*table)[i]) {
delete (*table)[i]; }
792 G4cout <<
"G4VEnergyLossProcess::BuildDEDXTable(): table is built for "
813 G4cout <<
"G4VEnergyLossProcess::BuildLambdaTable WARNING: wrong type "
818 G4cout <<
"G4VEnergyLossProcess::BuildLambdaTable() of type "
819 << tType <<
" for process "
822 <<
" EmTableType= " << tType
823 <<
" table= " << table
826 if(!table) {
return table;}
841 for(
size_t i=0; i<numOfCouples; ++i) {
859 if(emax <= emin) { emax = 2*
emin; }
874 G4cout <<
"Lambda table is built for "
888 out << std::setprecision(6);
892 <<
" dE/dx and range tables from "
896 <<
" Lambda tables from threshold to "
899 <<
" bins/decade, spline: "
913 out <<
" CSDA range table up"
924 out <<
"non restricted DEDXTable address= "
927 out << (*theDEDXunRestrictedTable) <<
G4endl;
930 out << (*theDEDXSubTable) <<
G4endl;
934 out << (*theCSDARangeTable) <<
G4endl;
939 out << (*theRangeTableForLoss) <<
G4endl;
944 out << (*theInverseRangeTable) <<
G4endl;
948 out << (*theLambdaTable) <<
G4endl;
952 out << (*theSubLambdaTable) <<
G4endl;
964 reg = regionStore->
GetRegion(
"DefaultRegionForTheWorld",
false);
1142 G4cout <<
"G4VEnergyLossProcess::PostStepGetPhysicalInteractionLength ";
1146 <<
" Ekin(MeV)= " << preStepKinEnergy/
MeV
1150 <<
"InteractionLength= " << x/
cm <<
"[cm] " <<
G4endl;
1163 if(e <= epeak && e/lambdaFactor >=
mfpKinEnergy) {
return; }
1307 if(preSafety < rcut) {
1312 if(preSafety < rcut) { yes =
true; }
1317 if(postSafety < rcut) {
1320 if(postSafety < rcut) { yes =
true; }
1352 eloss, eadd, length);
1353 if(eloss < 0.0) { eloss = 0.5*eloss_before; }
1394 if(eloss >= esecfluo) {
1466 for(
G4int i=0; i<
n; ++i) {
1491 if(cut <= subcut) {
return esec; }
1497 *(((*theSubLambdaTable)[(*theDensityIdx)[
idx]])->Value(e,
idxSubLambda));
1501 if(length*cross <
perMillion) {
return esec; }
1523 if (fragment > 1.0) {
break; }
1532 std::vector<G4DynamicParticle*>::iterator
it;
1538 tracks.push_back(t);
1554 }
while (fragment <= 1.0);
1746 G4cout <<
"Physics tables are stored for "
1749 <<
" in the directory <" << directory
1753 G4cout <<
"Fail to store Physics Tables for "
1756 <<
" in the directory <" << directory
1774 G4cout <<
"G4VEnergyLossProcess::RetrievePhysicsTable() for "
1803 "InverseRange",fpi))
1819 if(!fpi) yes =
false;
1821 "SubIonisation",yes))
1858 G4bool isRetrieved =
false;
1866 for(
size_t i=0; i<
n; ++i) {
1867 if((*aTable)[i]) { (*aTable)[i]->SetSpline(
true); }
1872 <<
" is Retrieved from <" << filename <<
">"
1878 if(mandatory && !isRetrieved) {
1882 << filename <<
"> is not Retrieved"
1940 return (0.0 < cs) ? 1.0/cs :
DBL_MAX;
2006 <<
" is added to the list of collaborative processes of "
2028 for (
size_t i=0; i<
n; ++i) {
2034 pv = (*p)[(*theDensityIdx)[i]];
2085 for (
size_t i=0; i<
n; ++i) {
2090 pv = (*p)[(*theDensityIdx)[i]];
2091 if(pv) { rmax = pv->
Value(emax,
idxCSDA)/(*theDensityFactor)[i]; }
2106 G4cout <<
"### Set Range table " << p
2118 G4cout <<
"### Set SecondaryRange table " << p
2130 G4cout <<
"### Set InverseRange table " << p
2141 G4cout <<
"### Set Lambda table " << p
2161 for (i=0; i<
n; ++i) {
2162 pv = (*theLambdaTable)[i];
2168 for (
size_t j=0; j<nb; ++j) {
2181 <<
" Max CS at i= " << i <<
" emax(MeV)= " << emax/
MeV
2182 <<
" lambda= " << smax <<
G4endl;
2187 for (i=0; i<
n; ++i) {
2188 pv = (*theLambdaTable)[i];
2190 G4int j = (*theDensityIdx)[i];
2204 G4cout <<
"### Set SebLambda table " << p
2228 G4cout <<
"### SetCrossSectionBiasingFactor: for "
2230 <<
" biasFactor= " << f <<
" weightFlag= " << flag
2245 G4cout <<
"### ActivateForcedInteraction: for "
2247 <<
" length(mm)= " << length/
mm
2248 <<
" in G4Region <" << region
2249 <<
"> weightFlag= " << flag
2263 if (0.0 <= factor) {
2272 G4cout <<
"### ActivateSecondaryBiasing: for "
2274 <<
" factor= " << factor
2275 <<
" in G4Region <" << region
2276 <<
"> energyLimit(MeV)= " << energyLimit/
MeV
2294 if(0.0 < val && val < 1.0) {
2307 if(0.0 < v1 && 0.0 < v2 && v2 < 1.
e+50) {
2310 }
else if(v1 <= 0.0) {
2329 if(2 < n && n < 1000000000) {
2363 G4String ss =
"G4VEnergyLossProcess::" + tit;
2365 ed <<
"Parameter is out of range: " << val
2366 <<
" it will have no effect!\n" <<
" Process "