Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-07 09:43:35

0001 //------------------------------- -*- C++ -*- -------------------------------//
0002 // Copyright Celeritas contributors: see top-level COPYRIGHT file for details
0003 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
0004 //---------------------------------------------------------------------------//
0005 //! \file accel/gen/ScintillationOffload.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include <G4Scintillation.hh>
0010 
0011 namespace celeritas
0012 {
0013 //---------------------------------------------------------------------------//
0014 /*!
0015  * A replacement for Geant4's \c G4Scintillation process which constructs \c
0016  * GeneratorDistributionData from a \c PostStepDoIt call.
0017  *
0018  * This process should have stacking photons set to false so that photons are
0019  * not initialized in Geant4.
0020  */
0021 class ScintillationOffload : public G4Scintillation
0022 {
0023   public:
0024     // Prepare physics table for particle and enforce photon stacking
0025     void PreparePhysicsTable(G4ParticleDefinition const&) override;
0026 
0027     // Create a generator distribution for the given track and step
0028     G4VParticleChange* PostStepDoIt(G4Track const& aTrack,
0029                                     G4Step const& aStep) override;
0030 
0031     // Create a generator distribution for the given track and step
0032     G4VParticleChange* AtRestDoIt(G4Track const& aTrack,
0033                                   G4Step const& aStep) override;
0034 };
0035 
0036 //---------------------------------------------------------------------------//
0037 }  // namespace celeritas