44 fCurrentTrack ( nullptr ),
45 fPreviousStepSize (-1.0), fCurrentMinimumStep( -1.0 ), fProposedSafety ( -1.0),
46 fOccurenceBiasingOperation( nullptr ), fFinalStateBiasingOperation( nullptr ), fNonPhysicsBiasingOperation( nullptr ),
47 fPreviousOccurenceBiasingOperation( nullptr ), fPreviousFinalStateBiasingOperation( nullptr ), fPreviousNonPhysicsBiasingOperation( nullptr ),
48 fResetWrappedProcessInteractionLength( true ),
49 fWrappedProcess ( nullptr ),
50 fIsPhysicsBasedBiasing ( false ),
51 fWrappedProcessIsAtRest ( false ),
52 fWrappedProcessIsAlong ( false ),
53 fWrappedProcessIsPost ( false ),
54 fWrappedProcessPostStepGPIL ( -1.0 ),
55 fBiasingPostStepGPIL ( -1.0 ),
56 fWrappedProcessInteractionLength ( -1.0 ),
57 fWrappedProcessForceCondition (
NotForced ),
59 fWrappedProcessAlongStepGPIL ( -1.0 ),
60 fBiasingAlongStepGPIL ( -1.0 ),
63 fBiasingInteractionLaw ( nullptr ),
64 fPreviousBiasingInteractionLaw ( nullptr ),
65 fPhysicalInteractionLaw ( nullptr ),
66 fOccurenceBiasingParticleChange ( nullptr ),
67 fDummyParticleChange ( nullptr ),
68 fIamFirstGPIL ( false ),
69 fProcessManager ( nullptr ),
70 fSharedData ( nullptr )
72 for (
G4int i = 0 ; i < 8 ; i++) fFirstLastFlags[i] =
false;
73 fResetInteractionLaws.
Put(
true );
74 fCommonStart .
Put(
true );
75 fCommonEnd .
Put(
true );
76 fDoCommonConfigure .
Put(
true );
83 :
G4VProcess( useThisName !=
"" ? useThisName :
"biasWrapper("+wrappedProcess->GetProcessName()+
")",
84 wrappedProcess->GetProcessType()),
85 fCurrentTrack ( nullptr ),
86 fPreviousStepSize (-1.0), fCurrentMinimumStep( -1.0 ), fProposedSafety ( -1.0),
87 fOccurenceBiasingOperation( nullptr ), fFinalStateBiasingOperation( nullptr ), fNonPhysicsBiasingOperation( nullptr ),
88 fPreviousOccurenceBiasingOperation( nullptr ), fPreviousFinalStateBiasingOperation( nullptr ), fPreviousNonPhysicsBiasingOperation( nullptr ),
89 fResetWrappedProcessInteractionLength ( false ),
90 fWrappedProcess ( wrappedProcess ),
91 fIsPhysicsBasedBiasing ( true ),
92 fWrappedProcessIsAtRest ( wrappedIsAtRest ),
93 fWrappedProcessIsAlong ( wrappedIsAlongStep ),
94 fWrappedProcessIsPost ( wrappedIsPostStep ),
95 fWrappedProcessPostStepGPIL ( -1.0 ),
96 fBiasingPostStepGPIL ( -1.0 ),
97 fWrappedProcessInteractionLength ( -1.0 ),
98 fWrappedProcessForceCondition (
NotForced ),
100 fWrappedProcessAlongStepGPIL ( -1.0 ),
101 fBiasingAlongStepGPIL ( -1.0 ),
104 fBiasingInteractionLaw ( nullptr ),
105 fPreviousBiasingInteractionLaw ( nullptr ),
106 fPhysicalInteractionLaw ( nullptr ),
107 fOccurenceBiasingParticleChange ( nullptr ),
108 fIamFirstGPIL ( false ),
109 fProcessManager ( nullptr ),
110 fSharedData ( nullptr )
112 for (
G4int i = 0 ; i < 8 ; i++) fFirstLastFlags[i] =
false;
113 fResetInteractionLaws.
Put(
true );
114 fCommonStart.
Put(
true);
115 fCommonEnd.
Put(
true);
116 fDoCommonConfigure.
Put(
true);
132 if ( fPhysicalInteractionLaw != 0 )
delete fPhysicalInteractionLaw;
133 if ( fOccurenceBiasingParticleChange )
delete fOccurenceBiasingParticleChange;
134 if ( fDummyParticleChange )
delete fDummyParticleChange;
142 if ( itr != G4BiasingProcessSharedData::fSharedDataMap.End( ) )
144 return (*itr).second;
152 fCurrentTrack = track;
153 if ( fIsPhysicsBasedBiasing ) fWrappedProcess->
StartTracking(fCurrentTrack);
154 fOccurenceBiasingOperation = 0;
155 fPreviousOccurenceBiasingOperation = 0;
156 fFinalStateBiasingOperation = 0;
157 fPreviousFinalStateBiasingOperation = 0;
158 fNonPhysicsBiasingOperation = 0;
159 fPreviousNonPhysicsBiasingOperation = 0;
160 fBiasingInteractionLaw = 0;
161 fPreviousBiasingInteractionLaw = 0;
163 fPreviousStepSize = -1.0;
165 fResetWrappedProcessInteractionLength =
false;
167 if ( fCommonStart.
Get() )
169 fCommonStart.
Put(
false );
170 fCommonEnd .
Put(
true );
172 fSharedData-> fCurrentBiasingOperator = 0;
173 fSharedData->fPreviousBiasingOperator = 0;
186 if ( fIsPhysicsBasedBiasing ) fWrappedProcess->
EndTracking();
187 if ( fSharedData->fCurrentBiasingOperator) (fSharedData->fCurrentBiasingOperator)->ExitingBiasing( fCurrentTrack,
this );
188 fBiasingInteractionLaw = 0;
191 if ( fCommonEnd.
Get() )
193 fCommonEnd .
Put(
false );
194 fCommonStart.
Put(
true );
222 fSharedData->fPreviousBiasingOperator = fSharedData->fCurrentBiasingOperator;
223 fSharedData->fIsNewOperator =
false;
224 fSharedData->fLeavingPreviousOperator =
false;
228 G4bool firstStepInParallelVolume =
false;
229 if ( fSharedData->fParallelGeometriesLimiterProcess )
233 size_t iParallel = 0;
234 for (
auto wasLimiting : fSharedData->fParallelGeometriesLimiterProcess->
GetWasLimiting() )
236 if ( firstStep || wasLimiting )
238 firstStepInParallelVolume =
true;
241 ->GetLogicalVolume() );
242 if ( newParallelOperator )
244 if ( tmpParallelOperator )
247 ed <<
" Several biasing operators are defined at the same place in parallel geometries ! Found:\n";
248 ed <<
" - `" << newParallelOperator->
GetName() <<
"' and \n";
249 ed <<
" - `" << tmpParallelOperator->GetName() <<
"'.\n";
250 ed <<
" Keeping `" << newParallelOperator->
GetName() <<
"'. Behavior not guaranteed ! Please consider having only one operator at a place. " <<
G4endl;
251 G4Exception(
" G4BiasingProcessInterface::PostStepGetPhysicalInteractionLength(...)",
257 else newParallelOperator = tmpParallelOperator;
261 fSharedData->fParallelGeometryOperator = newParallelOperator;
269 if ( firstStepInVolume )
272 fSharedData->fMassGeometryOperator = newOperator;
273 if ( ( newOperator !=
nullptr ) && ( fSharedData->fParallelGeometryOperator !=
nullptr ) )
276 ed <<
" Biasing operators are defined at the same place in mass and parallel geometries ! Found:\n";
277 ed <<
" - `" << fSharedData->fParallelGeometryOperator->
GetName() <<
"' in parallel geometry and \n";
278 ed <<
" - `" << newOperator->
GetName() <<
"' in mass geometry.\n";
279 ed <<
" Keeping `" << fSharedData->fParallelGeometryOperator->
GetName() <<
"'. Behavior not guaranteed ! Please consider having only one operator at a place. " <<
G4endl;
280 G4Exception(
" G4BiasingProcessInterface::PostStepGetPhysicalInteractionLength(...)",
288 if ( firstStepInVolume || firstStepInParallelVolume )
291 if ( newOperator ==
nullptr ) newOperator = fSharedData->fMassGeometryOperator;
293 fSharedData->fCurrentBiasingOperator = newOperator ;
295 if ( newOperator != fSharedData->fPreviousBiasingOperator )
297 fSharedData->fLeavingPreviousOperator = ( fSharedData->fPreviousBiasingOperator != nullptr ) ;
298 fSharedData->fIsNewOperator = ( newOperator != nullptr );
310 if ( fSharedData->fCurrentBiasingOperator !=
nullptr )
312 for (
size_t i = 0 ; i < (fSharedData->fPhysicsBiasingProcessInterfaces).size(); i++ )
313 (fSharedData->fPhysicsBiasingProcessInterfaces)[i]->InvokeWrappedProcessPostStepGPIL( track, previousStepSize,
condition );
322 if ( ( fSharedData->fPreviousBiasingOperator != 0 ) ||
323 ( fSharedData->fCurrentBiasingOperator != 0 ) )
325 fPreviousOccurenceBiasingOperation = fOccurenceBiasingOperation;
326 fPreviousFinalStateBiasingOperation = fFinalStateBiasingOperation;
327 fPreviousNonPhysicsBiasingOperation = fNonPhysicsBiasingOperation;
328 fPreviousBiasingInteractionLaw = fBiasingInteractionLaw;
330 fOccurenceBiasingOperation = 0;
331 fFinalStateBiasingOperation = 0;
332 fNonPhysicsBiasingOperation = 0;
333 fBiasingInteractionLaw = 0;
336 fBiasingPostStepGPIL =
DBL_MAX;
340 fWrappedProcessAlongStepGPIL =
DBL_MAX;
341 fBiasingAlongStepGPIL =
DBL_MAX;
345 fPreviousStepSize = previousStepSize;
351 G4double usedPreviousStepSize = previousStepSize;
356 if ( fSharedData->fLeavingPreviousOperator )
358 (fSharedData->fPreviousBiasingOperator)->ExitingBiasing( &track,
this );
360 if ( fSharedData->fCurrentBiasingOperator == 0 )
362 ResetForUnbiasedTracking();
363 if ( fIsPhysicsBasedBiasing )
366 if ( fResetWrappedProcessInteractionLength )
368 fResetWrappedProcessInteractionLength =
false;
371 usedPreviousStepSize = 0.0;
381 if ( fSharedData->fCurrentBiasingOperator == 0 )
399 if ( !fIsPhysicsBasedBiasing )
401 fNonPhysicsBiasingOperation = (fSharedData->fCurrentBiasingOperator)->GetProposedNonPhysicsBiasingOperation( &track,
this );
402 if ( fNonPhysicsBiasingOperation == 0 )
414 fOccurenceBiasingOperation = (fSharedData->fCurrentBiasingOperator)->GetProposedOccurenceBiasingOperation( &track,
this );
418 if ( fOccurenceBiasingOperation == 0 )
420 *
condition = fWrappedProcessForceCondition;
421 return fWrappedProcessPostStepGPIL;
426 fResetWrappedProcessInteractionLength =
true;
434 fBiasingForceCondition = fWrappedProcessForceCondition;
441 return fBiasingPostStepGPIL;
453 if ( fSharedData->fCurrentBiasingOperator == 0 )
return fWrappedProcess->
PostStepDoIt(track, step);
458 if ( !fIsPhysicsBasedBiasing )
461 (fSharedData->fCurrentBiasingOperator)->ReportOperationApplied(
this,
BAC_NonPhysics, fNonPhysicsBiasingOperation, particleChange );
462 return particleChange;
482 fFinalStateBiasingOperation = (fSharedData->fCurrentBiasingOperator)->GetProposedFinalStateBiasingOperation( &track,
this );
485 G4bool forceBiasedFinalState =
false;
486 if ( fFinalStateBiasingOperation != 0 )
488 finalStateParticleChange = fFinalStateBiasingOperation->
ApplyFinalStateBiasing(
this, &track, &step, forceBiasedFinalState );
493 finalStateParticleChange = fWrappedProcess->
PostStepDoIt(track, step);
498 if ( fOccurenceBiasingOperation == 0 )
500 (fSharedData->fCurrentBiasingOperator)->ReportOperationApplied(
this, BAC, fFinalStateBiasingOperation, finalStateParticleChange );
501 return finalStateParticleChange;
505 if ( forceBiasedFinalState )
507 (fSharedData->fCurrentBiasingOperator)->ReportOperationApplied(
this, BAC, fFinalStateBiasingOperation, finalStateParticleChange );
508 return finalStateParticleChange;
513 G4double weightForInteraction = 1.0;
514 if ( !fBiasingInteractionLaw->
IsSingular() ) weightForInteraction =
516 fBiasingInteractionLaw ->ComputeEffectiveCrossSectionAt(step.
GetStepLength());
523 ed <<
"Internal inconsistency in cross-section handling. Please report !" <<
G4endl;
524 G4Exception(
" G4BiasingProcessInterface::PostStepDoIt(...)",
534 if ( weightForInteraction <= 0. )
537 ed <<
" Negative interaction weight : w_I = "
538 << weightForInteraction <<
542 " Interaction law = `" << fBiasingInteractionLaw <<
"'" <<
544 G4Exception(
" G4BiasingProcessInterface::PostStepDoIt(...)",
551 (fSharedData->fCurrentBiasingOperator)->ReportOperationApplied(
this, BAC,
552 fOccurenceBiasingOperation, weightForInteraction,
553 fFinalStateBiasingOperation, finalStateParticleChange );
563 return fOccurenceBiasingParticleChange;
577 fCurrentMinimumStep = currentMinimumStep;
578 fProposedSafety = proposedSafety;
582 fWrappedProcessAlongStepGPIL =
DBL_MAX;
587 if ( fSharedData->fCurrentBiasingOperator == 0 )
589 if ( fWrappedProcessIsAlong ) fWrappedProcessAlongStepGPIL =
595 return fWrappedProcessAlongStepGPIL;
601 if ( !fIsPhysicsBasedBiasing )
return fWrappedProcessAlongStepGPIL;
606 if ( fOccurenceBiasingOperation == 0 )
608 if ( fWrappedProcessIsAlong ) fWrappedProcessAlongStepGPIL =
614 return fWrappedProcessAlongStepGPIL;
623 G4double minimumStep = fBiasingAlongStepGPIL < currentMinimumStep ? fBiasingAlongStepGPIL : currentMinimumStep ;
626 if ( fWrappedProcessIsAlong )
633 fWrappedProcessGPILSelection = *selection;
634 fBiasingGPILSelection = fOccurenceBiasingOperation->
ProposeGPILSelection( fWrappedProcessGPILSelection );
639 fWrappedProcessAlongStepGPIL = fBiasingAlongStepGPIL;
642 *selection = fBiasingGPILSelection;
644 return fWrappedProcessAlongStepGPIL;
655 if ( fSharedData->fCurrentBiasingOperator == 0 )
657 if ( fWrappedProcessIsAlong )
return fWrappedProcess->
AlongStepDoIt(track, step);
661 return fDummyParticleChange;
674 G4double weightForNonInteraction (1.0);
675 if ( fBiasingInteractionLaw != 0 )
677 weightForNonInteraction =
681 fOccurenceBiasingOperation->
AlongMoveBy(
this, &step, weightForNonInteraction );
683 if ( weightForNonInteraction <= 0. )
686 ed <<
" Negative non interaction weight : w_NI = " << weightForNonInteraction <<
690 " biasing interaction law = `" << fBiasingInteractionLaw->
GetName() <<
"'" <<
G4endl;
691 G4Exception(
" G4BiasingProcessInterface::AlongStepDoIt(...)",
701 return fOccurenceBiasingParticleChange;
714 return fWrappedProcess->
AtRestDoIt(track, step);
720 if ( fWrappedProcess != 0 )
return fWrappedProcess->
IsApplicable(pd);
730 if ( fWrappedProcess != 0 )
749 if ( fWrappedProcess != 0 )
758 ReorderBiasingVectorAsGPIL();
762 if ( fDoCommonConfigure.
Get() )
766 fDoCommonConfigure.
Put(
false);
779 SetUpFirstLastFlags();
780 if ( fWrappedProcess != 0 )
807 if ( G4BiasingProcessSharedData::fSharedDataMap.Find(mgr) == G4BiasingProcessSharedData::fSharedDataMap.End() )
810 G4BiasingProcessSharedData::fSharedDataMap[mgr] = fSharedData;
812 else fSharedData = G4BiasingProcessSharedData::fSharedDataMap[mgr] ;
814 fSharedData-> fBiasingProcessInterfaces.push_back(
this );
815 fSharedData-> fPublicBiasingProcessInterfaces.push_back(
this );
816 if ( fIsPhysicsBasedBiasing )
818 fSharedData-> fPhysicsBiasingProcessInterfaces.push_back(
this );
819 fSharedData-> fPublicPhysicsBiasingProcessInterfaces.push_back(
this );
823 fSharedData-> fNonPhysicsBiasingProcessInterfaces.push_back(
this );
824 fSharedData-> fPublicNonPhysicsBiasingProcessInterfaces.push_back(
this );
827 fProcessManager = mgr;
845 if ( fWrappedProcess != 0 )
854 ReorderBiasingVectorAsGPIL();
858 if ( fDoCommonConfigure.
Get() )
862 fDoCommonConfigure.
Put(
false);
873 SetUpFirstLastFlags();
875 if ( fWrappedProcess != 0 )
890 G4int iPhys = ( physOnly ) ? 1 : 0;
891 return fFirstLastFlags[IdxFirstLast( 1, 1, iPhys)];
897 G4int iPhys = ( physOnly ) ? 1 : 0;
898 return fFirstLastFlags[IdxFirstLast( 0, 1, iPhys)];
904 G4int iPhys = ( physOnly ) ? 1 : 0;
905 return fFirstLastFlags[IdxFirstLast( 1, 0, iPhys)];
911 G4int iPhys = ( physOnly ) ? 1 : 0;
912 return fFirstLastFlags[IdxFirstLast( 0, 0, iPhys)];
921 for (std::size_t i = 0; i < pv->
size(); ++i )
if ( (*pv)(i) ==
this ) { thisIdx = i;
break; }
922 if ( thisIdx < 0 )
return false;
923 for ( std::size_t i = 0; i < (fSharedData->fBiasingProcessInterfaces).size(); ++i )
925 if ( (fSharedData->fBiasingProcessInterfaces)[i]->fIsPhysicsBasedBiasing || !physOnly )
928 for (std::size_t j = 0; j < pv->
size(); ++j )
if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] ) { thatIdx = j;
break; }
931 if ( thisIdx > thatIdx )
948 for (std::size_t i = 0; i < pv->
size(); ++i )
if ( (*pv)(i) ==
this ) { thisIdx = i;
break; }
949 if ( thisIdx < 0 )
return false;
950 for ( std::size_t i = 0; i < (fSharedData->fBiasingProcessInterfaces).size(); ++i )
952 if ( (fSharedData->fBiasingProcessInterfaces)[i]->fIsPhysicsBasedBiasing || !physOnly )
955 for (std::size_t j = 0; j < pv->
size(); ++j )
if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] ) { thatIdx = j;
break; }
958 if ( thisIdx < thatIdx )
975 for (std::size_t i = 0; i < pv->
size(); ++i )
if ( (*pv)(i) ==
this ) { thisIdx = i;
break; }
976 if ( thisIdx < 0 )
return false;
977 for ( std::size_t i = 0; i < (fSharedData->fBiasingProcessInterfaces).size(); ++i )
979 if ( (fSharedData->fBiasingProcessInterfaces)[i]->fIsPhysicsBasedBiasing || !physOnly )
982 for (std::size_t j = 0; j < pv->
size(); ++j )
if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] ) { thatIdx = j;
break; }
985 if ( thisIdx > thatIdx )
1002 for (std::size_t i = 0; i < pv->
size(); ++i )
if ( (*pv)(i) ==
this ) { thisIdx = i;
break; }
1003 if ( thisIdx < 0 )
return false;
1004 for ( std::size_t i = 0; i < (fSharedData->fBiasingProcessInterfaces).size(); ++i )
1006 if ( (fSharedData->fBiasingProcessInterfaces)[i]->fIsPhysicsBasedBiasing || !physOnly )
1009 for (std::size_t j = 0; j < pv->
size(); ++j )
if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] ) { thatIdx = j;
break; }
1012 if ( thisIdx < thatIdx )
1024void G4BiasingProcessInterface::SetUpFirstLastFlags()
1026 for (
G4int iPhys = 0; iPhys < 2; iPhys++ )
1028 G4bool physOnly = ( iPhys == 1 );
1040void G4BiasingProcessInterface::ResetForUnbiasedTracking()
1042 fOccurenceBiasingOperation = 0;
1043 fFinalStateBiasingOperation = 0;
1044 fNonPhysicsBiasingOperation = 0;
1045 fBiasingInteractionLaw = 0;
1049void G4BiasingProcessInterface::InvokeWrappedProcessPostStepGPIL(
const G4Track& track,
1053 G4double usedPreviousStepSize = previousStepSize;
1060 if ( fResetWrappedProcessInteractionLength )
1062 fResetWrappedProcessInteractionLength =
false;
1065 usedPreviousStepSize = 0.0;
1069 fWrappedProcessForceCondition = *
condition;
1075void G4BiasingProcessInterface::ReorderBiasingVectorAsGPIL()
1078 std::vector < G4BiasingProcessInterface* > tmpProcess ( fSharedData->fBiasingProcessInterfaces );
1079 ( fSharedData -> fBiasingProcessInterfaces ) . clear();
1080 ( fSharedData -> fPhysicsBiasingProcessInterfaces ) . clear();
1081 ( fSharedData -> fNonPhysicsBiasingProcessInterfaces ) . clear();
1082 ( fSharedData -> fPublicBiasingProcessInterfaces ) . clear();
1083 ( fSharedData -> fPublicPhysicsBiasingProcessInterfaces ) . clear();
1084 ( fSharedData -> fPublicNonPhysicsBiasingProcessInterfaces ) . clear();
1087 for (std::size_t i = 0; i < pv->
size(); ++i )
1089 for ( std::size_t j = 0; j < tmpProcess.size(); ++j )
1091 if ( (*pv)(i) == tmpProcess[j] )
1093 ( fSharedData -> fBiasingProcessInterfaces ) . push_back( tmpProcess[j] );
1094 ( fSharedData -> fPublicBiasingProcessInterfaces ) . push_back( tmpProcess[j] );
1095 if ( tmpProcess[j] -> fIsPhysicsBasedBiasing )
1097 ( fSharedData -> fPhysicsBiasingProcessInterfaces ) . push_back( tmpProcess[j] );
1098 ( fSharedData -> fPublicPhysicsBiasingProcessInterfaces ) . push_back( tmpProcess[j] );
1102 ( fSharedData -> fNonPhysicsBiasingProcessInterfaces ) . push_back( tmpProcess[j] );
1103 ( fSharedData -> fPublicNonPhysicsBiasingProcessInterfaces ) . push_back( tmpProcess[j] );
G4double condition(const G4ErrorSymMatrix &m)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
@ NotCandidateForSelection
G4bool GetIsFirstPostStepGPILInterface(G4bool physOnly=true) const
virtual G4double AlongStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
virtual void ResetNumberOfInteractionLengthLeft()
G4bool IsLastPostStepGPILInterface(G4bool physOnly=true) const
virtual void SetProcessManager(const G4ProcessManager *)
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
virtual void SetMasterProcess(G4VProcess *masterP)
virtual G4VParticleChange * AlongStepDoIt(const G4Track &track, const G4Step &step)
~G4BiasingProcessInterface()
G4bool GetIsLastPostStepDoItInterface(G4bool physOnly=true) const
virtual void PrepareWorkerPhysicsTable(const G4ParticleDefinition &pd)
G4bool GetIsLastPostStepGPILInterface(G4bool physOnly=true) const
virtual G4VParticleChange * PostStepDoIt(const G4Track &track, const G4Step &step)
G4bool GetIsFirstPostStepDoItInterface(G4bool physOnly=true) const
G4bool IsFirstPostStepDoItInterface(G4bool physOnly=true) const
virtual G4VParticleChange * AtRestDoIt(const G4Track &, const G4Step &)
G4bool IsLastPostStepDoItInterface(G4bool physOnly=true) const
void StartTracking(G4Track *track)
G4BiasingProcessInterface(G4String name="biasWrapper(0)")
const G4BiasingProcessSharedData * GetSharedData() const
virtual G4bool RetrievePhysicsTable(const G4ParticleDefinition *pd, const G4String &s, G4bool f)
virtual const G4ProcessManager * GetProcessManager()
virtual void PreparePhysicsTable(const G4ParticleDefinition &pd)
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track &, G4ForceCondition *)
virtual void BuildPhysicsTable(const G4ParticleDefinition &pd)
virtual G4bool StorePhysicsTable(const G4ParticleDefinition *pd, const G4String &s, G4bool f)
virtual G4bool IsApplicable(const G4ParticleDefinition &pd)
G4bool IsFirstPostStepGPILInterface(G4bool physOnly=true) const
G4VProcess * GetWrappedProcess() const
virtual void BuildWorkerPhysicsTable(const G4ParticleDefinition &pd)
void Put(const value_type &val) const
void SetPhysicalCrossSection(G4double crossSection)
virtual G4double ComputeNonInteractionProbabilityAt(G4double length) const
virtual G4double ComputeEffectiveCrossSectionAt(G4double length) const
iterator Find(const key_type &k)
const std::vector< const G4VPhysicalVolume * > & GetCurrentVolumes() const
const std::vector< G4bool > & GetWasLimiting() const
virtual void Initialize(const G4Track &track)
void SetWrappedParticleChange(G4VParticleChange *wpc)
void SetOccurenceWeightForNonInteraction(G4double w)
void SetOccurenceWeightForInteraction(G4double w)
G4ProcessVector * GetPostStepProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
G4StepStatus GetStepStatus() const
G4StepPoint * GetPreStepPoint() const
G4double GetStepLength() const
G4TrackStatus GetTrackStatus() const
G4VPhysicalVolume * GetVolume() const
G4int GetCurrentStepNumber() const
const G4Step * GetStep() const
G4double GetSampledInteractionLength() const
const G4String & GetName() const
virtual G4double ComputeNonInteractionProbabilityAt(G4double length) const =0
virtual G4bool IsEffectiveCrossSectionInfinite() const
virtual G4bool IsSingular() const
virtual G4double ComputeEffectiveCrossSectionAt(G4double length) const =0
virtual G4GPILSelection ProposeGPILSelection(const G4GPILSelection wrappedProcessSelection)
virtual void AlongMoveBy(const G4BiasingProcessInterface *, const G4Step *, G4double)
virtual G4double DistanceToApplyOperation(const G4Track *, G4double, G4ForceCondition *)=0
virtual G4VParticleChange * ApplyFinalStateBiasing(const G4BiasingProcessInterface *, const G4Track *, const G4Step *, G4bool &)=0
virtual G4VParticleChange * GenerateBiasingFinalState(const G4Track *, const G4Step *)=0
virtual const G4VBiasingInteractionLaw * ProvideOccurenceBiasingInteractionLaw(const G4BiasingProcessInterface *, G4ForceCondition &)=0
virtual G4double ProposeAlongStepLimit(const G4BiasingProcessInterface *)
const G4String GetName() const
static const std::vector< G4VBiasingOperator * > & GetBiasingOperators()
static G4VBiasingOperator * GetBiasingOperator(const G4LogicalVolume *)
void ProposeTrackStatus(G4TrackStatus status)
void SetSecondaryWeightByProcess(G4bool)
G4TrackStatus GetTrackStatus() const
G4LogicalVolume * GetLogicalVolume() const
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)=0
virtual void ResetNumberOfInteractionLengthLeft()
virtual G4VParticleChange * AtRestDoIt(const G4Track &track, const G4Step &stepData)=0
const G4VProcess * GetMasterProcess() const
virtual G4bool RetrievePhysicsTable(const G4ParticleDefinition *, const G4String &, G4bool)
virtual const G4ProcessManager * GetProcessManager()
virtual void PrepareWorkerPhysicsTable(const G4ParticleDefinition &)
virtual void SetMasterProcess(G4VProcess *masterP)
virtual G4VParticleChange * PostStepDoIt(const G4Track &track, const G4Step &stepData)=0
virtual G4bool IsApplicable(const G4ParticleDefinition &)
virtual G4VParticleChange * AlongStepDoIt(const G4Track &track, const G4Step &stepData)=0
void SetProcessSubType(G4int)
virtual G4double AlongStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)=0
G4double GetCurrentInteractionLength() const
virtual void StartTracking(G4Track *)
virtual void BuildPhysicsTable(const G4ParticleDefinition &)
virtual G4bool StorePhysicsTable(const G4ParticleDefinition *, const G4String &, G4bool)
virtual void PreparePhysicsTable(const G4ParticleDefinition &)
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track &track, G4ForceCondition *condition)=0
virtual void BuildWorkerPhysicsTable(const G4ParticleDefinition &part)
virtual void SetProcessManager(const G4ProcessManager *)
G4int GetProcessSubType() const
virtual void EndTracking()
const G4String & GetProcessName() const