You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to/broken out of #1351 on the general support for optical boundary processes.
Geant4's G4OpBoundaryProcess class provides a capability for user code to use the Sensitive Detector mechanism to score optical photons that are totally absorbed on a given optical surface. Celeritas should support this capability too, and a first implementation could be to follow what was done with EM scoring by sending G4Steps of absorbed photons back to the host and passing them to the appropriate user-defined sensitive detectors on the host. It's assumed here that diagnostic like information like number of steps, process counts, etc will be handled internally by Celeritas.
The basic algorithm used in Geant4 is within G4OpBoundaryProcess::PostStepDoIt with the key parts being (omitting quite a bit of detail!):
Right at the end of PostStepDoIt, if the photon's status is G4OpBoundaryProcessStatus::Detection, then G4OpBoundaryProcess::InvokeSD is called with the photon's G4Step
This adds the photon energy to the step's local energy deposition, then
Determines if the post step point has a Sensitive Detector (i.e. the Logical Volume of the post step point), calling its Hit member function if so.
That's pretty straightforward/obvious, but with some things to note (which we've also discussed today):
It's not completely clear where the post step point is following a photon being Detectioned(!). We want to check this as it will impact how/where we look for attached sensitive detectors.
I'll put together a minimal G4 app to confirm what happens here.
In StepGatherExecutor.h, StepPoint::pre is used. This might be made configurable.
Related to/broken out of #1351 on the general support for optical boundary processes.
Geant4's
G4OpBoundaryProcess
class provides a capability for user code to use the Sensitive Detector mechanism to score optical photons that are totally absorbed on a given optical surface. Celeritas should support this capability too, and a first implementation could be to follow what was done with EM scoring by sendingG4Step
s of absorbed photons back to the host and passing them to the appropriate user-defined sensitive detectors on the host. It's assumed here that diagnostic like information like number of steps, process counts, etc will be handled internally by Celeritas.The basic algorithm used in Geant4 is within
G4OpBoundaryProcess::PostStepDoIt
with the key parts being (omitting quite a bit of detail!):G4OpBoundaryProcess::DoAbsorption
when the photon is going to be absorbed on the surface.G4OpBoundaryProcessStatus::Detection
, and marks the track asfStopAndKill
.PostStepDoIt
, if the photon's status isG4OpBoundaryProcessStatus::Detection
, thenG4OpBoundaryProcess::InvokeSD
is called with the photon'sG4Step
Hit
member function if so.That's pretty straightforward/obvious, but with some things to note (which we've also discussed today):
Detection
ed(!). We want to check this as it will impact how/where we look for attached sensitive detectors.StepGatherExecutor.h
,StepPoint::pre
is used. This might be made configurable.This'll probably also need some follow up with experiments to see how they've implemented optical photon scoring. It's also demonstrated in Geant4 through the stepping action invoking the SD itself, e.g.: https://gitlab.cern.ch/geant4/geant4/-/blob/geant4-11.2-release/examples/extended/optical/LXe/src/LXeSteppingAction.cc?ref_type=heads#L198
The text was updated successfully, but these errors were encountered: