56 fImportanceAlgorithm(aImportanceAlgorithm),
60 G4cout <<
"### G4ImportanceProcess:: Creating " <<
G4endl;
61 if (TrackTerminator !=
nullptr)
69 if (fParticleChange ==
nullptr)
71 G4Exception(
"G4ImportanceProcess::G4ImportanceProcess()",
73 "Failed allocation of G4ParticleChange !");
90 G4cout <<
"G4ImportanceProcess:: importance process paraflag is: " << fParaflag <<
G4endl;
97 delete fPostStepAction;
98 delete fParticleChange;
116 G4cout <<
"G4ImportanceProcess:: SetParallelWorld name = " << parallelWorldName <<
G4endl;
120 fGhostWorldName = parallelWorldName;
122 fGhostNavigator = fTransportationManager->
GetNavigator(fGhostWorld);
155 if(fGhostNavigator !=
nullptr)
161 "G4ImportanceProcess is used for tracking without having a parallel world assigned");
177 fNewGhostTouchable = fOldGhostTouchable;
208 return fParticleChange;
236 fNewGhostTouchable = fOldGhostTouchable;
265 G4cout <<
"WARNING - G4ImportanceProcess::PostStepDoIt()"
266 <<
" StopAndKill track. on boundary" <<
G4endl;
300 fPostStepAction->
DoIt(aTrack, fParticleChange, nw);
310 G4cout <<
"WARNING - G4ImportanceProcess::PostStepDoIt()"
311 <<
" StopAndKill track. on boundary non-parallel" <<
G4endl;
334 fPostStepAction->
DoIt(aTrack, fParticleChange, nw);
338 return fParticleChange;
360 if (previousStepSize > 0.)
361 { fGhostSafety -= previousStepSize; }
364 if (fGhostSafety < 0.) fGhostSafety = 0.0;
369 if (currentMinimumStep <= fGhostSafety && currentMinimumStep > 0.)
372 returnedStep = currentMinimumStep;
374 proposedSafety = fGhostSafety - currentMinimumStep;
384 = fPathFinder->
ComputeStep(fFieldTrack,currentMinimumStep,fNavigatorID,
402 proposedSafety = fGhostSafety;
406 returnedStep *= (1.0 + 1.0e-9);
450void G4ImportanceProcess::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 *)
G4ThreeVector GetPosition() const
virtual G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &)
virtual G4VParticleChange * AtRestDoIt(const G4Track &, const G4Step &)
void SetParallelWorld(const G4String ¶llelWorldName)
virtual void KillTrack() const
virtual G4double AlongStepGetPhysicalInteractionLength(const G4Track &, G4double, G4double, G4double &, G4GPILSelection *)
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition)
virtual ~G4ImportanceProcess()
G4ImportanceProcess(const G4VImportanceAlgorithm &aImportanceAlgorithm, const G4VIStore &aIstore, const G4VTrackTerminator *TrackTerminator, const G4String &aName="ImportanceProcess", G4bool para=false)
void StartTracking(G4Track *)
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track &, G4ForceCondition *)
virtual const G4String & GetName() const
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4double pProposedMaxLength=DBL_MAX, const G4bool keepState=true)
void Initialize(const G4Track &) override
G4double ComputeStep(const G4FieldTrack &pFieldTrack, G4double pCurrentProposedStepLength, G4int navigatorId, G4int stepNo, G4double &pNewSafety, ELimited &limitedStep, G4FieldTrack &EndState, G4VPhysicalVolume *currentVolume)
void PrepareNewTrack(const G4ThreeVector &position, const G4ThreeVector &direction, G4VPhysicalVolume *massStartVol=nullptr)
static G4PathFinder * GetInstance()
G4TouchableHandle CreateTouchableHandle(G4int navId) const
void DoIt(const G4Track &aTrack, G4ParticleChange *aParticleChange, const G4Nsplit_Weight &nw)
G4StepStatus GetStepStatus() const
const G4VTouchable * GetTouchable() const
void SetStepStatus(const G4StepStatus aValue)
void SetTouchableHandle(const G4TouchableHandle &apValue)
const G4TouchableHandle & GetTouchableHandle() const
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
G4TrackStatus GetTrackStatus() const
G4VPhysicalVolume * GetVolume() const
G4VPhysicalVolume * GetNextVolume() const
G4double GetWeight() const
const G4ThreeVector & GetPosition() const
G4int GetCurrentStepNumber() const
const G4ThreeVector & GetMomentumDirection() const
G4VPhysicalVolume * GetParallelWorld(const G4String &worldName)
static G4TransportationManager * GetTransportationManager()
G4int ActivateNavigator(G4Navigator *aNavigator)
G4Navigator * GetNavigator(const G4String &worldName)
virtual G4double GetImportance(const G4GeometryCell &gCell) const =0
void ProposeTrackStatus(G4TrackStatus status)
virtual void Initialize(const G4Track &)
G4VParticleChange * pParticleChange
const G4String & GetProcessName() const