89 {
"DEDX",
"Ionisation",
"DEDXnr",
"CSDARange",
"Lambda",
"Range",
"InverseRange"};
104 minKinEnergy = 0.1*CLHEP::keV;
105 maxKinEnergy = 100.0*CLHEP::TeV;
106 maxKinEnergyCSDA = 1.0*CLHEP::GeV;
110 invLambdaFactor = 1.0/lambdaFactor;
113 finalRange = 1.*CLHEP::mm;
132 scTracks.reserve(10);
133 secParticles.reserve(12);
134 emModels =
new std::vector<G4VEmModel*>;
142 if(
nullptr == baseParticle) {
delete theData; }
143 delete theEnergyOfCrossSectionMax;
144 if(
nullptr != fXSpeaks) {
145 for(
auto const & v : *fXSpeaks) {
delete v; }
171 if(
nullptr == ptr) {
return; }
173 modelManager->
AddEmModel(order, ptr, afluc, region);
181 if(
nullptr == ptr) {
return; }
182 if(!emModels->empty()) {
183 for(
auto & em : *emModels) {
if(em == ptr) {
return; } }
185 emModels->push_back(ptr);
193 massRatio = massratio;
194 logMassRatio =
G4Log(massRatio);
195 fFactor = charge2ratio*biasFactor;
197 chargeSqRatio = charge2ratio;
198 reduceFactor = 1.0/(fFactor*massRatio);
209 if( particle != &part ) {
212 G4cout <<
"### G4VEnergyLossProcess::PreparePhysicsTable()"
215 <<
" spline=" << spline <<
G4endl;
220 tablesAreBuilt =
false;
229 if(!actLossFluc) { lossFluctuationFlag = theParameters->
LossFluctuation(); }
231 if(!actMinKinEnergy) { minKinEnergy = theParameters->
MinKinEnergy(); }
232 if(!actMaxKinEnergy) { maxKinEnergy = theParameters->
MaxKinEnergy(); }
233 if(!actBinning) { nBins = theParameters->
NumberOfBins(); }
236 *
G4lrint(std::log10(maxKinEnergyCSDA/minKinEnergy));
237 if(!actLinLossLimit) { linLossLimit = theParameters->
LinearLossLimit(); }
239 invLambdaFactor = 1.0/lambdaFactor;
255 if (
nullptr != baseParticle) {
256 massRatio = (baseParticle->
GetPDGMass())/initialMass;
257 logMassRatio =
G4Log(massRatio);
260 if(chargeSqRatio > 0.0) { reduceFactor = 1.0/(chargeSqRatio*massRatio); }
262 lowestKinEnergy = (initialMass < CLHEP::MeV)
267 if (isMaster &&
nullptr == baseParticle) {
270 if(
nullptr != theDEDXTable && isIonisation) {
271 if(
nullptr != theIonisationTable && theDEDXTable != theIonisationTable) {
273 theDEDXTable = theIonisationTable;
274 theIonisationTable =
nullptr;
278 theDEDXTable = theData->
MakeTable(theDEDXTable, 0);
283 theDEDXunRestrictedTable = theData->
MakeTable(2);
284 if(isIonisation) { theCSDARangeTable = theData->
MakeTable(3); }
289 theRangeTableForLoss = theData->
MakeTable(5);
290 theInverseRangeTable = theData->
MakeTable(6);
295 if(
nullptr != biasManager) {
301 currentModel = modelManager->
GetModel(0);
303 numberOfModels, secID, biasID,
304 mainSecondaries, baseMat, isMaster,
306 theCuts = modelManager->
Initialise(particle, secondaryParticle,
312 if(1 == nSCoffRegions) {
313 if((*scoffRegions)[0]->GetName() ==
"DefaultRegionForTheWorld") {
315 scoffRegions =
nullptr;
321 G4cout <<
"G4VEnergyLossProcess::PrepearPhysicsTable() is done "
323 <<
" isIon= " << isIon <<
" spline=" << spline;
328 G4cout <<
" chargeSqRatio= " << chargeSqRatio
329 <<
" massRatio= " << massRatio
330 <<
" reduceFactor= " << reduceFactor <<
G4endl;
331 if (nSCoffRegions > 0) {
332 G4cout <<
" SubCut secondary production is ON for regions: " <<
G4endl;
333 for (
G4int i=0; i<nSCoffRegions; ++i) {
334 const G4Region* r = (*scoffRegions)[i];
337 }
else if(
nullptr != subcutProducer) {
338 G4cout <<
" SubCut secondary production is ON for all regions" <<
G4endl;
348 G4cout <<
"### G4VEnergyLossProcess::BuildPhysicsTable() for "
356 G4cout <<
" TablesAreBuilt= " << tablesAreBuilt <<
" isIon= " << isIon
357 <<
" spline=" << spline <<
" ptr: " <<
this <<
G4endl;
360 if(&part == particle) {
365 const auto masterProcess =
370 particle, numberOfModels);
371 tablesAreBuilt =
true;
372 baseMat = masterProcess->UseBaseMaterial();
383 if(
nullptr != atomDeexcitation) {
384 if(atomDeexcitation->
IsPIXEActive()) { useDeexcitation =
true; }
395 num ==
"e+" || num ==
"mu+" ||
396 num ==
"mu-" || num ==
"proton"||
397 num ==
"pi+" || num ==
"pi-" ||
398 num ==
"kaon+" || num ==
"kaon-" ||
399 num ==
"alpha" || num ==
"anti_proton" ||
400 num ==
"GenericIon"|| num ==
"alpha+" ))) {
404 G4cout <<
"### G4VEnergyLossProcess::BuildPhysicsTable() done for "
407 if(isIonisation) {
G4cout <<
" isIonisation flag=1"; }
421 emax = maxKinEnergyCSDA;
423 table = theDEDXunRestrictedTable;
425 table = theDEDXTable;
427 G4cout <<
"G4VEnergyLossProcess::BuildDEDXTable WARNING: wrong type "
431 G4cout <<
"G4VEnergyLossProcess::BuildDEDXTable() of type " << tType
434 <<
"spline=" << spline <<
G4endl;
436 if(
nullptr == table) {
return table; }
440 table, minKinEnergy, emax, bin,
449 if(
nullptr == theLambdaTable) {
return theLambdaTable; }
454 scale = nbin/
G4Log(scale);
458 bld, theLambdaTable, theCuts,
459 minKinEnergy, maxKinEnergy, scale,
461 return theLambdaTable;
466void G4VEnergyLossProcess::StreamInfo(std::ostream& out,
470 out << std::setprecision(6);
473 out <<
" XStype:" << fXSType
475 <<
" dE/dx and range tables from "
477 <<
" to " <<
G4BestUnit(maxKinEnergy,
"Energy")
478 <<
" in " << nBins <<
" bins" <<
G4endl
479 <<
" Lambda tables from threshold to "
482 <<
" bins/decade, spline: " << spline
484 if(
nullptr != theRangeTableForLoss && isIonisation) {
485 out <<
" StepFunction=(" << dRoverRange <<
", "
486 << finalRange/mm <<
" mm)"
487 <<
", integ: " << fXSType
488 <<
", fluct: " << lossFluctuationFlag
489 <<
", linLossLim= " << linLossLimit
494 if(
nullptr != theCSDARangeTable && isIonisation) {
495 out <<
" CSDA range table up"
496 <<
" to " <<
G4BestUnit(maxKinEnergyCSDA,
"Energy")
497 <<
" in " << nBinsCSDA <<
" bins" <<
G4endl;
499 if(nSCoffRegions>0 && isIonisation) {
500 out <<
" Subcutoff sampling in " << nSCoffRegions
504 for(std::size_t i=0; i<7; ++i) {
505 auto ta = theData->
Table(i);
506 out <<
" " << tnames[i] <<
" address: " << ta <<
G4endl;
507 if(
nullptr != ta) { out << *ta <<
G4endl; }
516 if(
nullptr == scoffRegions) {
517 scoffRegions =
new std::vector<const G4Region*>;
520 if(!scoffRegions->empty()) {
521 for (
auto & reg : *scoffRegions) {
522 if (reg == r) {
return; }
526 scoffRegions->push_back(r);
532G4bool G4VEnergyLossProcess::IsRegionForCubcutProcessor(
const G4Track& aTrack)
534 if(0 == nSCoffRegions) {
return true; }
536 for(
auto & reg : *scoffRegions) {
537 if(r == reg) {
return true; }
555 massRatio = (
nullptr == baseParticle) ? CLHEP::proton_mass_c2/newmass
557 logMassRatio =
G4Log(massRatio);
560 if(
nullptr != biasManager) {
575 *selection = aGPILSelection;
578 x = (useCutAsFinalRange) ? std::min(finalRange,
580 x = (fRange > x) ? fRange*dRoverRange + x*(1.0 - dRoverRange)*(2.0 - x/fRange)
619 fFactor = q2*biasFactor;
621 reduceFactor = 1.0/(fFactor*massRatio);
622 if (lossFluctuationFlag) {
667 G4cout <<
"G4VEnergyLossProcess::PostStepGetPhysicalInteractionLength ";
675 <<
"InteractionLength= " << x/cm <<
"[cm] " <<
G4endl;
684G4VEnergyLossProcess::ComputeLambdaForScaledEnergy(
G4double e,
const G4Track& track)
689 preStepLambda = GetLambdaForScaledEnergy(e, LogScaledEkin(track));
695 const G4double epeak = (*theEnergyOfCrossSectionMax)[basedCoupleIndex];
698 preStepLambda = GetLambdaForScaledEnergy(e, LogScaledEkin(track));
702 const G4double e1 = std::max(epeak, e*lambdaFactor);
715 preStepLambda = GetLambdaForScaledEnergy(e, LogScaledEkin(track));
724 const G4double e1 = std::max(e1peak, e*lambdaFactor);
735 preStepLambda = GetLambdaForScaledEnergy(e, LogScaledEkin(track));
743 const G4double e1 = std::max(e2peak, e*lambdaFactor);
754 preStepLambda = GetLambdaForScaledEnergy(e, LogScaledEkin(track));
760 const G4double e1 = std::max(e3peak, e*lambdaFactor);
766 preStepLambda = GetLambdaForScaledEnergy(e, LogScaledEkin(track));
801 weight /= biasFactor;
808 if (useDeexcitation) {
811 if(scTracks.size() > 0) { FillSecondariesAlongStep(weight); }
812 eloss = std::max(eloss, 0.0);
823 LogScaledEkin(track));
835 const G4double x = (fRange - length)/reduceFactor;
837 if(de > 0.0) { eloss = de; }
866 eloss = std::max(eloss, 0.0);
873 }
else if (lossFluctuationFlag) {
875 const G4double tcut = std::min(cut, tmax);
878 tcut, tmax, length, eloss);
889 if (useDeexcitation) {
899 if(eloss >= esecfluo) {
907 if(
nullptr != subcutProducer && IsRegionForCubcutProcessor(track)) {
911 if(!scTracks.empty()) { FillSecondariesAlongStep(weight); }
915 if (finalT <= lowestKinEnergy) {
923 eloss = std::max(eloss, 0.0);
944void G4VEnergyLossProcess::FillSecondariesAlongStep(
G4double wt)
946 const std::size_t n0 = scTracks.size();
957 const std::size_t
n = scTracks.size();
960 for(std::size_t i=0; i<
n; ++i) {
983 const G4double postStepScaledEnergy = finalT*massRatio;
986 if(!currentModel->
IsActive(postStepScaledEnergy)) {
1005 G4double lx = GetLambdaForScaledEnergy(postStepScaledEnergy,
1006 logFinalT + logMassRatio);
1007 lx = std::max(lx, 0.0);
1018 weight /= biasFactor;
1025 secParticles.clear();
1028 const G4int num0 = (
G4int)secParticles.size();
1036 track, currentModel,
1048 const G4int num = (
G4int)secParticles.size();
1055 if(num0 > mainSecondaries) {
1059 for (
G4int i=0; i<num; ++i) {
1060 if(
nullptr != secParticles[i]) {
1070 }
else if(i < num0 + n1) {
1111 if (!isMaster ||
nullptr != baseParticle || part != particle )
return true;
1112 for(std::size_t i=0; i<7; ++i) {
1113 if(
nullptr != theData->
Table(i)) {
1115 G4cout <<
"G4VEnergyLossProcess::StorePhysicsTable i=" << i
1118 <<
" " << tnames[i] <<
" " << theData->
Table(i) <<
G4endl;
1135 if (!isMaster ||
nullptr != baseParticle || part != particle )
return true;
1136 for(std::size_t i=0; i<7; ++i) {
1152 DefineMaterial(couple);
1171 DefineMaterial(couple);
1173 if (
nullptr != theLambdaTable) {
1174 cross = GetLambdaForScaledEnergy(kineticEnergy * massRatio,
1175 logKineticEnergy + logMassRatio);
1178 cross = (!baseMat) ? biasFactor : biasFactor*(*theDensityFactor)[
currentCoupleIndex];
1182 return std::max(cross, 0.0);
1192 const G4double cs = GetLambdaForScaledEnergy(kinEnergy * massRatio,
1193 logKinEnergy + logMassRatio);
1194 return (0.0 < cs) ? 1.0/cs :
DBL_MAX;
1233 DefineMaterial(couple);
1244 G4cout <<
"### Set DEDX table " << p <<
" " << theDEDXTable
1245 <<
" " << theDEDXunRestrictedTable <<
" " << theIonisationTable
1248 <<
" type=" << tType <<
" isIonisation:" << isIonisation <<
G4endl;
1251 theDEDXunRestrictedTable = p;
1254 if(isMaster &&
nullptr == baseParticle) {
1258 theIonisationTable = p;
1259 if(isMaster &&
nullptr == baseParticle) {
1269 theCSDARangeTable = p;
1276 theRangeTableForLoss = p;
1283 theInverseRangeTable = p;
1291 G4cout <<
"### Set Lambda table " << p <<
" " << theLambdaTable
1296 tablesAreBuilt =
true;
1298 if(isMaster &&
nullptr != p) {
1299 delete theEnergyOfCrossSectionMax;
1300 theEnergyOfCrossSectionMax =
nullptr;
1302 if(
nullptr != fXSpeaks) {
1303 for(
auto & ptr : *fXSpeaks) {
delete ptr; }
1308 if(
nullptr == fXSpeaks) { fXSType =
fEmOnePeak; }
1312 if(
nullptr == theEnergyOfCrossSectionMax) { fXSType =
fEmIncreasing; }
1321 theEnergyOfCrossSectionMax = p;
1335 return (
nullptr != currentModel)
1348 G4cout <<
"### SetCrossSectionBiasingFactor: for "
1350 <<
" biasFactor= " << f <<
" weightFlag= " << flag
1364 G4cout <<
"### ActivateForcedInteraction: for "
1366 <<
" length(mm)= " << length/mm
1367 <<
" in G4Region <" << region
1368 <<
"> weightFlag= " << flag
1382 if (0.0 <= factor) {
1390 G4cout <<
"### ActivateSecondaryBiasing: for "
1392 <<
" factor= " << factor
1393 <<
" in G4Region <" << region
1394 <<
"> energyLimit(MeV)= " << energyLimit/MeV
1412 if(0.0 < val && val < 1.0) {
1414 actLinLossLimit =
true;
1415 }
else { PrintWarning(
"SetLinearLossLimit", val); }
1422 if(0.0 < v1 && 0.0 < v2) {
1423 dRoverRange = std::min(1.0, v1);
1424 finalRange = std::min(v2, 1.e+50);
1426 PrintWarning(
"SetStepFunctionV1", v1);
1427 PrintWarning(
"SetStepFunctionV2", v2);
1435 if(1.e-18 < val && val < 1.e+50) { lowestKinEnergy = val; }
1436 else { PrintWarning(
"SetLowestEnergyLimit", val); }
1443 if(2 < n && n < 1000000000) {
1448 PrintWarning(
"SetDEDXBinning", e);
1456 if(1.e-18 < e && e < maxKinEnergy) {
1458 actMinKinEnergy =
true;
1459 }
else { PrintWarning(
"SetMinKinEnergy", e); }
1466 if(minKinEnergy < e && e < 1.e+50) {
1468 actMaxKinEnergy =
true;
1469 if(e < maxKinEnergyCSDA) { maxKinEnergyCSDA = e; }
1470 }
else { PrintWarning(
"SetMaxKinEnergy", e); }
1475void G4VEnergyLossProcess::PrintWarning(
const G4String& tit,
G4double val)
const
1477 G4String ss =
"G4VEnergyLossProcess::" + tit;
1479 ed <<
"Parameter is out of range: " << val
1480 <<
" it will have no effect!\n" <<
" Process "
1482 <<
" Emin(keV)= " << minKinEnergy/keV
1483 <<
" Emax(GeV)= " << maxKinEnergy/GeV;
1491 if(
nullptr != 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 CleanTable(size_t idx)
G4PhysicsTable * MakeTable(size_t idx)
void UpdateTable(G4PhysicsTable *, size_t idx)
G4PhysicsTable * Table(size_t idx) const
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *fm, const G4Region *r)
const G4DataVector * Initialise(const G4ParticleDefinition *part, const G4ParticleDefinition *secPart, G4int verb)
void DumpModelList(std::ostream &out, G4int verb)
G4int NumberOfModels() const
G4VEmModel * GetModel(G4int idx, G4bool ver=false) const
G4bool IsPrintLocked() const
void DefineRegParamForLoss(G4VEnergyLossProcess *) const
void FillStepFunction(const G4ParticleDefinition *, G4VEnergyLossProcess *) const
static G4EmParameters * Instance()
G4int NumberOfBins() const
G4double MinKinEnergy() const
G4int NumberOfBinsPerDecade() const
G4bool BuildCSDARange() const
G4bool LossFluctuation() const
G4bool UseCutAsFinalRange() 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
static G4bool RetrieveTable(G4VProcess *ptr, const G4ParticleDefinition *part, G4PhysicsTable *aTable, const G4String &dir, const G4String &tname, const G4int verb, const G4bool ascii, const G4bool spline)
static void UpdateModels(G4VEnergyLossProcess *proc, G4EmModelManager *modelManager, const G4double maxKinEnergy, const G4int nModels, G4int &secID, G4int &biasID, G4int &mainSecondaries, const G4bool baseMat, const G4bool isMaster, const G4bool useAGen)
static void BuildLocalElossProcess(G4VEnergyLossProcess *proc, const G4VEnergyLossProcess *masterProc, const G4ParticleDefinition *part, const G4int nModels)
static G4bool StoreTable(G4VProcess *, const G4ParticleDefinition *, G4PhysicsTable *, const G4String &dir, const G4String &tname, G4int verb, G4bool ascii)
static void BuildDEDXTable(G4VEnergyLossProcess *proc, const G4ParticleDefinition *part, G4EmModelManager *modelManager, G4LossTableBuilder *bld, G4PhysicsTable *table, const G4double minKinEnergy, const G4double maxKinEnergy, const G4int nbins, const G4int verbose, const G4EmTableType tType, const G4bool splineFlag)
static const G4ParticleDefinition * CheckIon(G4VEnergyLossProcess *proc, const G4ParticleDefinition *part, const G4ParticleDefinition *particle, const G4int verboseLevel, G4bool &isIon)
static void BuildLambdaTable(G4VEmProcess *proc, const G4ParticleDefinition *part, G4EmModelManager *modelManager, G4LossTableBuilder *bld, G4PhysicsTable *theLambdaTable, G4PhysicsTable *theLambdaTablePrim, const G4double minKinEnergy, const G4double minKinEnergyPrim, const G4double maxKinEnergy, const G4double scale, const G4int verbose, const G4bool startFromNull, const G4bool splineFlag)
static std::vector< G4TwoPeaksXS * > * FillPeaksStructure(G4PhysicsTable *, G4LossTableBuilder *)
static std::vector< G4double > * FindCrossSectionMax(G4PhysicsTable *)
G4Region * GetRegion() const
G4bool GetBaseMaterialFlag()
const std::vector< G4double > * GetDensityFactors() const
const std::vector< G4int > * GetCoupleIndexes() const
void InitialiseBaseMaterials(const G4PhysicsTable *table=nullptr)
static G4LossTableManager * Instance()
void LocalPhysicsTables(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p)
G4LossTableBuilder * GetTableBuilder()
void BuildPhysicsTable(const G4ParticleDefinition *aParticle)
G4VSubCutProducer * SubCutProducer()
void DeRegister(G4VEnergyLossProcess *p)
void Register(G4VEnergyLossProcess *p)
G4VAtomDeexcitation * AtomDeexcitation()
void PreparePhysicsTable(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p)
void RegisterExtraParticle(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p)
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
G4double GetPDGMass() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
G4ProcessVector * GetAtRestProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
G4double GetProductionCut(G4int index) const
const G4String & GetName() const
G4double GetSafety() const
G4double GetStepLength() const
G4StepPoint * GetPostStepPoint() const
const G4ParticleDefinition * GetParticleDefinition() const
G4VPhysicalVolume * GetVolume() 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
void SetCreatorModelID(const G4int id)
G4int GetParentID() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
static G4TransportationManager * GetTransportationManager()
G4SafetyHelper * GetSafetyHelper() const
void AlongStepDeexcitation(std::vector< G4Track * > &tracks, const G4Step &step, G4double &eLoss, G4int coupleIndex)
G4bool IsPIXEActive() const
virtual G4double Dispersion(const G4Material *, const G4DynamicParticle *, const G4double tcut, const G4double tmax, const G4double length)=0
virtual void SetParticleAndCharge(const G4ParticleDefinition *, G4double q2)
virtual G4double SampleFluctuations(const G4MaterialCutsCouple *, const G4DynamicParticle *, const G4double tcut, const G4double tmax, const G4double length, const G4double meanLoss)=0
virtual void FillNumberOfSecondaries(G4int &numberOfTriplets, G4int &numberOfRecoil)
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)
void SetParticleChange(G4VParticleChange *, G4VEmFluctuationModel *f=nullptr)
G4bool IsActive(G4double kinEnergy) const
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple *, const G4DynamicParticle *, const G4double &length, G4double &eloss)
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double tmax=DBL_MAX)=0
const G4Element * GetCurrentElement(const G4Material *mat=nullptr) const
G4double MaxSecondaryKinEnergy(const G4DynamicParticle *dynParticle)
virtual G4double ChargeSquareRatio(const G4Track &)
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *fluc=nullptr, const G4Region *region=nullptr)
G4double GetContinuousStepLimit(const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double ¤tSafety) override
void SetMaxKinEnergy(G4double e)
G4ParticleChangeForLoss fParticleChange
void PreparePhysicsTable(const G4ParticleDefinition &) override
G4double MeanFreePath(const G4Track &track)
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition *, const G4ParticleDefinition *)=0
void SelectModel(G4double kinEnergy)
void SetRangeTableForLoss(G4PhysicsTable *p)
G4PhysicsVector * LambdaPhysicsVector(const G4MaterialCutsCouple *, G4double cut)
void ProcessDescription(std::ostream &outFile) const override
G4PhysicsTable * BuildDEDXTable(G4EmTableType tType=fRestricted)
void SetTwoPeaksXS(std::vector< G4TwoPeaksXS * > *)
const G4MaterialCutsCouple * currentCouple
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition *, const G4Material *, G4double cut)
G4double preStepScaledEnergy
void ActivateSecondaryBiasing(const G4String ®ion, G4double factor, G4double energyLimit)
G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
const G4Element * GetCurrentElement() const
void SetDEDXBinning(G4int nbins)
void SetStepFunction(G4double v1, G4double v2)
void SetEmModel(G4VEmModel *, G4int index=0)
void SetCrossSectionBiasingFactor(G4double f, G4bool flag=true)
const G4Material * currentMaterial
G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
G4double ContinuousStepLimit(const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double ¤tSafety)
void SetInverseRangeTable(G4PhysicsTable *p)
G4bool RetrievePhysicsTable(const G4ParticleDefinition *, const G4String &directory, G4bool ascii) override
void ActivateForcedInteraction(G4double length, const G4String ®ion, G4bool flag=true)
void SetDynamicMassCharge(G4double massratio, G4double charge2ratio)
void SetEnergyOfCrossSectionMax(std::vector< G4double > *)
G4double CrossSectionPerVolume(G4double kineticEnergy, const G4MaterialCutsCouple *couple)
void SetDEDXTable(G4PhysicsTable *p, G4EmTableType tType)
G4PhysicsTable * BuildLambdaTable(G4EmTableType tType=fRestricted)
G4bool StorePhysicsTable(const G4ParticleDefinition *, const G4String &directory, G4bool ascii=false) override
~G4VEnergyLossProcess() override
void SetIonisation(G4bool val)
G4double AlongStepGetPhysicalInteractionLength(const G4Track &, G4double previousStepSize, G4double currentMinimumStep, G4double ¤tSafety, G4GPILSelection *selection) override
void SetLinearLossLimit(G4double val)
void SetLowestEnergyLimit(G4double)
void SetLambdaTable(G4PhysicsTable *p)
void BuildPhysicsTable(const G4ParticleDefinition &) override
G4VEnergyLossProcess(const G4String &name="EnergyLoss", G4ProcessType type=fElectromagnetic)
G4double preStepKinEnergy
G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &) override
G4double GetDEDXDispersion(const G4MaterialCutsCouple *couple, const G4DynamicParticle *dp, G4double length)
void ActivateSubCutoff(const G4Region *region)
void SetCSDARangeTable(G4PhysicsTable *pRange)
std::size_t currentCoupleIndex
virtual void StreamProcessInfo(std::ostream &) const
G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &) override
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
G4LogicalVolume * GetLogicalVolume() const
G4double currentInteractionLength
G4double theInitialNumberOfInteractionLength
void SetVerboseLevel(G4int value)
const G4VProcess * GetMasterProcess() const
G4double theNumberOfInteractionLengthLeft
G4VParticleChange * pParticleChange
G4int GetProcessSubType() const
const G4String & GetProcessName() const
virtual void SampleSecondaries(const G4Step &step, std::vector< G4Track * > &tracks, G4double &eloss, G4double cut) const =0