Hi @mkelsey,
Thank you so much for responding so quickly!
To check my understanding: does this mean that there is a list of processes (perhaps a G4ProcessVector
) from which the program chooses from to determine how to calculate the step, with the choice depending on how the particle will move between volumes and the types of interactions it may have when doing so?
I notice upon running an adapted version of some methods from the OpNovice2 example within my stepping action:
G4OpBoundaryProcessStatus theStatus = Undefined;
G4ProcessManager* OpManager =
G4OpticalPhoton::OpticalPhoton()->GetProcessManager();
G4int MAXofPostStepLoops =
OpManager->GetPostStepProcessVector()->entries();
G4ProcessVector* postStepDoItVector =
OpManager->GetPostStepProcessVector(typeDoIt);
G4StepPoint* endPoint = theStep->GetPostStepPoint();
G4cout << "/////////////////////////////////////////////////////////////////////" << endl;
G4cout << "Beginning of OpBoundaryProcess Statuses" << endl;
for (G4int i=0; i<MAXofPostStepLoops; ++i)
{
G4VProcess* currentProcess = (*postStepDoItVector)[i];
G4OpBoundaryProcess* opProc =
dynamic_cast<G4OpBoundaryProcess*>(currentProcess);
endPoint = theStep->GetPostStepPoint();
//G4cout << currentProcess->GetProcessName() << " at endpoint = " << endPoint->GetPosition() << endl;
G4cout << currentProcess->GetProcessName() << endl;
if (opProc)
{
theStatus = opProc->GetStatus();
G4cout << "Choosen Process = " << currentProcess->GetProcessName() << endl;
if(theStatus == Undefined) G4cout << "Boundary Process = Undefined" << endl;
else if(theStatus == Transmission) G4cout << "Boundary Process = Transmission" << endl;
else if(theStatus == FresnelRefraction) G4cout << "Boundary Process = Fresnel Refraction" << endl;
else if(theStatus == FresnelReflection) G4cout << "Boundary Process = Fresnel Reflection" << endl;
else if(theStatus == TotalInternalReflection) G4cout << "Boundary Process = Total Internal Reflection" << endl;
else if(theStatus == LambertianReflection) G4cout << "Boundary Process = Lambertian Reflection" << endl;
else if(theStatus == LobeReflection) G4cout << "Boundary Process = Lobe Reflection" << endl;
else if(theStatus == SpikeReflection) G4cout << "Boundary Process = Spike Reflection" << endl;
else if(theStatus == BackScattering) G4cout << "Boundary Process = Back Scattering" << endl;
else if(theStatus == Absorption) G4cout << "Boundary Process = Absorption" << endl;
else if(theStatus == Detection) G4cout << "Boundary Process = Detection" << endl;
else if(theStatus == NotAtBoundary) G4cout << "Boundary Process = Not At Boundary" << endl;
else if(theStatus == SameMaterial) G4cout << "Boundary Process = Same Material" << endl;
else if(theStatus == StepTooSmall) G4cout << "Boundary Process = Step Too Small" << endl;
else G4cout << "The status = " << theStatus << endl;
G4cout << endl;
}
}
G4cout << "End of OpBoundaryProcess Statuses" << endl;
G4cout << "/////////////////////////////////////////////////////////////////////" << endl;
/////////////////////////////////////////////////////////////////////
G4cout << "/////////////////////////////////////////////////////////////////////" << endl;
G4cout << "Beginning of ProcessDefinedStep Process Names" << endl;
endPoint = theStep->GetPostStepPoint();
//G4StepPoint* endPoint = theStep->GetPostStepPoint();
const G4VProcess* pds = endPoint->GetProcessDefinedStep();
G4cout << "Endpoint = " << endPoint->GetPosition() << endl;
if(pds->GetProcessName()) G4cout << pds->GetProcessName() << endl;
G4cout << "End of ProcessDefinedStep Process Names" << endl;
G4cout << "/////////////////////////////////////////////////////////////////////" << endl;
I get an output of:
/////////////////////////////////////////////////////////////////////
Beginning of OpBoundaryProcess Statuses
Transportation
OpAbsorption
OpRayleigh
OpMieHG
OpWLS
OpBoundary
Choosen Process = OpBoundary
Boundary Process = Fresnel Refraction
End of OpBoundaryProcess Statuses
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
Beginning of ProcessDefinedStep Process Names
Endpoint = (402.4,1.2948,-6.55091)
Transportation
End of ProcessDefinedStep Process Names
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
Beginning of OpBoundaryProcess Statuses
Transportation
OpAbsorption
OpRayleigh
OpMieHG
OpWLS
OpBoundary
Choosen Process = OpBoundary
Boundary Process = Fresnel Refraction
End of OpBoundaryProcess Statuses
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
Beginning of ProcessDefinedStep Process Names
Endpoint = (402.4,1.2948,-6.55091)
OpAbsorption
End of ProcessDefinedStep Process Names
/////////////////////////////////////////////////////////////////////
I included two steps. It seems as though, like I think you are saying there are a list of potential processes (Transportation, OpAbsorption, OpRayleigh, OpMieHG, OpWLS, OpBoundary), which is the same for every step, and from which the process OpBoundary is selected (this occurs at a boundary in my geometry, so that makes sense), and then either Transportation or OpAbsorption is returned by the ProcessDefinedStep.
With regards to what is returned from the use of: pds->GetProcessName
, which is the ProcessDefinedStep(), in the first step shown the optical photon travels through a volume of glass, combination of OpBoundary (OpBoundaryProcess status) and Transportation (ProcessDefinedStep process name), and then in the second step the photon reaches a photocathode material and is absorbed, OpBoundary (OpBoundaryProcess status) and OpAbsorption (ProcessDefinedStep process name).
Is the process returned by the ProcessDefinedStep determined after OpBoundaryProcess one? Is what is returned for a ProcessDefinedStep, the process that was used to calculate that step or something else?
I know this is a lot and I am very appreciative of your help and time with this! You all have been very helpful!
-Frank