110 G4Track* theTrack = theStep->GetTrack();
111 auto trackInformation =
114 G4StepPoint* thePrePoint = theStep->GetPreStepPoint();
115 G4StepPoint* thePostPoint = theStep->GetPostStepPoint();
125 thePrePVname = thePrePV->GetName();
126 thePostPVname = thePostPV->GetName();
131 if(theTrack->GetParentID() == 0)
134 if(theTrack->GetCurrentStepNumber() == 1)
146 G4OpBoundaryProcessStatus theStatus = Undefined;
149 G4OpticalPhoton::OpticalPhoton()->GetProcessManager();
153 G4int nproc = OpManager->GetPostStepProcessVector()->entries();
155 OpManager->GetPostStepProcessVector(typeDoIt);
157 for(G4int i = 0; i < nproc; ++i)
159 G4VProcess* fCurrentProcess = (*fPostStepDoItVector)[i];
171 (theStatus == TotalInternalReflection || theStatus == FresnelReflection ||
172 theStatus == FresnelRefraction) &&
175 G4double px = theTrack->GetVertexMomentumDirection().x();
176 G4double py = theTrack->GetVertexMomentumDirection().y();
177 G4double x = theTrack->GetPosition().x();
178 G4double y = theTrack->GetPosition().y();
183 fInitGamma / std::sqrt(px * px + py * py) / std::sqrt(x * x + y * y);
208 case FresnelRefraction:
212 if(thePostPVname ==
"WLSFiber" || thePostPVname ==
"Clad1" ||
213 thePostPVname ==
"Clad2")
232 trackInformation->SetExitPosition(theTrack->GetPosition());
241 trackInformation->SetExitPosition(theTrack->GetPosition());
247 case TotalInternalReflection:
254 theTrack->SetTrackStatus(fStopAndKill);
255 trackInformation->AddStatusFlag(
murderee);
257 G4cout <<
"\n Bounce Limit Exceeded" << G4endl;
262 case FresnelReflection:
267 if(thePrePVname ==
"WLSFiber")
272 else if(thePrePVname ==
"Clad1")
277 else if(thePrePVname ==
"Clad2")
292 theStatus == TotalInternalReflection)
294 theTrack->SetTrackStatus(fStopAndKill);
295 trackInformation->AddStatusFlag(
murderee);
305 case LambertianReflection:
307 case SpikeReflection:
311 if(thePostPVname ==
"Mirror")
324 theTrack->SetTrackStatus(fStopAndKill);
332 if(theTrack->GetTrackStatus() != fAlive &&