37 fProcessToApply(nullptr),
38 fInteractionOccured(false),
39 fMaximumDistance(-1.0)
44 fTotalCrossSection = 0.0;
49 if ( fCommonTruncatedExpLaw )
delete fCommonTruncatedExpLaw;
50 if ( fForceFreeFlightLaw )
delete fForceFreeFlightLaw;
59 proposeForceCondition =
Forced;
60 return fCommonTruncatedExpLaw;
64 proposeForceCondition =
Forced;
65 return fForceFreeFlightLaw;
83 forceFinalState =
true;
85 return &fDummyParticleChange;
87 if ( fInteractionOccured )
89 forceFinalState =
true;
91 return &fDummyParticleChange;
97 if ( processGPIL <= step->GetStepLength() )
103 forceFinalState =
false;
104 fInteractionOccured =
true;
109 forceFinalState =
true;
111 return &fDummyParticleChange;
118 fTotalCrossSection += crossSection;
119 fCrossSections[process] = crossSection;
120 fNumberOfSharing = fCrossSections.size();
126 fCrossSections.clear();
127 fTotalCrossSection = 0.0;
128 fNumberOfSharing = 0;
130 fInteractionOccured =
false;
135 GetNavigatorForTracking()->
136 GetGlobalToLocalTransform()).TransformPoint(track->
GetPosition());
138 GetNavigatorForTracking()->
140 fMaximumDistance = currentSolid->
DistanceToOut(localPosition, localDirection);
141 if ( fMaximumDistance <=
DBL_MIN ) fMaximumDistance = 0.0;
148 fCrossSections.clear();
149 fTotalCrossSection = 0.0;
150 fNumberOfSharing = 0;
161 fCommonTruncatedExpLaw->
Sample();
171 for ( std::map< const G4VProcess*, G4double>::const_iterator it = fCrossSections.begin();
172 it != fCrossSections.end();
175 sigmaSelect += (*it).second;
176 if ( sigmaRand <= sigmaSelect )
178 fProcessToApply = (*it).first;
@ NotCandidateForSelection
G4BOptnForceCommonTruncatedExp(G4String name)
void UpdateForStep(const G4Step *)
virtual G4GPILSelection ProposeGPILSelection(const G4GPILSelection processSelection)
void ChooseProcessToApply()
virtual ~G4BOptnForceCommonTruncatedExp()
virtual const G4VBiasingInteractionLaw * ProvideOccurenceBiasingInteractionLaw(const G4BiasingProcessInterface *, G4ForceCondition &)
void AddCrossSection(const G4VProcess *, G4double)
void Initialize(const G4Track *)
virtual G4VParticleChange * ApplyFinalStateBiasing(const G4BiasingProcessInterface *, const G4Track *, const G4Step *, G4bool &)
G4double GetPostStepGPIL() const
G4double GetAlongStepGPIL() const
G4VProcess * GetWrappedProcess() const
void SetForceCrossSection(G4double xs)
G4double GetMaximumDistance() const
void SetMaximumDistance(G4double d)
void SetSelectedProcessXSfraction(G4double fXS)
G4VSolid * GetSolid() const
virtual void Initialize(const G4Track &track)
G4double GetStepLength() const
G4VPhysicalVolume * GetVolume() const
const G4ThreeVector & GetPosition() const
G4ThreeVector GetMomentum() const
const G4ThreeVector & GetMomentumDirection() const
static G4TransportationManager * GetTransportationManager()
G4double UpdateForStep(G4double truePathLength)
G4LogicalVolume * GetLogicalVolume() const
virtual G4VParticleChange * PostStepDoIt(const G4Track &track, const G4Step &stepData)=0
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const =0