52 G4Step* G4ParallelWorldProcess::fpHyperStep = 0;
53 G4int G4ParallelWorldProcess::nParallelWorlds = 0;
54 G4int G4ParallelWorldProcess::fNavIDHyp = 0;
56 {
return fpHyperStep; }
62 :
G4VProcess(processName,theType), fGhostNavigator(0), fNavigatorID(-1),
63 fFieldTrack(
'0'),layeredMaterialFlag(false)
65 if(!fpHyperStep) fpHyperStep =
new G4Step();
66 iParallelWorld = ++nParallelWorlds;
88 if(nParallelWorlds==0)
98 fGhostWorldName = parallelWorldName;
100 fGhostNavigator = fTransportationManager->
GetNavigator(fGhostWorld);
107 fGhostWorldName = parallelWorld->
GetName();
108 fGhostWorld = parallelWorld;
109 fGhostNavigator = fTransportationManager->
GetNavigator(fGhostWorld);
119 G4Exception(
"G4ParallelWorldProcess::StartTracking",
121 "G4ParallelWorldProcess is used for tracking without having a parallel world assigned");
127 fNewGhostTouchable = fOldGhostTouchable;
144 if(layeredMaterialFlag)
147 SwitchMaterial(realWorldPostStepPoint);
183 fNewGhostTouchable = fOldGhostTouchable;
195 aSD->
Hit(fGhostStep);
229 fNewGhostTouchable = fOldGhostTouchable;
250 if(layeredMaterialFlag)
254 SwitchMaterial(realWorldPostStepPoint);
271 if (previousStepSize > 0.)
272 { fGhostSafety -= previousStepSize; }
273 if (fGhostSafety < 0.) fGhostSafety = 0.0;
275 if (currentMinimumStep <= fGhostSafety && currentMinimumStep > 0.)
278 returnedStep = currentMinimumStep;
280 proposedSafety = fGhostSafety - currentMinimumStep;
287 = fPathFinder->
ComputeStep(fFieldTrack,currentMinimumStep,fNavigatorID,
293 fGhostSafety = fGhostNavigator->
ComputeSafety(endTrack.GetPosition());
299 proposedSafety = fGhostSafety;
304 returnedStep *= (1.0 + 1.0e-9);
309 if(iParallelWorld==nParallelWorlds) fNavIDHyp = 0;
321 void G4ParallelWorldProcess::CopyStep(
const G4Step & step)
340 if(iParallelWorld==1)
360 void G4ParallelWorldProcess::SwitchMaterial(
G4StepPoint* realWorldStepPoint)
375 if(ghostProdCuts) prodCuts = ghostProdCuts;
390 G4cout <<
"!!! MaterialCutsCouple is not found for "
392 <<
" Material in real world ("
394 <<
") is used." <<
G4endl;
406 if(partName==
"opticalphoton")
return false;
407 if(partName==
"geantino")
return false;
408 if(partName==
"chargedgeantino")
return false;
412 if(pdgCode==22)
return false;
413 if(pdgCode==11)
return false;
414 if(pdgCode==2212)
return false;
415 if(pdgCode==-12)
return false;
416 if(pdgCode==12)
return false;
417 if(pdgCode==-14)
return false;
418 if(pdgCode==14)
return false;
419 if(pdgCode==-16)
return false;
420 if(pdgCode==16)
return false;