168 secondaryParticle(0),
174 theDEDXunRestrictedTable(0),
175 theIonisationTable(0),
176 theIonisationSubTable(0),
177 theRangeTableForLoss(0),
178 theCSDARangeTable(0),
179 theSecondaryRangeTable(0),
180 theInverseRangeTable(0),
182 theSubLambdaTable(0),
187 lossFluctuationFlag(true),
189 tablesAreBuilt(false),
194 useDeexcitation(false),
203 lowestKinEnergy = 1.*
eV;
204 preStepKinEnergy = 0.0;
205 preStepRangeEnergy = 0.0;
209 minKinEnergy = 0.1*
keV;
210 maxKinEnergy = 10.0*
TeV;
212 maxKinEnergyCSDA = 1.0*
GeV;
245 atomDeexcitation = 0;
253 idxDEDX = idxDEDXSub = idxDEDXunRestricted = idxIonisation =
254 idxIonisationSub = idxRange = idxCSDA = idxSecRange =
255 idxInverseRange = idxLambda = idxSubLambda = 0;
258 secParticles.reserve(5);
260 secID = biasID = subsecID = -1;
274 if ( !baseParticle && isMaster ) {
279 if(theIonisationTable == theDEDXTable) { theIonisationTable = 0; }
281 if(theDEDXSubTable) {
282 if(theIonisationSubTable == theDEDXSubTable)
283 { theIonisationSubTable = 0; }
284 delete theDEDXSubTable;
287 delete theIonisationTable;
288 delete theIonisationSubTable;
289 if(theDEDXunRestrictedTable && isIonisation) {
290 delete theDEDXunRestrictedTable;
292 if(theCSDARangeTable && isIonisation) {
293 delete theCSDARangeTable;
295 if(theRangeTableForLoss && isIonisation) {
296 delete theRangeTableForLoss;
298 if(theInverseRangeTable && isIonisation) {
299 delete theInverseRangeTable;
301 delete theLambdaTable;
302 delete theSubLambdaTable;
313 void G4VEnergyLossProcess::Clean()
321 delete [] idxSCoffRegions;
323 tablesAreBuilt =
false;
328 idxDEDX = idxDEDXSub = idxDEDXunRestricted = idxIonisation =
329 idxIonisationSub = idxRange = idxCSDA = idxSecRange =
330 idxInverseRange = idxLambda = idxSubLambda = 0;
348 modelManager->
AddEmModel(order, p, fluc, region);
364 G4int n = emModels.size();
365 if(index >= n) {
for(
G4int i=n; i<=
index; ++i) {emModels.push_back(0);} }
374 if(index >= 0 && index <
G4int(emModels.size())) { p = emModels[
index]; }
382 return modelManager->
GetModel(idx, ver);
398 G4cout <<
"G4VEnergyLossProcess::PreparePhysicsTable for "
409 preStepKinEnergy = 0.0;
410 preStepRangeEnergy = 0.0;
418 if( !particle ) { particle = &
part; }
423 if(pname !=
"deuteron" && pname !=
"triton" &&
424 pname !=
"alpha+" && pname !=
"helium" &&
425 pname !=
"hydrogen") {
432 if(theGenericIon && particle != theGenericIon) {
435 size_t n = v->
size();
436 for(
size_t j=0; j<
n; ++j) {
437 if((*v)[j] ==
this) {
438 particle = theGenericIon;
446 if( particle != &part ) {
451 G4cout <<
"### G4VEnergyLossProcess::PreparePhysicsTable()"
452 <<
" interrupted for "
454 <<
" particle " << particle <<
" GenericIon " << theGenericIon
471 theDEDXAtMaxEnergy.resize(n, 0.0);
472 theRangeAtMaxEnergy.resize(n, 0.0);
473 theEnergyOfCrossSectionMax.resize(n, 0.0);
474 theCrossSectionMax.resize(n,
DBL_MAX);
477 if (isMaster && !baseParticle) {
479 if(theDEDXTable && isIonisation) {
480 if(theIonisationTable && theDEDXTable != theIonisationTable) {
482 theDEDXTable = theIonisationTable;
484 if(theDEDXSubTable && theIonisationSubTable &&
485 theDEDXSubTable != theIonisationSubTable) {
487 theDEDXSubTable = theIonisationSubTable;
494 if(theDEDXSubTable) {
500 theDEDXunRestrictedTable =
509 theRangeTableForLoss =
511 theInverseRangeTable =
533 massRatio = (baseParticle->
GetPDGMass())/initialMass;
536 if(chargeSqRatio > 0.0) { reduceFactor = 1.0/(chargeSqRatio*massRatio); }
551 for(
G4int i=0; i<nmod; ++i) {
559 theCuts = modelManager->
Initialise(particle, secondaryParticle,
563 if (nSCoffRegions>0) {
566 if(nSCoffRegions>0) { idxSCoffRegions =
new G4bool[
n]; }
567 for (
size_t j=0; j<
n; ++j) {
573 if(nSCoffRegions>0) {
575 for(
G4int i=0; i<nSCoffRegions; ++i) {
576 if( pcuts == scoffRegions[i]->GetProductionCuts()) { reg =
true; }
578 idxSCoffRegions[j] = reg;
584 G4cout <<
"G4VEnergyLossProcess::PrepearPhysicsTable() is done "
586 <<
" isIon= " << isIon;
588 G4cout <<
" chargeSqRatio= " << chargeSqRatio
589 <<
" massRatio= " << massRatio
590 <<
" reduceFactor= " << reduceFactor <<
G4endl;
592 G4cout <<
" SubCutoff Regime is ON for regions: " <<
G4endl;
593 for (
G4int i=0; i<nSCoffRegions; ++i) {
609 G4cout <<
"### G4VEnergyLossProcess::BuildPhysicsTable() for "
616 G4cout <<
" TablesAreBuilt= " << tablesAreBuilt
617 <<
" isIon= " << isIon <<
" " <<
this <<
G4endl;
623 if(masterProcess !=
this) { master =
false; }
625 if(&part == particle) {
654 tablesAreBuilt =
true;
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")))
689 if(atomDeexcitation) {
690 if(atomDeexcitation->
IsPIXEActive()) { useDeexcitation =
true; }
696 G4cout <<
"### G4VEnergyLossProcess::BuildPhysicsTable() done for "
699 if(isIonisation) {
G4cout <<
" isIonisation flag = 1"; }
710 G4cout <<
"G4VEnergyLossProcess::BuildDEDXTable() of type " << tType
720 emax = maxKinEnergyCSDA;
722 table = theDEDXunRestrictedTable;
724 table = theDEDXTable;
726 table = theDEDXSubTable;
728 G4cout <<
"G4VEnergyLossProcess::BuildDEDXTable WARNING: wrong type "
738 G4cout << numOfCouples <<
" materials"
739 <<
" minKinEnergy= " << minKinEnergy
740 <<
" maxKinEnergy= " << emax
742 <<
" EmTableType= " << tType
743 <<
" table= " << table <<
" " <<
this
746 if(!table) {
return table; }
753 for(
size_t i=0; i<numOfCouples; ++i) {
756 G4cout <<
"G4VEnergyLossProcess::BuildDEDXVector Idx= " << i
757 <<
" flagTable= " << table->
GetFlag(i)
783 G4cout <<
"G4VEnergyLossProcess::BuildDEDXTable(): table is built for "
800 table = theLambdaTable;
802 table = theSubLambdaTable;
804 G4cout <<
"G4VEnergyLossProcess::BuildLambdaTable WARNING: wrong type "
809 G4cout <<
"G4VEnergyLossProcess::BuildLambdaTable() of type "
810 << tType <<
" for process "
813 <<
" EmTableType= " << tType
814 <<
" table= " << table
817 if(!table) {
return table;}
832 for(
size_t i=0; i<numOfCouples; ++i) {
844 if(minKinEnergy > emin) {
850 if(emax <= emin) { emax = 2*emin; }
852 if(bin < 3) { bin = 3; }
865 G4cout <<
"Lambda table is built for "
883 G4cout <<
" dE/dx and range tables from "
885 <<
" to " <<
G4BestUnit(maxKinEnergy,
"Energy")
886 <<
" in " << nBins <<
" bins" <<
G4endl
887 <<
" Lambda tables from threshold to "
889 <<
" in " << nBins <<
" bins, spline: "
892 if(theRangeTableForLoss && isIonisation) {
893 G4cout <<
" finalRange(mm)= " << finalRange/
mm
894 <<
", dRoverRange= " << dRoverRange
895 <<
", integral: " << integral
896 <<
", fluct: " << lossFluctuationFlag
897 <<
", linLossLimit= " << linLossLimit
902 if(theCSDARangeTable && isIonisation) {
903 G4cout <<
" CSDA range table up"
904 <<
" to " <<
G4BestUnit(maxKinEnergyCSDA,
"Energy")
905 <<
" in " << nBinsCSDA <<
" bins" <<
G4endl;
907 if(nSCoffRegions>0 && isIonisation) {
908 G4cout <<
" Subcutoff sampling in " << nSCoffRegions
912 G4cout <<
" DEDXTable address= " << theDEDXTable <<
G4endl;
913 if(theDEDXTable && isIonisation)
G4cout << (*theDEDXTable) <<
G4endl;
914 G4cout <<
"non restricted DEDXTable address= "
915 << theDEDXunRestrictedTable <<
G4endl;
916 if(theDEDXunRestrictedTable && isIonisation) {
919 if(theDEDXSubTable && isIonisation) {
922 G4cout <<
" CSDARangeTable address= " << theCSDARangeTable
924 if(theCSDARangeTable && isIonisation) {
927 G4cout <<
" RangeTableForLoss address= " << theRangeTableForLoss
929 if(theRangeTableForLoss && isIonisation) {
932 G4cout <<
" InverseRangeTable address= " << theInverseRangeTable
934 if(theInverseRangeTable && isIonisation) {
937 G4cout <<
" LambdaTable address= " << theLambdaTable <<
G4endl;
938 if(theLambdaTable && isIonisation) {
941 G4cout <<
" SubLambdaTable address= " << theSubLambdaTable
943 if(theSubLambdaTable && isIonisation) {
957 reg = regionStore->
GetRegion(
"DefaultRegionForTheWorld",
false);
962 for (
G4int i=0; i<nSCoffRegions; ++i) {
963 if (reg == scoffRegions[i]) {
972 scoffRegions.push_back(reg);
975 useSubCutoff =
false;
993 preStepRangeEnergy = 0.0;
1001 massRatio = baseParticle->
GetPDGMass()/newmass;
1002 }
else if(theGenericIon) {
1025 *selection = aGPILSelection;
1027 fRange = GetScaledRangeForScaledEnergy(preStepScaledEnergy)*reduceFactor;
1035 x = fRange*dRoverRange + finR*(1.0 - dRoverRange)*(2.0 - finR/fRange);
1068 preStepScaledEnergy = preStepKinEnergy*massRatio;
1071 if(!currentModel->
IsActive(preStepScaledEnergy)) {
1079 if(q2 != chargeSqRatio) {
1081 fFactor = q2*biasFactor*(*theDensityFactor)[currentCoupleIndex];
1082 reduceFactor = 1.0/(fFactor*massRatio);
1096 return biasManager->
GetStepLimit(currentCoupleIndex, previousStepSize);
1102 if(preStepScaledEnergy < mfpKinEnergy) {
1103 if (integral) { ComputeLambdaForScaledEnergy(preStepScaledEnergy); }
1104 else { preStepLambda = GetLambdaForScaledEnergy(preStepScaledEnergy); }
1107 if(preStepLambda <= 0.0) {
1114 if(preStepLambda > 0.0) {
1141 G4cout <<
"G4VEnergyLossProcess::PostStepGetPhysicalInteractionLength ";
1144 <<
" in Material " << currentMaterial->
GetName()
1145 <<
" Ekin(MeV)= " << preStepKinEnergy/
MeV
1149 <<
"InteractionLength= " << x/
cm <<
"[cm] " <<
G4endl;
1162 if(!isIonisation || !currentModel->
IsActive(preStepScaledEnergy)) {
1194 weight /= biasFactor;
1199 if (length >= fRange) {
1200 eloss = preStepKinEnergy;
1201 if (useDeexcitation) {
1203 eloss, currentCoupleIndex);
1204 if(scTracks.size() > 0) { FillSecondariesAlongStep(eloss, weight); }
1205 if(eloss < 0.0) { eloss = 0.0; }
1215 eloss = GetDEDXForScaledEnergy(preStepScaledEnergy)*length;
1220 if(eloss > preStepKinEnergy*linLossLimit) {
1222 G4double x = (fRange - length)/reduceFactor;
1224 eloss = preStepKinEnergy - ScaledKinEnergyForLoss(x)/massRatio;
1252 G4double cut = (*theCuts)[currentCoupleIndex];
1257 if(idxSCoffRegions[currentCoupleIndex]) {
1272 if(preSafety < rcut) {
1276 if(preSafety < rcut) { yes =
true; }
1280 G4double postSafety = preSafety - length;
1281 if(postSafety < rcut) {
1284 if(postSafety < rcut) { yes =
true; }
1292 cut = (*theSubCuts)[currentCoupleIndex];
1293 eloss -= GetSubDEDXForScaledEnergy(preStepScaledEnergy)*length;
1295 currentModel,currentCoupleIndex);
1316 eloss, eadd, length);
1317 if(eloss < 0.0) { eloss = 0.5*eloss_before; }
1321 if (lossFluctuationFlag) {
1324 (eloss + esec + lowestKinEnergy) < preStepKinEnergy) {
1343 if (useDeexcitation) {
1344 G4double esecfluo = preStepKinEnergy - esec;
1353 de, currentCoupleIndex);
1359 if(eloss >= esecfluo) {
1377 if(scTracks.size() > 0) { FillSecondariesAlongStep(eloss, weight); }
1380 G4double finalT = preStepKinEnergy - eloss - esec;
1381 if (finalT <= lowestKinEnergy) {
1387 currentMaterial,finalT));
1390 if(eloss < 0.0) { eloss = 0.0; }
1413 G4int n0 = scTracks.size();
1424 G4int n = scTracks.size();
1427 for(
G4int i=0; i<
n; ++i) {
1451 G4double subcut = (*theSubCuts)[idx];
1453 if(cut <= subcut) {
return esec; }
1458 G4double cross = (*theDensityFactor)[idx]*chargeSqRatio
1459 *(((*theSubLambdaTable)[(*theDensityIdx)[idx]])->Value(e, idxSubLambda));
1463 if(length*cross <
perMillion) {
return esec; }
1485 fragment += del/length;
1486 if (fragment > 1.0)
break;
1489 secParticles.clear();
1495 std::vector<G4DynamicParticle*>::iterator it;
1496 for(it=secParticles.begin(); it!=secParticles.end(); ++it) {
1501 tracks.push_back(t);
1516 }
while (fragment <= 1.0);
1533 G4double postStepScaledEnergy = finalT*massRatio;
1535 if(!currentModel->
IsActive(postStepScaledEnergy)) {
1555 G4double lx = GetLambdaForScaledEnergy(postStepScaledEnergy);
1579 weight /= biasFactor;
1584 G4double tcut = (*theCuts)[currentCoupleIndex];
1587 secParticles.clear();
1592 G4int num0 = secParticles.size();
1600 track, currentModel,
1602 currentCoupleIndex, tcut,
1612 G4int num = secParticles.size();
1618 for (
G4int i=0; i<num; ++i) {
1619 if(secParticles[i]) {
1663 if ( baseParticle || part != particle )
return res;
1665 if(!StoreTable(part,theDEDXTable,ascii,directory,
"DEDX"))
1668 if(!StoreTable(part,theDEDXunRestrictedTable,ascii,directory,
"DEDXnr"))
1671 if(!StoreTable(part,theDEDXSubTable,ascii,directory,
"SubDEDX"))
1674 if(!StoreTable(part,theIonisationTable,ascii,directory,
"Ionisation"))
1677 if(!StoreTable(part,theIonisationSubTable,ascii,directory,
"SubIonisation"))
1681 !StoreTable(part,theCSDARangeTable,ascii,directory,
"CSDARange"))
1685 !StoreTable(part,theRangeTableForLoss,ascii,directory,
"Range"))
1689 !StoreTable(part,theInverseRangeTable,ascii,directory,
"InverseRange"))
1692 if(!StoreTable(part,theLambdaTable,ascii,directory,
"Lambda"))
1695 if(!StoreTable(part,theSubLambdaTable,ascii,directory,
"SubLambda"))
1700 G4cout <<
"Physics tables are stored for "
1703 <<
" in the directory <" << directory
1707 G4cout <<
"Fail to store Physics Tables for "
1710 <<
" in the directory <" << directory
1727 G4cout <<
"G4VEnergyLossProcess::RetrievePhysicsTable() for "
1729 <<
"; tables_are_built= " << tablesAreBuilt
1732 if(particle == part) {
1734 if ( !baseParticle ) {
1737 if(!RetrieveTable(part,theDEDXTable,ascii,directory,
"DEDX",fpi))
1741 if(!RetrieveTable(part,theDEDXTable,ascii,directory,
"Ionisation",
false))
1744 if(!RetrieveTable(part,theRangeTableForLoss,ascii,directory,
"Range",fpi))
1747 if(!RetrieveTable(part,theDEDXunRestrictedTable,ascii,directory,
1751 if(!RetrieveTable(part,theCSDARangeTable,ascii,directory,
1755 if(!RetrieveTable(part,theInverseRangeTable,ascii,directory,
1756 "InverseRange",fpi))
1759 if(!RetrieveTable(part,theLambdaTable,ascii,directory,
"Lambda",
true))
1763 if(nSCoffRegions > 0) {yes =
true;}
1765 if(!RetrieveTable(part,theDEDXSubTable,ascii,directory,
"SubDEDX",yes))
1768 if(!RetrieveTable(part,theSubLambdaTable,ascii,directory,
1772 if(!fpi) yes =
false;
1773 if(!RetrieveTable(part,theIonisationSubTable,ascii,directory,
1774 "SubIonisation",yes))
1807 G4bool isRetrieved =
false;
1814 size_t n = aTable->
length();
1815 for(
size_t i=0; i<
n; ++i) {
1816 if((*aTable)[i]) { (*aTable)[i]->SetSpline(
true); }
1821 <<
" is Retrieved from <" << filename <<
">"
1827 if(mandatory && !isRetrieved) {
1831 << filename <<
"> is not Retrieved"
1846 DefineMaterial(couple);
1850 tmax =
std::min(tmax,(*theCuts)[currentCoupleIndex]);
1853 if(fm) { d = fm->
Dispersion(currentMaterial,dp,tmax,length); }
1863 DefineMaterial(couple);
1865 if(theLambdaTable) {
1866 cross = GetLambdaForScaledEnergy(kineticEnergy*massRatio);
1869 cross = biasFactor*(*theDensityFactor)[currentCoupleIndex]
1871 particle, kineticEnergy,
1872 (*theCuts)[currentCoupleIndex]));
1874 if(cross < 0.0) { cross = 0.0; }
1883 preStepLambda = GetLambdaForScaledEnergy(track.
GetKineticEnergy()*massRatio);
1885 if(0.0 < preStepLambda) { x = 1.0/preStepLambda; }
1939 if(add && nProcesses > 0) {
1940 for(
G4int i=0; i<nProcesses; ++i) {
1941 if(p == scProcesses[i]) {
1948 scProcesses.push_back(p);
1952 <<
" is added to the list of collaborative processes of "
1965 theDEDXunRestrictedTable =
p;
1971 for (
size_t i=0; i<
n; ++i) {
1975 dedx = pv->
Value(emax, idxDEDXunRestricted);
1977 pv = (*p)[(*theDensityIdx)[i]];
1980 pv->
Value(emax, idxDEDXunRestricted)*(*theDensityFactor)[i];
1983 theDEDXAtMaxEnergy[i] = dedx;
1991 G4cout<<
"G4VEnergyLossProcess::SetDEDXTable "
1993 <<
" oldTable " << theDEDXTable <<
" newTable " << p
1994 <<
" ion " << theIonisationTable
1995 <<
" IsMaster " << isMaster
2001 theDEDXSubTable =
p;
2004 G4cout<<
"G4VEnergyLossProcess::SetIonisationTable "
2006 <<
" oldTable " << theDEDXTable <<
" newTable " << p
2007 <<
" ion " << theIonisationTable
2008 <<
" IsMaster " << isMaster
2011 theIonisationTable =
p;
2013 theIonisationSubTable =
p;
2021 theCSDARangeTable =
p;
2028 for (
size_t i=0; i<
n; ++i) {
2031 if(pv) { rmax = pv->
Value(emax, idxCSDA); }
2033 pv = (*p)[(*theDensityIdx)[i]];
2034 if(pv) { rmax = pv->
Value(emax, idxCSDA)/(*theDensityFactor)[i]; }
2036 theRangeAtMaxEnergy[i] = rmax;
2047 theRangeTableForLoss =
p;
2049 G4cout <<
"### Set Range table " << p
2059 theSecondaryRangeTable =
p;
2061 G4cout <<
"### Set SecondaryRange table " << p
2071 theInverseRangeTable =
p;
2073 G4cout <<
"### Set InverseRange table " << p
2084 G4cout <<
"### Set Lambda table " << p
2089 tablesAreBuilt =
true;
2095 if(theLambdaTable) {
2096 size_t n = theLambdaTable->
length();
2103 for (i=0; i<
n; ++i) {
2104 pv = (*theLambdaTable)[i];
2110 for (
size_t j=0; j<nb; ++j) {
2119 theEnergyOfCrossSectionMax[i] = emax;
2120 theCrossSectionMax[i] =
smax;
2123 <<
" Max CS at i= " << i <<
" emax(MeV)= " << emax/
MeV
2124 <<
" lambda= " << smax <<
G4endl;
2129 for (i=0; i<
n; ++i) {
2130 pv = (*theLambdaTable)[i];
2132 G4int j = (*theDensityIdx)[i];
2133 theEnergyOfCrossSectionMax[i] = theEnergyOfCrossSectionMax[j];
2134 theCrossSectionMax[i] = (*theDensityFactor)[i]*theCrossSectionMax[j];
2144 theSubLambdaTable =
p;
2146 G4cout <<
"### Set SebLambda table " << p
2170 G4cout <<
"### SetCrossSectionBiasingFactor: for "
2172 <<
" biasFactor= " << f <<
" weightFlag= " << flag
2187 G4cout <<
"### ActivateForcedInteraction: for "
2189 <<
" length(mm)= " << length/
mm
2190 <<
" in G4Region <" << region
2191 <<
"> weightFlag= " << flag
2205 if (0.0 <= factor) {
2214 G4cout <<
"### ActivateSecondaryBiasing: for "
2216 <<
" factor= " << factor
2217 <<
" in G4Region <" << region
2218 <<
"> energyLimit(MeV)= " << energyLimit/
MeV
G4VEnergyLossProcess(const G4String &name="EnergyLoss", G4ProcessType type=fElectromagnetic)
G4double condition(const G4ErrorSymMatrix &m)
G4double MaxSecondaryKinEnergy(const G4DynamicParticle *dynParticle)
G4ParticleDefinition * GetDefinition() const
const G4VProcess * GetMasterProcess() const
void SetDEDXTable(G4PhysicsTable *p, G4EmTableType tType)
G4int GetParentID() const
G4bool SplineFlag() const
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
void InitializeForPostStep(const G4Track &)
const G4String & GetName() const
G4SafetyHelper * GetSafetyHelper() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
const std::vector< G4double > * GetDensityFactors()
static void SetPhysicsVector(G4PhysicsTable *physTable, size_t idx, G4PhysicsVector *vec)
static G4LossTableManager * Instance()
void ActivateForcedInteraction(G4double length=0.0, const G4String &r="")
virtual G4double SampleFluctuations(const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmax, G4double length, G4double meanLoss)=0
void AlongStepDeexcitation(std::vector< G4Track * > &tracks, const G4Step &step, G4double &eLoss, G4int coupleIndex)
G4double ApplySecondaryBiasing(std::vector< G4DynamicParticle * > &, const G4Track &track, G4VEmModel *currentModel, G4ParticleChangeForGamma *pParticleChange, G4double &eloss, G4int coupleIdx, G4double tcut, G4double safety=0.0)
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double &eloss, G4double &niel, G4double length)
void UpdateEmModel(const G4String &, G4double, G4double)
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double tmax=DBL_MAX)=0
G4double GetKineticEnergy() const
void PrintInfoDefinition(const G4ParticleDefinition &part)
G4double GetStepLength() const
G4double HighEnergyLimit() const
void BuildPhysicsTable(const G4ParticleDefinition &)
const G4DynamicParticle * GetDynamicParticle() const
G4bool SecondaryBiasingRegion(G4int coupleIdx)
G4bool IsPIXEActive() const
G4PhysicsTable * SubLambdaTable() const
void SetLowEnergyLimit(G4double elimit)
G4VEmModel * GetModel(G4int, G4bool ver=false)
G4double GetProductionCut(G4int index) const
void DeRegister(G4VEnergyLossProcess *p)
G4PhysicsTable * RangeTableForLoss() const
G4double GetContinuousStepLimit(const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double ¤tSafety)
G4StepStatus GetStepStatus() const
G4bool BuildCSDARange() const
const G4String & GetName() const
G4PhysicsTable * SecondaryRangeTable() const
G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
void AddCollaborativeProcess(G4VEnergyLossProcess *)
const G4ThreeVector & GetPosition() const
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel)
void ActivateForcedInteraction(G4double length=0.0, const G4String ®ion="", G4bool flag=true)
G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
void SetStepFunction(G4double v1, G4double v2)
G4bool ForcedInteractionRegion(G4int coupleIdx)
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
G4PhysicsTable * CSDARangeTable() const
G4bool StorePhysicsTable(const G4ParticleDefinition *, const G4String &directory, G4bool ascii=false)
G4ParticleChangeForLoss fParticleChange
G4double theNumberOfInteractionLengthLeft
void SelectModel(G4double kinEnergy)
G4bool GetFlag(size_t idx) const
void SetTouchableHandle(const G4TouchableHandle &apValue)
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *, const G4Region *)
G4VEmModel * GetModelByIndex(G4int idx=0, G4bool ver=false) const
G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
G4int NumberOfModels() const
void ResetForcedInteraction()
G4PhysicsTable * IonisationTableForSubsec() const
G4double GetParentWeight() const
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
void ActivateSecondaryBiasing(const G4String ®ion, G4double factor, G4double energyLimit)
G4VEmFluctuationModel * GetModelOfFluctuations()
const G4DataVector * SubCutoff() const
size_t GetVectorLength() const
G4PhysicsVector * LambdaPhysicsVector(const G4MaterialCutsCouple *, G4double cut)
void InitializeForAlongStep(const G4Track &)
G4double GetProposedKineticEnergy() const
G4PhysicsTable * IonisationTable() const
void FillLambdaVector(G4PhysicsVector *, const G4MaterialCutsCouple *, G4bool startFromNull=true, G4EmTableType t=fRestricted)
G4ProcessManager * GetProcessManager() const
void FillSecondDerivatives()
G4PhysicsTable * BuildLambdaTable(G4EmTableType tType=fRestricted)
const G4String & GetPhysicsTableFileName(const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
static G4PhysicsTable * PreparePhysicsTable(G4PhysicsTable *physTable)
const G4String & GetParticleName() const
G4LossTableBuilder * GetTableBuilder()
void SetWeight(G4double aValue)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void SetCreatorModelIndex(G4int idx)
G4bool ExistPhysicsTable(const G4String &fileName) const
void Initialise(const G4ParticleDefinition &part, const G4String &procName, G4int verbose)
void SetHighEnergyLimit(G4double)
virtual G4double Dispersion(const G4Material *, const G4DynamicParticle *, G4double tmax, G4double length)=0
static G4RegionStore * GetInstance()
G4StepPoint * GetPreStepPoint() const
G4PhysicsTable * LambdaTable() const
void ProposeWeight(G4double finalWeight)
void SetSecondaryWeightByProcess(G4bool)
void SetInverseRangeTable(G4PhysicsTable *p)
void SetCrossSectionBiasingFactor(G4double f, G4bool flag=true)
G4ProcessVector * GetAtRestProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
G4double GetKineticEnergy() const
G4double SampleSubCutSecondaries(std::vector< G4Track * > &, const G4Step &, G4VEmModel *model, G4int matIdx)
G4GLOB_DLL std::ostream G4cout
void FillDEDXVector(G4PhysicsVector *, const G4MaterialCutsCouple *, G4EmTableType t=fRestricted)
G4PhysicsTable * DEDXTable() const
size_t GetTableSize() const
void SetParticleChange(G4VParticleChange *, G4VEmFluctuationModel *f=0)
const G4ThreeVector & GetPosition() const
const G4Element * GetCurrentElement() const
G4double GetStepLimit(G4int coupleIdx, G4double previousStep)
G4double currentInteractionLength
void SetProposedKineticEnergy(G4double proposedKinEnergy)
const G4ParticleDefinition * GetParticleDefinition() const
const XML_Char XML_Content * model
virtual ~G4VEnergyLossProcess()
const G4String & GetParticleType() const
void Register(G4VEnergyLossProcess *p)
G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &)
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *fluc=0, const G4Region *region=0)
G4double GetGlobalTime() const
G4PhysicsTable * DEDXTableForSubsec() const
G4double Energy(size_t index) const
G4double Value(G4double theEnergy, size_t &lastidx) const
const G4String & GetProcessName() const
G4double AlongStepGetPhysicalInteractionLength(const G4Track &, G4double previousStepSize, G4double currentMinimumStep, G4double ¤tSafety, G4GPILSelection *selection)
void AddSecondary(G4Track *aSecondary)
virtual G4double ChargeSquareRatio(const G4Track &)
const G4TouchableHandle & GetTouchableHandle() const
G4Material * GetMaterial() const
void RegisterExtraParticle(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p)
G4bool IsActive(G4double kinEnergy)
void DumpModelList(G4int verb)
const G4DataVector * Initialise(const G4ParticleDefinition *part, const G4ParticleDefinition *secPart, G4double minSubRange, G4int verb)
G4double ComputeSafety(const G4ThreeVector &pGlobalPoint, G4double maxRadius=DBL_MAX)
static G4TransportationManager * GetTransportationManager()
G4bool RetrievePhysicsTable(const G4ParticleDefinition *, const G4String &directory, G4bool ascii)
void SetMasterThread(G4bool val)
void PreparePhysicsTable(const G4ParticleDefinition &)
G4double G4Log(G4double x)
void ActivateSecondaryBiasing(const G4String ®ion, G4double factor, G4double energyLimit)
virtual G4double GetParticleCharge(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
static G4ProductionCutsTable * GetProductionCutsTable()
void SetLambdaTable(G4PhysicsTable *p)
static G4Positron * Positron()
G4int NumberOfModels() const
virtual void PrintInfo()=0
G4PhysicsTable * InverseRangeTable() const
void BuildPhysicsTable(const G4ParticleDefinition *aParticle)
G4double GetPDGMass() const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
static G4ParticleTable * GetParticleTable()
void StartTracking(G4Track *)
void InitialiseBaseMaterials(G4PhysicsTable *table)
void SetNumberOfSecondaries(G4int totSecondaries)
G4double GetLocalEnergyDeposit() const
G4double MeanFreePath(const G4Track &track)
G4StepPoint * GetPostStepPoint() const
void UpdateEmModel(const G4String &, G4double, G4double)
G4VParticleChange * pParticleChange
void SetEmModel(G4VEmModel *, G4int index=1)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4double ContinuousStepLimit(const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double ¤tSafety)
G4double GetSafety() const
void SetProposedCharge(G4double theCharge)
void PreparePhysicsTable(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p, G4bool theMaster)
void SetCSDARangeTable(G4PhysicsTable *pRange)
G4double GetDEDXDispersion(const G4MaterialCutsCouple *couple, const G4DynamicParticle *dp, G4double length)
void LocalPhysicsTables(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p)
static G4Electron * Electron()
G4double GetGlobalTime() const
void SetSecondaryRangeTable(G4PhysicsTable *p)
G4bool StorePhysicsTable(const G4String &filename, G4bool ascii=false)
G4TrackStatus GetTrackStatus() const
G4VAtomDeexcitation * AtomDeexcitation()
G4PhysicsTable * DEDXunRestrictedTable() const
G4double theInitialNumberOfInteractionLength
G4bool GetFlag(size_t i) const
static G4int Register(G4String &)
void ProposeTrackStatus(G4TrackStatus status)
void SetSubLambdaTable(G4PhysicsTable *p)
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition *, const G4Material *, G4double cut)
G4ProcessVector * GetAlongStepProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
G4Track * GetTrack() const
G4double GetPDGCharge() const
void ActivateSubCutoff(G4bool val, const G4Region *region=0)
void SetRangeTableForLoss(G4PhysicsTable *p)
static G4bool RetrievePhysicsTable(G4PhysicsTable *physTable, const G4String &fileName, G4bool ascii)
G4ProductionCuts * GetProductionCuts() const
G4int GetProcessSubType() const
G4PhysicsTable * BuildDEDXTable(G4EmTableType tType=fRestricted)
G4VEmModel * EmModel(G4int index=1) const
void SetVerboseLevel(G4int value)
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition *, const G4ParticleDefinition *)=0
const G4Material * GetMaterial() const
G4double CrossSectionPerVolume(G4double kineticEnergy, const G4MaterialCutsCouple *couple)
const std::vector< G4int > * GetCoupleIndexes()
const G4Element * GetCurrentElement() const
G4bool IsIonisationProcess() const