Skip to content

Directly offload to optical TrackingManager for validation/testing #2103

@sethrj

Description

@sethrj

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 OffloadInterface 2 with another interface class TrackOffloadInterface, maybe rename LocalOpticalOffload to LocalOpticalGenOffload, add LocalOpticalTrackOffload that subclasses TrackOffloadInterface
  • Update celeritas::TrackingManager to take a TrackOffloadInterface rather than the EM-specific one
  • Update TrackingManagerConstructor so that instead of its LocalTransporterFromThread function returning integration.local_transporter(), it will return integration.optical_offload if the opts.offload_particles is 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

  1. 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.

  2. Speaking of names, this might be a good time to rename LocalTransporter to LocalOffload (and perhaps alias to LocalEmOffload for the time being since we don't support hadrons)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestexternalDependencies and framework-oriented featuresphysicsParticles, processes, and stepping algorithms

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions