Plug-ins¶
Celeritas can run as a plugin to different integrated frameworks.
LArSoft for DUNE¶
Celeritas provides interfaces for running optical photon transport within the
LArSoft framework, an integral component of the DUNE software stack.
Celeritas builds the PDFullSimCeler module to process optical photons from
scintillation.
It requires a ROOT file with art::Event inputs that have
sim::SimEnergyDeposit object data from the IonAndScint producer,
exactly as the current PDFastSimPAR module in LArSoft.
The PDFullSimCeler module enables replacing the map-based method for
generating the scintillation-to-detector response with full Monte Carlo optical
tracking.
Once Celeritas has been installed (see UPS for LArSoft), load the module/library/FHICL paths provided by Celeritas in its install directory (or build directory if doing development):
$ eval $($CELER_DIR/bin/larceler-env)
Loaded Celeritas at $CELER_DIR
Then you should be able to include Celeritas components including its photon detector replacement and analysis modules.
#include "PDFullSimCeler.fcl"
#include "standard_g4_dune10kt_1x2x6.fcl"
dunefd_pdfullsim_cpu: {
@table::PDFullSimCeler
}
# Use Celeritas full sim configuration
physics.producers.PDFastSim: @local::dunefd_pdfullsim_cpu
PDFullSimCeler¶
This “producer” module is a replacement for LArSim’s PDFastSimPar using full optical photon simulation on CPU or GPU. It tracks photons from simulated energy deposition steps, which are generated by LArG4 and other modules, and constructs simulated detector hits with metadata about the tracks that caused the hit.
-
class PDFullSimCeler : public art::EDProducer¶
Run optical photons in a standalone simulation.
This plugin implements a replacement for LArSim’s
phot::PDFastSimPARclass. It is instantiated by a FHiCL workflow file with a set of parameters. It takes a vector of energy-depositing steps and returns a vector of detector responses. It is executed after the detector simulation module (ionization, recombination, scintillation, etc.) with a vector of steps that contain local energy deposition.The execution happens after LArG4 is complete, so it is completely independent of the Geant4 run manager and execution. It requires an input GDML with:
Detector geometry description
Bulk optical physics properties (e.g., Rayleigh scattering in argon)
Surface properties (e.g., roughness, reflection probability)
Detector properties (e.g., sensitive volumes, efficiency multipliers)
Note that this module differs substantially from direct Geant4 integration: it operates independently from the Geant4 run manager as a “postprocessing” step in a module after LArG4 runs.
Its configuration options are input via the FHiCL interface:
PDFullSimCeler:
{
module_type: PDFullSimCeler
SimulationLabel: "IonAndScint"
// GPU options
// Activate the GPU
EnableDevice: false
// Per-thread CUDA stack size [B] (ignored if 0; only needed if using vecgeom)
DeviceStackSize: 0
// Global dynamic CUDA heap size [B] (ignored if 0; only needed if using vecgeom)
DeviceHeapSize: 0
// Optical buffer-size capacities
// Max primaries buffered before stepping
OpticalCapacityPrimaries: 8192
// Max track slots stepped simultaneously
OpticalCapacityTracks: 128
// Max queued photon-generation steps
OpticalCapacityGenerators: 32768
// Optical tracking limits (0 = unlimited)
// Steps per track before killing (0 for unlimited)
OpticalLimitSteps: 1024
// Iterations before aborting stepping loop (0 for unlimited)
OpticalLimitStepIters: 4096
// Celeritas output filename
OutputFile: "celeritas-output.json"
// Accumulate elapsed time in actions
ActionTimes: true
// RNG seed
Seed: 0
}
PDFullSimCelerGPU:
{
@table::PDFullSimCeler
EnableDevice: true
OpticalCapacityPrimaries: 16777216
OpticalCapacityTracks: 1048576
OpticalCapacityGenerators: 131072
}
Those options are used during execution time to set up and run a Celeritas optical physics problem.
GeoSimExporter¶
This analysis module exports detector geometry data and energy deposition data for internal testing.
DD4HEP¶
Documentation to be added later.