55 fWeightSurvival(wsurvival),
57 fSourceImportance(isource),
63 G4Exception(
"G4WeightCutOffProcess::G4WeightCutOffProcess()",
65 "Failed to allocate G4ParticleChange !");
71 fGhostPreStepPoint = fGhostStep->GetPreStepPoint();
72 fGhostPostStepPoint = fGhostStep->GetPostStepPoint();
85 delete fParticleChange;
101 fGhostWorldName = parallelWorldName;
102 fGhostWorld = fTransportationManager->GetParallelWorld(fGhostWorldName);
103 fGhostNavigator = fTransportationManager->GetNavigator(fGhostWorld);
113 fGhostWorldName = parallelWorld->
GetName();
114 fGhostWorld = parallelWorld;
115 fGhostNavigator = fTransportationManager->GetNavigator(fGhostWorld);
132 if(fGhostNavigator !=
nullptr)
133 { fNavigatorID = fTransportationManager->ActivateNavigator(fGhostNavigator); }
136 G4Exception(
"G4WeightCutOffProcess::StartTracking",
138 "G4WeightCutOffProcess is used for tracking without having a parallel world assigned");
152 fOldGhostTouchable = fPathFinder->CreateTouchableHandle(fNavigatorID);
153 fGhostPreStepPoint->SetTouchableHandle(fOldGhostTouchable);
154 fNewGhostTouchable = fOldGhostTouchable;
155 fGhostPostStepPoint->SetTouchableHandle(fNewGhostTouchable);
183 fOldGhostTouchable = fGhostPostStepPoint->GetTouchableHandle();
194 fNewGhostTouchable = fPathFinder->CreateTouchableHandle(fNavigatorID);
206 fNewGhostTouchable = fOldGhostTouchable;
209 fGhostPreStepPoint->SetTouchableHandle(fOldGhostTouchable);
210 fGhostPostStepPoint->SetTouchableHandle(fNewGhostTouchable);
215 G4GeometryCell postCell(*(fGhostPostStepPoint->GetPhysicalVolume()),
216 fGhostPostStepPoint->GetTouchable()->GetReplicaNumber());
222 if (fIStore !=
nullptr)
224 G4double i = fIStore->GetImportance(postCell);
231 if (w<R*fWeightLimit)
241 fParticleChange->ProposeWeight(ws);
252 if (fIStore !=
nullptr)
254 G4double i = fIStore->GetImportance(postCell);
261 if (w<R*fWeightLimit)
271 fParticleChange->ProposeWeight(ws);
276 return fParticleChange;
295 if (previousStepSize > 0.)
296 { fGhostSafety -= previousStepSize; }
299 if (fGhostSafety < 0.) fGhostSafety = 0.0;
304 if (currentMinimumStep <= fGhostSafety && currentMinimumStep > 0.)
307 returnedStep = currentMinimumStep;
309 proposedSafety = fGhostSafety - currentMinimumStep;
318 = fPathFinder->ComputeStep(fFieldTrack,currentMinimumStep,fNavigatorID,
326 fGhostSafety = fGhostNavigator->ComputeSafety(fEndTrack.GetPosition());
332 proposedSafety = fGhostSafety;
338 returnedStep *= (1.0 + 1.0e-9);
381void G4WeightCutOffProcess::CopyStep(
const G4Step & step)
G4double condition(const G4ErrorSymMatrix &m)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
@ NotCandidateForSelection
G4GLOB_DLL std::ostream G4cout
static void Update(G4FieldTrack *, const G4Track *)
static G4PathFinder * GetInstance()
const G4VTouchable * GetTouchable() const
void SetStepStatus(const G4StepStatus aValue)
G4VPhysicalVolume * GetPhysicalVolume() const
G4SteppingControl GetControlFlag() const
G4Track * GetTrack() const
void SetStepLength(G4double value)
G4StepPoint * GetPreStepPoint() const
G4double GetStepLength() const
G4double GetTotalEnergyDeposit() const
void SetControlFlag(G4SteppingControl StepControlFlag)
void SetTotalEnergyDeposit(G4double value)
G4StepPoint * GetPostStepPoint() const
void SetTrack(G4Track *value)
virtual G4int GetReplicaNumber(G4int depth=0) const
G4VPhysicalVolume * GetVolume() const
G4double GetWeight() const
const G4ThreeVector & GetPosition() const
G4int GetCurrentStepNumber() const
const G4ThreeVector & GetMomentumDirection() const
static G4TransportationManager * GetTransportationManager()
virtual void Initialize(const G4Track &)
const G4String & GetName() const
G4VProcess(const G4String &aName="NoName", G4ProcessType aType=fNotDefined)
G4VParticleChange * pParticleChange
const G4String & GetProcessName() const
virtual G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &)
const G4String & GetName() const
void SetParallelWorld(const G4String ¶llelWorldName)
G4WeightCutOffProcess(G4double wsurvival, G4double wlimit, G4double isource, G4VIStore *istore, const G4String &aName="WeightCutOffProcess", G4bool para=false)
void StartTracking(G4Track *)
virtual G4VParticleChange * AtRestDoIt(const G4Track &, const G4Step &)
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition)
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track &, G4ForceCondition *)
virtual G4double AlongStepGetPhysicalInteractionLength(const G4Track &, G4double, G4double, G4double &, G4GPILSelection *)
virtual ~G4WeightCutOffProcess()