Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-07 10:12:42

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 ddceler/CelerPhysics.hh
0006 //---------------------------------------------------------------------------//
0007 #pragma once
0008 
0009 #include <string>
0010 #include <vector>
0011 #include <CeleritasG4.hh>
0012 #include <DDG4/Geant4Action.h>
0013 #include <DDG4/Geant4PhysicsList.h>
0014 #include <G4VModularPhysicsList.hh>
0015 
0016 namespace celeritas
0017 {
0018 namespace dd
0019 {
0020 //---------------------------------------------------------------------------//
0021 /*!
0022  * DDG4 action plugin for Celeritas tracking manager integration (TMI).
0023  */
0024 class CelerPhysics final : public dd4hep::sim::Geant4PhysicsList
0025 {
0026   public:
0027     // Standard constructor
0028     CelerPhysics(dd4hep::sim::Geant4Context* ctxt, std::string const& name);
0029 
0030     // Delete copy/move
0031     DDG4_DEFINE_ACTION_CONSTRUCTORS(CelerPhysics);
0032 
0033     // constructPhysics callback
0034     virtual void constructPhysics(G4VModularPhysicsList* physics) final;
0035 
0036   private:
0037     int max_num_tracks_{0};
0038     int init_capacity_{0};
0039     std::vector<std::string> ignore_processes_;
0040     std::string field_map_file_;
0041     std::string field_map_type_{"cartesian"};
0042 
0043     // Make options for Celeritas tracking manager
0044     SetupOptions make_options();
0045 };
0046 
0047 //---------------------------------------------------------------------------//
0048 }  // namespace dd
0049 }  // namespace celeritas