47 fCurrentBiasingOperator ( 0 ),
48 fPreviousBiasingOperator( 0 ),
49 fWrappedProcess ( 0 ),
50 fIsPhysicsBasedBiasing ( false ),
51 fWrappedProcessIsAtRest( false ),
52 fWrappedProcessIsAlong ( false ),
53 fWrappedProcessIsPost ( false ),
54 fWrappedProcessInteractionLength( -1.0 ),
55 fBiasingInteractionLaw ( 0 ),
56 fPhysicalInteractionLaw( 0 ),
57 fOccurenceBiasingParticleChange( 0 ),
58 fIamFirstGPIL ( false )
70 :
G4VProcess( useThisName !=
"" ? useThisName :
"biasWrapper("+wrappedProcess->GetProcessName()+
")",
71 wrappedProcess->GetProcessType()),
72 fCurrentBiasingOperator ( 0 ),
73 fPreviousBiasingOperator( 0 ),
74 fWrappedProcess ( wrappedProcess ),
75 fIsPhysicsBasedBiasing ( true ),
76 fWrappedProcessIsAtRest( wrappedIsAtRest ),
77 fWrappedProcessIsAlong ( wrappedIsAlongStep ),
78 fWrappedProcessIsPost ( wrappedIsPostStep ),
79 fWrappedProcessInteractionLength( -1.0 ),
80 fBiasingInteractionLaw ( 0 ),
81 fPhysicalInteractionLaw( 0 ),
82 fOccurenceBiasingParticleChange( 0 ),
83 fIamFirstGPIL ( false )
162 if ( biasingData )
delete biasingData;
166 for (
size_t i2nd = 0 ; i2nd < secondaries->size() ; i2nd++ )
169 if ( biasingData )
delete biasingData;
331 return particleChange;
377 return finalStateParticleChange;
381 G4double weightForInteraction = 1.0;
391 ed <<
"Internal inconsistency in cross-section handling. Please report !" <<
G4endl;
392 G4Exception(
" G4BiasingProcessInterface::PostStepDoIt(...)",
402 if ( weightForInteraction <= 0. )
405 ed <<
" Negative interaction weight : w_I = "
406 << weightForInteraction <<
412 G4Exception(
" G4BiasingProcessInterface::PostStepDoIt(...)",
538 G4double weightForNonInteraction (1.0);
541 weightForNonInteraction =
547 if ( weightForNonInteraction <= 0. )
550 ed <<
" Negative non interaction weight : w_NI = " << weightForNonInteraction <<
555 G4Exception(
" G4BiasingProcessInterface::AlongStepDoIt(...)",
688 G4int iPhys = ( physOnly ) ? 1 : 0;
693 G4int iPhys = ( physOnly ) ? 1 : 0;
698 G4int iPhys = ( physOnly ) ? 1 : 0;
703 G4int iPhys = ( physOnly ) ? 1 : 0;
713 for (
G4int i = 0; i < pv->
size(); i++ )
if ( (*pv)(i) ==
this ) { thisIdx = i;
break; }
720 if ( thisIdx > thatIdx )
735 for (
G4int i = 0; i < pv->
size(); i++ )
if ( (*pv)(i) ==
this ) { thisIdx = i;
break; }
742 if ( thisIdx < thatIdx )
757 for (
G4int i = 0; i < pv->
size(); i++ )
if ( (*pv)(i) ==
this ) { thisIdx = i;
break; }
764 if ( thisIdx > thatIdx )
779 for (
G4int i = 0; i < pv->
size(); i++ )
if ( (*pv)(i) ==
this ) { thisIdx = i;
break; }
786 if ( thisIdx < thatIdx )
799 for (
G4int iPhys = 0; iPhys < 2; iPhys++ )
801 G4bool physOnly = ( iPhys == 1 );
virtual void SetMasterProcess(G4VProcess *masterP)
virtual void Initialize(const G4Track &track)
G4double condition(const G4ErrorSymMatrix &m)
const G4VProcess * GetMasterProcess() const
virtual void BuildWorkerPhysicsTable(const G4ParticleDefinition &pd)
G4VBiasingOperation * fPreviousFinalStateBiasingOperation
G4bool IsLastPostStepGPILInterface(G4bool physOnly=true) const
G4bool fResetWrappedProcessInteractionLength
virtual void PreparePhysicsTable(const G4ParticleDefinition &pd)
G4VBiasingOperation * GetProposedFinalStateBiasingOperation(const G4Track *track, const G4BiasingProcessInterface *callingProcess)
virtual G4VParticleChange * AtRestDoIt(const G4Track &, const G4Step &)
virtual G4double ComputeNonInteractionProbabilityAt(G4double length) const
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track &track, G4ForceCondition *condition)=0
virtual void SetProcessManager(const G4ProcessManager *)
G4VBiasingOperation * fFinalStateBiasingOperation
void SetWrappedParticleChange(G4VParticleChange *wpc)
static G4Cache< G4bool > fCommonEnd
G4VBiasingOperation * fNonPhysicsBiasingOperation
G4double fBiasingAlongStepGPIL
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)=0
static G4BiasingTrackDataStore * GetInstance()
virtual G4bool StorePhysicsTable(const G4ParticleDefinition *pd, const G4String &s, G4bool f)
G4GPILSelection fWrappedProcessGPILSelection
std::ostringstream G4ExceptionDescription
static G4Cache< G4bool > fResetInteractionLaws
G4ParticleChange * fParticleChange
G4double GetStepLength() const
virtual void BuildPhysicsTable(const G4ParticleDefinition &pd)
G4double fBiasingPostStepGPIL
virtual G4bool DenyProcessPostStepDoIt(const G4BiasingProcessInterface *, const G4Track *, const G4Step *, G4double &)
virtual void PrepareWorkerPhysicsTable(const G4ParticleDefinition &pd)
virtual G4VParticleChange * AlongStepDoIt(const G4Track &track, const G4Step &step)
G4StepStatus GetStepStatus() const
void ProposeParentWeight(G4double finalWeight)
G4ParticleChangeForNothing * fDummyParticleChange
G4TrackStatus GetTrackStatus() const
void ResetForUnbiasedTracking()
virtual G4VParticleChange * PostStepDoIt(const G4Track &track, const G4Step &step)
G4double fWrappedProcessPostStepGPIL
const G4bool fIsPhysicsBasedBiasing
G4double fPreviousStepSize
G4VBiasingOperation * GetProposedOccurenceBiasingOperation(const G4Track *track, const G4BiasingProcessInterface *callingProcess)
virtual G4VParticleChange * ApplyFinalStateBiasing(const G4BiasingProcessInterface *, const G4Track *, const G4Step *)=0
virtual void SetProcessManager(const G4ProcessManager *)
virtual G4double ComputeEffectiveCrossSectionAt(G4double length) const =0
virtual void ResetNumberOfInteractionLengthLeft()
G4ForceCondition fBiasingForceCondition
G4VBiasingOperation * fPreviousOccurenceBiasingOperation
const G4ProcessManager * fProcessManager
void SetOccurenceWeightForNonInteraction(G4double w)
const G4Step * GetStep() const
G4BiasingTrackData * GetBiasingTrackData(const G4Track *track)
const G4VBiasingInteractionLaw * fPreviousBiasingInteractionLaw
virtual G4double ProposeAlongStepLimit(const G4BiasingProcessInterface *)
G4VProcess * GetWrappedProcess() const
void SetUpFirstLastFlags()
virtual void BuildWorkerPhysicsTable(const G4ParticleDefinition &part)
G4bool GetIsFirstPostStepGPILInterface(G4bool physOnly=true) const
G4StepPoint * GetPreStepPoint() const
virtual void StartTracking(G4Track *)
void SetSecondaryWeightByProcess(G4bool)
static G4Cache< G4bool > fCommonStart
G4int GetCurrentStepNumber() const
G4bool GetIsLastPostStepDoItInterface(G4bool physOnly=true) const
const G4VBiasingInteractionLaw * fBiasingInteractionLaw
G4bool GetIsLastPostStepGPILInterface(G4bool physOnly=true) const
virtual void PreparePhysicsTable(const G4ParticleDefinition &)
virtual G4double ComputeEffectiveCrossSectionAt(G4double length) const
G4bool GetIsFirstPostStepDoItInterface(G4bool physOnly=true) const
virtual G4ForceCondition ProposeForceCondition(const G4ForceCondition wrappedProcessCondition)
G4VBiasingOperation * fPreviousNonPhysicsBiasingOperation
G4double GetCurrentInteractionLength() const
void SetProcessSubType(G4int)
void SetPhysicalCrossSection(G4double crossSection)
void SetOccurenceWeightForInteraction(G4double w)
G4VProcess * fWrappedProcess
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
virtual G4bool RetrievePhysicsTable(const G4ParticleDefinition *, const G4String &, G4bool)
const G4String & GetProcessName() const
G4ForceCondition fWrappedProcessForceCondition
const G4bool fWrappedProcessIsAlong
virtual G4VParticleChange * GenerateBiasingFinalState(const G4Track *, const G4Step *)=0
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual G4bool IsApplicable(const G4ParticleDefinition &pd)
virtual const G4ProcessManager * GetProcessManager()
static G4VBiasingOperator * GetBiasingOperator(const G4LogicalVolume *)
virtual G4bool IsSingular() const
G4VBiasingOperator * fCurrentBiasingOperator
virtual const G4ProcessManager * GetProcessManager()
virtual void Initialize(const G4Track &)
G4VBiasingOperator * fPreviousBiasingOperator
G4LogicalVolume * GetLogicalVolume() const
virtual void BuildPhysicsTable(const G4ParticleDefinition &)
G4VBiasingOperation * fOccurenceBiasingOperation
std::vector< G4Track * > G4TrackVector
virtual G4VParticleChange * AlongStepDoIt(const G4Track &track, const G4Step &stepData)=0
G4ParticleChangeForOccurenceBiasing * fOccurenceBiasingParticleChange
G4bool IsFirstPostStepGPILInterface(G4bool physOnly=true) const
G4bool fFirstLastFlags[8]
virtual void SetMasterProcess(G4VProcess *masterP)
G4BiasingProcessInterface(G4String name="biasWrapper(0)")
virtual G4bool RetrievePhysicsTable(const G4ParticleDefinition *pd, const G4String &s, G4bool f)
virtual G4GPILSelection ProposeGPILSelection(const G4GPILSelection wrappedProcessSelection)
G4VPhysicalVolume * GetVolume() const
G4double GetWeight() const
virtual G4double AlongStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)=0
G4double GetSampledInteractionLength() const
static const std::vector< G4VBiasingOperator * > & GetBiasingOperators()
G4double fWrappedProcessInteractionLength
const G4String & GetName() const
virtual G4bool StorePhysicsTable(const G4ParticleDefinition *, const G4String &, G4bool)
virtual G4bool IsEffectiveCrossSectionInfinite() const
G4TrackStatus GetTrackStatus() const
G4bool IsFirstPostStepDoItInterface(G4bool physOnly=true) const
std::vector< G4BiasingProcessInterface * > * fCoInterfaces
virtual void AlongMoveBy(const G4BiasingProcessInterface *, const G4Step *, G4double)
G4InteractionLawPhysical * fPhysicalInteractionLaw
virtual void ResetNumberOfInteractionLengthLeft()
virtual const G4VBiasingInteractionLaw * ProvideOccurenceBiasingInteractionLaw(const G4BiasingProcessInterface *)=0
virtual void PrepareWorkerPhysicsTable(const G4ParticleDefinition &)
void ProposeTrackStatus(G4TrackStatus status)
virtual void EndTracking()
void ReportOperationApplied(const G4BiasingProcessInterface *callingProcess, G4BiasingAppliedCase biasingCase, G4VBiasingOperation *operationApplied, const G4VParticleChange *particleChangeProduced)
virtual G4VParticleChange * PostStepDoIt(const G4Track &track, const G4Step &stepData)=0
G4double fWrappedProcessAlongStepGPIL
static G4MapCache< const G4ProcessManager *, std::vector< G4BiasingProcessInterface * > > fManagerInterfaceMap
G4double fCurrentMinimumStep
G4VBiasingOperation * GetProposedNonPhysicsBiasingOperation(const G4Track *track, const G4BiasingProcessInterface *callingProcess)
G4bool IsLastPostStepDoItInterface(G4bool physOnly=true) const
G4int IdxFirstLast(G4int firstLast, G4int GPILDoIt, G4int physAll) const
void ExitingBiasing(const G4Track *track, const G4BiasingProcessInterface *callingProcess)
void Put(const value_type &val) const
G4int GetProcessSubType() const
G4GPILSelection fBiasingGPILSelection
void StartTracking(G4Track *track)
virtual G4double DistanceToApplyOperation(const G4Track *, G4double, G4ForceCondition *)=0
virtual G4bool IsApplicable(const G4ParticleDefinition &)
const G4TrackVector * GetSecondary() const
virtual G4double AlongStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track &, G4ForceCondition *)
~G4BiasingProcessInterface()
virtual G4VParticleChange * AtRestDoIt(const G4Track &track, const G4Step &stepData)=0
G4ProcessVector * GetPostStepProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const