-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Add support for using the existing tracking manager (and integration) to offload optical photons directly from Geant4 into the optical tracking loop.
Suggested approach:
- Add an optical primary generator1 that stores a vector of initial states (position, direction, wavelength) as aux data, and the "generator" instantiates tracks from those. @hhollenb will create this by adapting from his unit test.
- Subclass the
OffloadInterface2 with another interface classTrackOffloadInterface, maybe renameLocalOpticalOffloadtoLocalOpticalGenOffload, addLocalOpticalTrackOffloadthat subclassesTrackOffloadInterface - Update
celeritas::TrackingManagerto take aTrackOffloadInterfacerather than the EM-specific one - Update
TrackingManagerConstructorso that instead of itsLocalTransporterFromThreadfunction returningintegration.local_transporter(), it will returnintegration.optical_offloadif theopts.offload_particlesis set to optical photons - For now the optical params setup can create generators for optical, cherenkov, and the "primary"; but as an optimization we should only create for the modes that are supported (done in the constructor of the different OffloadInterface subclasses)
I will definitely need @amandalund's view of whether this is sensible and fits into our structure without too much hassle, and I will get #2099 and company reviewed pronto.
Footnotes
-
Our names for this are really confusing right now because of how the primaries/initialzers/generators/optical generators have evolved. I think "generator" is what we should name an object/action that creates tracks/initializers. I hesitate to use "primary" at all because an optical photon could have many "primaries" (suppose that we have a photon that came from a wavelength shifted photon, which came from a scintillation photon, which came from an EM track secondary in Celeritas, which came from an EM particle offloaded from Geant4, which came from an actual hadronic primary.) The current "optical primary generator" should perhaps be a "general distribution generator" or something. ↩
-
Speaking of names, this might be a good time to rename
LocalTransportertoLocalOffload(and perhaps alias toLocalEmOffloadfor the time being since we don't support hadrons) ↩