36 #include "G4StepPoint.hh" 40 #include "G4ParticleChange.hh" 43 #include "G4ParticleChange.hh" 44 #include "G4StepPoint.hh" 45 #include "G4FieldTrackUpdator.hh" 125 G4Exception(
"G4ParallelWorldProcess::StartTracking",
127 "G4ParallelWorldProcess is used for tracking without having a parallel world assigned");
149 *(
fpHyperStep->GetPostStepPoint()) = *(trk->GetStep()->GetPostStepPoint());
152 G4StepPoint* realWorldPostStepPoint = trk->GetStep()->GetPostStepPoint();
172 const G4Track&
track,
214 *condition = StronglyForced;
219 const G4Track&
track,
258 G4StepPoint* realWorldPostStepPoint =
259 ((G4Step*)(track.GetStep()))->GetPostStepPoint();
267 G4double& proposedSafety, G4GPILSelection* selection)
274 *selection = NotCandidateForSelection;
277 if (previousStepSize > 0.)
281 if (currentMinimumStep <= fGhostSafety && currentMinimumStep > 0.)
284 returnedStep = currentMinimumStep;
293 #ifdef G4DEBUG_PARALLEL_WORLD_PROCESS 297 if( localVerb == 1 ) {
299 }
else if( localVerb > 1 ) {
300 G4cout <<
"----------------------------------------------" <<
G4endl;
301 G4cout <<
" ParallelWorldProcess: field Track set to : " <<
G4endl;
302 G4cout <<
"----------------------------------------------" <<
G4endl;
304 G4cout <<
"----------------------------------------------" <<
G4endl;
312 endTrack,track.GetVolume());
325 *selection = CandidateForSelection;
328 returnedStep *= (1.0 + 1.0e-9);
339 const G4Track&
track,
const G4Step& )
350 fGhostStep->SetStepLength(step.GetStepLength());
351 fGhostStep->SetTotalEnergyDeposit(step.GetTotalEnergyDeposit());
352 fGhostStep->SetNonIonizingEnergyDeposit(step.GetNonIonizingEnergyDeposit());
353 fGhostStep->SetControlFlag(step.GetControlFlag());
366 G4StepStatus prevStatHyp =
fpHyperStep->GetPostStepPoint()->GetStepStatus();
370 fpHyperStep->SetTotalEnergyDeposit(step.GetTotalEnergyDeposit());
371 fpHyperStep->SetNonIonizingEnergyDeposit(step.GetNonIonizingEnergyDeposit());
372 fpHyperStep->SetControlFlag(step.GetControlFlag());
375 *(
fpHyperStep->GetPostStepPoint()) = *(step.GetPostStepPoint());
377 fpHyperStep->GetPreStepPoint()->SetStepStatus(prevStatHyp);
381 {
fpHyperStep->GetPostStepPoint()->SetStepStatus(fGeomBoundary); }
386 if(realWorldStepPoint->GetStepStatus()==fWorldBoundary)
return;
399 if(ghostProdCuts) prodCuts = ghostProdCuts;
407 realWorldStepPoint->SetMaterialCutsCouple(ghostMCCouple);
409 fpHyperStep->GetPostStepPoint()->SetMaterial(ghostMaterial);
410 fpHyperStep->GetPostStepPoint()->SetMaterialCutsCouple(ghostMCCouple);
414 G4cout <<
"!!! MaterialCutsCouple is not found for " 416 <<
" Material in real world (" 417 << realWorldStepPoint->GetMaterial()->GetName()
418 <<
") is used." <<
G4endl;
430 if(partName==
"opticalphoton")
return false;
431 if(partName==
"geantino")
return false;
432 if(partName==
"chargedgeantino")
return false;
436 if(pdgCode==22)
return false;
437 if(pdgCode==11)
return false;
438 if(pdgCode==2212)
return false;
439 if(pdgCode==-12)
return false;
440 if(pdgCode==12)
return false;
441 if(pdgCode==-14)
return false;
442 if(pdgCode==14)
return false;
443 if(pdgCode==-16)
return false;
444 if(pdgCode==16)
return false;
void PrepareNewTrack(const G4ThreeVector &position, const G4ThreeVector &direction, G4VPhysicalVolume *massStartVol=0)
static G4PathFinder * GetInstance()
G4double condition(const G4ErrorSymMatrix &m)
void CopyStep(const G4Step &step)
G4TouchableHandle CreateTouchableHandle(G4int navId) const
G4VParticleChange * AtRestDoIt(const G4Track &, const G4Step &)
void StartTracking(G4Track *)
G4bool IsAtRestRequired(G4ParticleDefinition *)
G4Material * GetMaterial() const
virtual ~G4ParallelWorldProcess()
G4double PostStepGetPhysicalInteractionLength(const G4Track &, G4double, G4ForceCondition *)
G4VPhysicalVolume * fGhostWorld
G4TouchableHandle fNewGhostTouchable
G4Navigator * fGhostNavigator
static G4ParallelWorldProcessStore * GetInstance()
static G4int GetHypNavigatorID()
void SetParallelWorld(G4String parallelWorldName)
const G4String & GetProcessName() const
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
static G4ThreadLocal G4int nParallelWorlds
G4int GetPDGEncoding() const
G4bool layeredMaterialFlag
G4double AtRestGetPhysicalInteractionLength(const G4Track &, G4ForceCondition *)
G4StepPoint * fGhostPostStepPoint
static G4ThreadLocal G4int fNavIDHyp
G4PathFinder * fPathFinder
void SetParallelWorld(G4ParallelWorldProcess *proc, G4String parallelWorldName)
G4double ComputeStep(const G4FieldTrack &pFieldTrack, G4double pCurrentProposedStepLength, G4int navigatorId, G4int stepNo, G4double &pNewSafety, ELimited &limitedStep, G4FieldTrack &EndState, G4VPhysicalVolume *currentVolume)
G4bool Hit(G4Step *aStep)
void SetProcessSubType(G4int)
G4Navigator * GetNavigatorForTracking() const
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
G4StepPoint * fGhostPreStepPoint
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static G4TransportationManager * GetTransportationManager()
const G4String & GetName() const
void SwitchMaterial(G4StepPoint *)
static G4ProductionCutsTable * GetProductionCutsTable()
G4VPhysicalVolume * GetParallelWorld(const G4String &worldName)
G4int ActivateNavigator(G4Navigator *aNavigator)
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &)
G4Navigator * GetNavigator(const G4String &worldName)
G4VParticleChange aDummyParticleChange
G4VParticleChange * pParticleChange
G4Region * GetRegion() const
G4VSensitiveDetector * GetSensitiveDetector() const
void SetPushVerbosity(G4bool mode)
G4ParallelWorldProcess(const G4String &processName="ParaWorld", G4ProcessType theType=fParallel)
G4ProductionCuts * GetProductionCuts() const
G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
G4double AlongStepGetPhysicalInteractionLength(const G4Track &, G4double, G4double, G4double &, G4GPILSelection *)
G4TouchableHandle fOldGhostTouchable
virtual G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4double pProposedMaxLength=DBL_MAX, const G4bool keepState=true)
G4LogicalVolume * GetLogicalVolume() const
const G4String & GetName() const
static G4ThreadLocal G4Step * fpHyperStep
G4TransportationManager * fTransportationManager
const std::vector< G4double > & GetProductionCuts() const
static const G4Step * GetHyperStep()
void SetMaterial(const G4Material *)