65 :
G4VProcess(processName, theType), fFieldTrack(
'0')
68 if (fpHyperStep ==
nullptr) fpHyperStep =
new G4Step();
69 iParallelWorld = ++nParallelWorlds;
93 if (nParallelWorlds == 0) {
95 fpHyperStep =
nullptr;
122 "G4ParallelWorldProcess::StartTracking",
"ProcParaWorld000",
FatalException,
123 "G4ParallelWorldProcess is used for tracking without having a parallel world assigned");
174 if (aSD !=
nullptr) {
253 if (endTrack_G4MT_TLS_ ==
nullptr) endTrack_G4MT_TLS_ =
new G4FieldTrack(
'0');
262 if (previousStepSize > 0.) {
267 if (currentMinimumStep <= fGhostSafety && currentMinimumStep > 0.) {
269 returnedStep = currentMinimumStep;
277#ifdef G4DEBUG_PARALLEL_WORLD_PROCESS
281 if (localVerb == 1) {
284 else if (localVerb > 1) {
285 G4cout <<
"----------------------------------------------" <<
G4endl;
286 G4cout <<
" ParallelWorldProcess: field Track set to : " <<
G4endl;
287 G4cout <<
"----------------------------------------------" <<
G4endl;
289 G4cout <<
"----------------------------------------------" <<
G4endl;
310 returnedStep *= (1.0 + 1.0e-9);
315 if (iParallelWorld == nParallelWorlds) fNavIDHyp = 0;
348 if (iParallelWorld == 1) {
372 if (thePhys !=
nullptr) {
374 if (ghostMaterial !=
nullptr) {
377 if (ghostRegion !=
nullptr) {
379 if (ghostProdCuts !=
nullptr) prodCuts = ghostProdCuts;
384 if (ghostMCCouple !=
nullptr) {
392 G4cout <<
"!!! MaterialCutsCouple is not found for " << ghostMaterial->
GetName() <<
"."
393 <<
G4endl <<
" Material in real world ("
405 if (partName ==
"geantino")
return false;
406 if (partName ==
"chargedgeantino")
return false;
409 if (pdgCode == 11 || pdgCode == 2212)
return false;
410 pdgCode = std::abs(pdgCode);
411 if (pdgCode == 22)
return false;
412 if (pdgCode == 12 || pdgCode == 14 || pdgCode == 16)
return false;
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
G4VSensitiveDetector * GetSensitiveDetector() const
G4Region * GetRegion() const
G4Material * GetMaterial() const
G4ProductionCuts * GetProductionCuts() const
const G4String & GetName() const
void SetPushVerbosity(G4bool mode)
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4double pProposedMaxLength=DBL_MAX, const G4bool keepState=true)
static G4ParallelWorldProcessStore * GetInstance()
void SetParallelWorld(G4ParallelWorldProcess *proc, const G4String ¶llelWorldName)
G4TouchableHandle fNewGhostTouchable
G4bool layeredMaterialFlag
G4double AlongStepGetPhysicalInteractionLength(const G4Track &, G4double, G4double, G4double &, G4GPILSelection *) override
G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &) override
G4VParticleChange aDummyParticleChange
static const G4Step * GetHyperStep()
G4PathFinder * fPathFinder
G4TransportationManager * fTransportationManager
void CopyStep(const G4Step &step)
G4VPhysicalVolume * fGhostWorld
G4double PostStepGetPhysicalInteractionLength(const G4Track &, G4double, G4ForceCondition *) override
G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &) override
G4TouchableHandle fOldGhostTouchable
G4StepPoint * fGhostPreStepPoint
G4VParticleChange * AtRestDoIt(const G4Track &, const G4Step &) override
static G4int GetHypNavigatorID()
void StartTracking(G4Track *) override
G4StepPoint * fGhostPostStepPoint
~G4ParallelWorldProcess() override
G4double AtRestGetPhysicalInteractionLength(const G4Track &, G4ForceCondition *) override
void SwitchMaterial(G4StepPoint *)
G4ParallelWorldProcess(const G4String &processName="ParaWorld", G4ProcessType theType=fParallel)
G4Navigator * fGhostNavigator
void SetParallelWorld(G4String parallelWorldName)
G4bool IsAtRestRequired(G4ParticleDefinition *)
G4int GetPDGEncoding() const
const G4String & GetParticleName() const
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
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
static G4ProductionCutsTable * GetProductionCutsTable()
G4ProductionCuts * GetProductionCuts() const
void SetSensitiveDetector(G4VSensitiveDetector *)
void SetMaterial(G4Material *)
G4StepStatus GetStepStatus() const
void SetStepStatus(const G4StepStatus aValue)
void SetVelocity(G4double v)
void SetTouchableHandle(const G4TouchableHandle &apValue)
G4Material * GetMaterial() const
const G4TouchableHandle & GetTouchableHandle() const
void SetMaterialCutsCouple(const G4MaterialCutsCouple *)
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
G4VSensitiveDetector * GetSensitiveDetector() const
G4SteppingControl GetControlFlag() const
G4Track * GetTrack() const
void SetStepLength(G4double value)
void SetNonIonizingEnergyDeposit(G4double value)
G4StepPoint * GetPreStepPoint() const
G4double GetNonIonizingEnergyDeposit() const
G4double GetStepLength() const
G4double GetTotalEnergyDeposit() const
void SetSecondary(G4TrackVector *value)
void SetControlFlag(G4SteppingControl StepControlFlag)
void SetTotalEnergyDeposit(G4double value)
G4StepPoint * GetPostStepPoint() const
void SetTrack(G4Track *value)
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
void SetVelocity(G4double val)
G4VPhysicalVolume * GetVolume() const
const G4ThreeVector & GetPosition() const
G4int GetCurrentStepNumber() const
const G4ThreeVector & GetMomentumDirection() const
G4double CalculateVelocity() const
const G4Step * GetStep() const
G4VPhysicalVolume * GetParallelWorld(const G4String &worldName)
static G4TransportationManager * GetTransportationManager()
G4Navigator * GetNavigatorForTracking() const
G4int ActivateNavigator(G4Navigator *aNavigator)
G4Navigator * GetNavigator(const G4String &worldName)
virtual void Initialize(const G4Track &)
G4LogicalVolume * GetLogicalVolume() const
const G4String & GetName() const
void SetProcessSubType(G4int)
G4VParticleChange * pParticleChange
const G4String & GetProcessName() const
G4bool Hit(G4Step *aStep)