89 {
"DEDX",
"Ionisation",
"DEDXnr",
"CSDARange",
"Lambda",
"Range",
"InverseRange"};
101 lowestKinEnergy = theParameters->LowestElectronEnergy();
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;
125 lManager->Register(
this);
126 isMaster = lManager->IsMaster();
133 scTracks.reserve(10);
134 secParticles.reserve(12);
135 emModels =
new std::vector<G4VEmModel*>;
143 delete theEnergyOfCrossSectionMax;
144 if(
nullptr != fXSpeaks) {
145 for(
auto const & v : *fXSpeaks) {
delete v; }
153 lManager->DeRegister(
this);
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 ) {
210 if(!isIon) { lManager->RegisterExtraParticle(&part,
this); }
212 G4cout <<
"### G4VEnergyLossProcess::PreparePhysicsTable()"
215 <<
" spline=" << spline <<
G4endl;
220 tablesAreBuilt =
false;
224 lManager->PreparePhysicsTable(&part,
this);
230 lossFluctuationFlag = theParameters->LossFluctuation();
231 useCutAsFinalRange = theParameters->UseCutAsFinalRange();
232 if(!actMinKinEnergy) { minKinEnergy = theParameters->MinKinEnergy(); }
233 if(!actMaxKinEnergy) { maxKinEnergy = theParameters->MaxKinEnergy(); }
234 if(!actBinning) { nBins = theParameters->NumberOfBins(); }
235 maxKinEnergyCSDA = theParameters->MaxEnergyForCSDARange();
236 nBinsCSDA = theParameters->NumberOfBinsPerDecade()
237 *
G4lrint(std::log10(maxKinEnergyCSDA/minKinEnergy));
238 if(!actLinLossLimit) { linLossLimit = theParameters->LinearLossLimit(); }
239 lambdaFactor = theParameters->LambdaFactor();
240 invLambdaFactor = 1.0/lambdaFactor;
246 theParameters->DefineRegParamForLoss(
this);
250 G4double initialCharge = particle->GetPDGCharge();
251 G4double initialMass = particle->GetPDGMass();
253 theParameters->FillStepFunction(particle,
this);
256 if (
nullptr != baseParticle) {
257 massRatio = (baseParticle->GetPDGMass())/initialMass;
258 logMassRatio =
G4Log(massRatio);
259 G4double q = initialCharge/baseParticle->GetPDGCharge();
261 if(chargeSqRatio > 0.0) { reduceFactor = 1.0/(chargeSqRatio*massRatio); }
263 lowestKinEnergy = (initialMass < CLHEP::MeV)
264 ? theParameters->LowestElectronEnergy()
265 : theParameters->LowestMuHadEnergy();
268 if (isMaster &&
nullptr == baseParticle) {
269 if (
nullptr == theData) { theData =
new G4EmDataHandler(7, particle->GetParticleName()); }
271 if (isIonisation && theDEDXTable != theIonisationTable) {
272 theData->CleanTable(0);
273 theDEDXTable = theIonisationTable;
274 theIonisationTable =
nullptr;
276 theDEDXTable = theData->MakeTable(theDEDXTable, 0);
278 theData->MakeTable(theIonisationTable, 1);
280 if (theParameters->BuildCSDARange()) {
281 theDEDXunRestrictedTable = theData->MakeTable(theDEDXunRestrictedTable, 2);
282 if(isIonisation) { theCSDARangeTable = theData->MakeTable(theCSDARangeTable, 3); }
285 theLambdaTable = theData->MakeTable(theLambdaTable, 4);
287 theRangeTableForLoss = theData->MakeTable(theRangeTableForLoss, 5);
288 theInverseRangeTable = theData->MakeTable(theInverseRangeTable, 6);
293 if(
nullptr != biasManager) {
298 numberOfModels = modelManager->NumberOfModels();
299 currentModel = modelManager->GetModel(0);
301 numberOfModels, secID, biasID,
302 mainSecondaries, baseMat, isMaster,
303 theParameters->UseAngularGeneratorForIonisation());
304 theCuts = modelManager->Initialise(particle, secondaryParticle,
308 subcutProducer = lManager->SubCutProducer();
312 G4cout <<
"G4VEnergyLossProcess::PrepearPhysicsTable() is done "
313 <<
" for " <<
GetProcessName() <<
" and " << particle->GetParticleName()
314 <<
" isIon= " << isIon <<
" spline=" << spline;
316 G4cout <<
"; base: " << baseParticle->GetParticleName();
319 G4cout <<
" chargeSqRatio= " << chargeSqRatio
320 <<
" massRatio= " << massRatio
321 <<
" reduceFactor= " << reduceFactor <<
G4endl;
322 if (nSCoffRegions > 0) {
323 G4cout <<
" SubCut secondary production is ON for regions: " <<
G4endl;
324 for (
G4int i=0; i<nSCoffRegions; ++i) {
325 const G4Region* r = (*scoffRegions)[i];
328 }
else if(
nullptr != subcutProducer) {
329 G4cout <<
" SubCut secondary production is ON for all regions" <<
G4endl;
339 G4cout <<
"### G4VEnergyLossProcess::BuildPhysicsTable() for "
342 <<
"; the first particle " << particle->GetParticleName();
344 G4cout <<
"; base: " << baseParticle->GetParticleName();
347 G4cout <<
" TablesAreBuilt= " << tablesAreBuilt <<
" isIon= " << isIon
348 <<
" spline=" << spline <<
" ptr: " <<
this <<
G4endl;
351 if(&part == particle) {
353 lManager->BuildPhysicsTable(particle,
this);
356 const auto masterProcess =
359 numberOfModels = modelManager->NumberOfModels();
361 particle, numberOfModels);
362 tablesAreBuilt =
true;
363 baseMat = masterProcess->UseBaseMaterial();
364 lManager->LocalPhysicsTables(particle,
this);
368 safetyHelper->InitialiseHelper();
373 atomDeexcitation = lManager->AtomDeexcitation();
374 if(
nullptr != atomDeexcitation) {
375 if(atomDeexcitation->IsPIXEActive()) { useDeexcitation =
true; }
380 if(theParameters->IsPrintLocked()) {
return; }
386 num ==
"e+" || num ==
"mu+" ||
387 num ==
"mu-" || num ==
"proton"||
388 num ==
"pi+" || num ==
"pi-" ||
389 num ==
"kaon+" || num ==
"kaon-" ||
390 num ==
"alpha" || num ==
"anti_proton" ||
391 num ==
"GenericIon"|| num ==
"alpha+" ))) {
395 G4cout <<
"### G4VEnergyLossProcess::BuildPhysicsTable() done for "
398 if(isIonisation) {
G4cout <<
" isIonisation flag=1"; }
412 emax = maxKinEnergyCSDA;
414 table = theDEDXunRestrictedTable;
416 table = theDEDXTable;
418 G4cout <<
"G4VEnergyLossProcess::BuildDEDXTable WARNING: wrong type "
422 G4cout <<
"G4VEnergyLossProcess::BuildDEDXTable() of type " << tType
424 <<
" and " << particle->GetParticleName()
425 <<
"spline=" << spline <<
G4endl;
427 if(
nullptr == table) {
return table; }
431 table, minKinEnergy, emax, bin,
440 if(
nullptr == theLambdaTable) {
return theLambdaTable; }
442 G4double scale = theParameters->MaxKinEnergy()/theParameters->MinKinEnergy();
444 theParameters->NumberOfBinsPerDecade()*
G4lrint(std::log10(scale));
445 scale = nbin/
G4Log(scale);
449 bld, theLambdaTable, theCuts,
450 minKinEnergy, maxKinEnergy, scale,
452 return theLambdaTable;
457void G4VEnergyLossProcess::StreamInfo(std::ostream& out,
461 out << std::setprecision(6);
464 out <<
" XStype:" << fXSType
466 <<
" dE/dx and range tables from "
468 <<
" to " <<
G4BestUnit(maxKinEnergy,
"Energy")
469 <<
" in " << nBins <<
" bins" <<
G4endl
470 <<
" Lambda tables from threshold to "
473 <<
" bins/decade, spline: " << spline
475 if(
nullptr != theRangeTableForLoss && isIonisation) {
476 out <<
" StepFunction=(" << dRoverRange <<
", "
477 << finalRange/mm <<
" mm)"
478 <<
", integ: " << fXSType
479 <<
", fluct: " << lossFluctuationFlag
480 <<
", linLossLim= " << linLossLimit
485 if(
nullptr != theCSDARangeTable && isIonisation) {
486 out <<
" CSDA range table up"
487 <<
" to " <<
G4BestUnit(maxKinEnergyCSDA,
"Energy")
488 <<
" in " << nBinsCSDA <<
" bins" <<
G4endl;
490 if(nSCoffRegions>0 && isIonisation) {
491 out <<
" Subcutoff sampling in " << nSCoffRegions
495 for(std::size_t i=0; i<7; ++i) {
496 auto ta = theData->Table(i);
497 out <<
" " << tnames[i] <<
" address: " << ta <<
G4endl;
498 if(
nullptr != ta) { out << *ta <<
G4endl; }
507 if(
nullptr == scoffRegions) {
508 scoffRegions =
new std::vector<const G4Region*>;
511 if(!scoffRegions->empty()) {
512 for (
auto & reg : *scoffRegions) {
513 if (reg == r) {
return; }
517 scoffRegions->push_back(r);
523G4bool G4VEnergyLossProcess::IsRegionForCubcutProcessor(
const G4Track& aTrack)
525 if(0 == nSCoffRegions) {
return true; }
527 for(
auto & reg : *scoffRegions) {
528 if(r == reg) {
return true; }
546 massRatio = (
nullptr == baseParticle) ? CLHEP::proton_mass_c2/newmass
547 : baseParticle->GetPDGMass()/newmass;
548 logMassRatio =
G4Log(massRatio);
551 if(
nullptr != biasManager) {
554 biasManager->ResetForcedInteraction();
566 *selection = aGPILSelection;
569 x = (useCutAsFinalRange) ? std::min(finalRange,
570 currentCouple->GetProductionCuts()->GetProductionCut(1)) : finalRange;
571 x = (fRange > x) ? fRange*dRoverRange + x*(1.0 - dRoverRange)*(2.0 - x/fRange)
609 const G4double q2 = currentModel->ChargeSquareRatio(track);
610 fFactor = q2*biasFactor;
612 reduceFactor = 1.0/(fFactor*massRatio);
613 if (lossFluctuationFlag) {
614 auto fluc = currentModel->GetModelOfFluctuations();
658 G4cout <<
"G4VEnergyLossProcess::PostStepGetPhysicalInteractionLength ";
666 <<
"InteractionLength= " << x/cm <<
"[cm] " <<
G4endl;
675G4VEnergyLossProcess::ComputeLambdaForScaledEnergy(
G4double e,
const G4Track& track)
680 preStepLambda = GetLambdaForScaledEnergy(e, LogScaledEkin(track));
686 const G4double epeak = (*theEnergyOfCrossSectionMax)[basedCoupleIndex];
689 preStepLambda = GetLambdaForScaledEnergy(e, LogScaledEkin(track));
693 const G4double e1 = std::max(epeak, e*lambdaFactor);
700 G4TwoPeaksXS* xs = (*fXSpeaks)[basedCoupleIndex];
706 preStepLambda = GetLambdaForScaledEnergy(e, LogScaledEkin(track));
715 const G4double e1 = std::max(e1peak, e*lambdaFactor);
726 preStepLambda = GetLambdaForScaledEnergy(e, LogScaledEkin(track));
734 const G4double e1 = std::max(e2peak, e*lambdaFactor);
745 preStepLambda = GetLambdaForScaledEnergy(e, LogScaledEkin(track));
751 const G4double e1 = std::max(e3peak, e*lambdaFactor);
757 preStepLambda = GetLambdaForScaledEnergy(e, LogScaledEkin(track));
792 weight /= biasFactor;
799 if (useDeexcitation) {
800 atomDeexcitation->AlongStepDeexcitation(scTracks, step,
802 if (!scTracks.empty()) { FillSecondariesAlongStep(weight); }
803 eloss = std::max(eloss, 0.0);
814 LogScaledEkin(track));
826 const G4double x = (fRange - length)/reduceFactor;
828 if(de > 0.0) { eloss = de; }
860 eloss = std::max(eloss, 0.0);
868 const G4double tmax = currentModel->MaxSecondaryKinEnergy(dynParticle);
869 const G4double tcut = std::min(cut, tmax);
872 tcut, tmax, length, eloss);
883 if (useDeexcitation) {
886 atomDeexcitation->AlongStepDeexcitation(scTracks, step,
893 if(eloss >= esecfluo) {
901 if(
nullptr != subcutProducer && IsRegionForCubcutProcessor(track)) {
902 subcutProducer->SampleSecondaries(step, scTracks, eloss, cut);
905 if(!scTracks.empty()) { FillSecondariesAlongStep(weight); }
909 if (finalT <= lowestKinEnergy) {
917 eloss = std::max(eloss, 0.0);
938void G4VEnergyLossProcess::FillSecondariesAlongStep(
G4double wt)
940 const std::size_t n0 = scTracks.size();
951 const std::size_t
n = scTracks.size();
954 for(std::size_t i=0; i<
n; ++i) {
955 G4Track* t = scTracks[i];
963 }
else if (pdg == 11) {
988 const G4double postStepScaledEnergy = finalT*massRatio;
991 if(!currentModel->IsActive(postStepScaledEnergy)) {
1010 G4double lx = GetLambdaForScaledEnergy(postStepScaledEnergy,
1011 logFinalT + logMassRatio);
1012 lx = std::max(lx, 0.0);
1023 weight /= biasFactor;
1030 secParticles.clear();
1031 currentModel->SampleSecondaries(&secParticles,
currentCouple, dp, tcut);
1033 const G4int num0 = (
G4int)secParticles.size();
1039 weight *= biasManager->ApplySecondaryBiasing(
1041 track, currentModel,
1053 const G4int num = (
G4int)secParticles.size();
1060 if(num0 > mainSecondaries) {
1061 currentModel->FillNumberOfSecondaries(n1, n2);
1064 for (
G4int i=0; i<num; ++i) {
1065 if(
nullptr != secParticles[i]) {
1069 t->
SetWeight(weight * biasManager->GetWeight(i));
1075 }
else if(i < num0 + n1) {
1091 if(particle->GetProcessManager()->GetAtRestProcessVector()->size() > 0)
1116 if (!isMaster ||
nullptr != baseParticle || part != particle )
return true;
1117 for(std::size_t i=0; i<7; ++i) {
1119 if (
nullptr == theData->Table(i) || (!isIonisation && 1 == i)) {
1123 G4cout <<
"G4VEnergyLossProcess::StorePhysicsTable i=" << i
1124 <<
" " << particle->GetParticleName()
1126 <<
" " << tnames[i] <<
" " << theData->Table(i) <<
G4endl;
1142 if (!isMaster ||
nullptr != baseParticle || part != particle )
return true;
1143 for(std::size_t i=0; i<7; ++i) {
1145 if (!isIonisation && 1 == i) {
continue; }
1161 DefineMaterial(couple);
1164 G4double tmax = currentModel->MaxSecondaryKinEnergy(dp);
1180 DefineMaterial(couple);
1182 if (
nullptr != theLambdaTable) {
1183 cross = GetLambdaForScaledEnergy(kineticEnergy * massRatio,
1184 logKineticEnergy + logMassRatio);
1187 cross = (!baseMat) ? biasFactor : biasFactor*(*theDensityFactor)[
currentCoupleIndex];
1188 cross *= (currentModel->CrossSectionPerVolume(
currentMaterial, particle, kineticEnergy,
1191 return std::max(cross, 0.0);
1201 const G4double cs = GetLambdaForScaledEnergy(kinEnergy * massRatio,
1202 logKinEnergy + logMassRatio);
1203 return (0.0 < cs) ? 1.0/cs :
DBL_MAX;
1242 DefineMaterial(couple);
1253 G4cout <<
"### Set DEDX table " << p <<
" " << theDEDXTable
1254 <<
" " << theDEDXunRestrictedTable <<
" " << theIonisationTable
1255 <<
" for " << particle->GetParticleName()
1257 <<
" type=" << tType <<
" isIonisation:" << isIonisation <<
G4endl;
1260 theDEDXunRestrictedTable = p;
1263 if(isMaster &&
nullptr == baseParticle) {
1264 theData->UpdateTable(theDEDXTable, 0);
1267 theIonisationTable = p;
1268 if(isMaster &&
nullptr == baseParticle) {
1269 theData->UpdateTable(theIonisationTable, 1);
1278 theCSDARangeTable = p;
1285 theRangeTableForLoss = p;
1292 theInverseRangeTable = p;
1300 G4cout <<
"### Set Lambda table " << p <<
" " << theLambdaTable
1301 <<
" for " << particle->GetParticleName()
1305 tablesAreBuilt =
true;
1307 if(isMaster &&
nullptr != p) {
1308 delete theEnergyOfCrossSectionMax;
1309 theEnergyOfCrossSectionMax =
nullptr;
1311 if(
nullptr != fXSpeaks) {
1312 for(
auto & ptr : *fXSpeaks) {
delete ptr; }
1317 if(
nullptr == fXSpeaks) { fXSType =
fEmOnePeak; }
1321 if(
nullptr == theEnergyOfCrossSectionMax) { fXSType =
fEmIncreasing; }
1330 theEnergyOfCrossSectionMax = p;
1344 return (
nullptr != currentModel)
1357 G4cout <<
"### SetCrossSectionBiasingFactor: for "
1359 <<
" biasFactor= " << f <<
" weightFlag= " << flag
1373 G4cout <<
"### ActivateForcedInteraction: for "
1375 <<
" length(mm)= " << length/mm
1376 <<
" in G4Region <" << region
1377 <<
"> weightFlag= " << flag
1381 biasManager->ActivateForcedInteraction(length, region);
1391 if (0.0 <= factor) {
1397 biasManager->ActivateSecondaryBiasing(region, factor, energyLimit);
1399 G4cout <<
"### ActivateSecondaryBiasing: for "
1401 <<
" factor= " << factor
1402 <<
" in G4Region <" << region
1403 <<
"> energyLimit(MeV)= " << energyLimit/MeV
1421 G4cout <<
"### G4VEnergyLossProcess::SetLossFluctuations has no effect and "
1422 <<
"will be removed for the next major release" <<
G4endl;
1429 if(0.0 < val && val < 1.0) {
1431 actLinLossLimit =
true;
1432 }
else { PrintWarning(
"SetLinearLossLimit", val); }
1439 if(0.0 < v1 && 1.0 >= v1 && 0.0 < v2) {
1440 dRoverRange = std::min(1.0, v1);
1441 finalRange = std::min(v2, 1.e+50);
1443 PrintWarning(
"SetStepFunctionV1", v1);
1444 PrintWarning(
"SetStepFunctionV2", v2);
1452 if(1.e-18 < val && val < 1.e+50) { lowestKinEnergy = val; }
1453 else { PrintWarning(
"SetLowestEnergyLimit", val); }
1460 if(2 < n && n < 1000000000) {
1465 PrintWarning(
"SetDEDXBinning", e);
1473 if(1.e-18 < e && e < maxKinEnergy) {
1475 actMinKinEnergy =
true;
1476 }
else { PrintWarning(
"SetMinKinEnergy", e); }
1483 if(minKinEnergy < e && e < 1.e+50) {
1485 actMaxKinEnergy =
true;
1486 if(e < maxKinEnergyCSDA) { maxKinEnergyCSDA = e; }
1487 }
else { PrintWarning(
"SetMaxKinEnergy", e); }
1492void G4VEnergyLossProcess::PrintWarning(
const G4String& tit,
G4double val)
const
1494 G4String ss =
"G4VEnergyLossProcess::" + tit;
1496 ed <<
"Parameter is out of range: " << val
1497 <<
" it will have no effect!\n" <<
" Process "
1499 <<
" Emin(keV)= " << minKinEnergy/keV
1500 <<
" Emax(GeV)= " << maxKinEnergy/GeV;
1508 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()
G4double ApplySecondaryBiasing(std::vector< G4DynamicParticle * > &, const G4Track &track, G4VEmModel *currentModel, G4ParticleChangeForGamma *pParticleChange, G4double &eloss, G4int coupleIdx, G4double tcut, G4double safety=0.0)
G4bool SecondaryBiasingRegion(G4int coupleIdx)
static G4EmParameters * Instance()
G4int NumberOfBinsPerDecade() 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
static G4bool GetBaseMaterialFlag()
static const std::vector< G4double > * GetDensityFactors()
static const std::vector< G4bool > * GetFluctuationFlags()
void InitialiseBaseMaterials(const G4PhysicsTable *table=nullptr)
static const std::vector< G4int > * GetCoupleIndexes()
static G4LossTableManager * Instance()
const G4String & GetName() const
G4double GetPDGMass() const
G4int GetPDGEncoding() const
const G4String & GetParticleName() const
G4Region defines a region or a group of regions in the detector geometry setup, sharing properties as...
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
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
G4VContinuousDiscreteProcess(const G4String &, G4ProcessType aType=fNotDefined)
virtual G4double Dispersion(const G4Material *, const G4DynamicParticle *, const G4double tcut, const G4double tmax, const G4double length)=0
virtual G4double SampleFluctuations(const G4MaterialCutsCouple *, const G4DynamicParticle *, const G4double tcut, const G4double tmax, const G4double length, const G4double meanLoss)=0
void SetParticleChange(G4VParticleChange *, G4VEmFluctuationModel *f=nullptr)
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
void SetLossFluctuations(G4bool)
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)
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