Celeritas is a new Monte Carlo transport code designed to accelerate scientific discovery in high energy physics by improving detector simulation throughput and energy efficiency using GPUs.
Geant4 stores potentially different weights for the pre- and post-step points of a G4Step, and sensitive detectors may use both weights depending on their exact use case. Before a G4Step is passed to any sensitive detector, its associated G4Track is updated via G4Step::UpdateTrack() such that the track weight is set to that of the post-step point (see G4SteppingManager::Stepping and similar).
1270 added support for setting the weight of reconstituted G4Tracks but https://github.com/drbenmorgan/celer-adept/issues/4 shows that this does not work for sensitive detectors that consider step point weights as well. The changes here are a minor refactor of that to follow Geant4's pattern of setting step point weights with propagation of the post-step weight to the track. It should also allow easier support for non-uniform weights in future.
No change to #1270's expectation of incoming track weights being unity is required as this is still perfectly valid.
Geant4 stores potentially different weights for the pre- and post-step points of a
G4Step
, and sensitive detectors may use both weights depending on their exact use case. Before aG4Step
is passed to any sensitive detector, its associatedG4Track
is updated viaG4Step::UpdateTrack()
such that the track weight is set to that of the post-step point (seeG4SteppingManager::Stepping
and similar).1270 added support for setting the weight of reconstituted
G4Track
s but https://github.com/drbenmorgan/celer-adept/issues/4 shows that this does not work for sensitive detectors that consider step point weights as well. The changes here are a minor refactor of that to follow Geant4's pattern of setting step point weights with propagation of the post-step weight to the track. It should also allow easier support for non-uniform weights in future.No change to #1270's expectation of incoming track weights being unity is required as this is still perfectly valid.