|
||||
File indexing completed on 2025-01-18 09:55:24
0001 //========================================================================== 0002 // AIDA Detector description implementation 0003 //-------------------------------------------------------------------------- 0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) 0005 // All rights reserved. 0006 // 0007 // For the licensing terms see $DD4hepINSTALL/LICENSE. 0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS. 0009 // 0010 // \author Markus Frank 0011 // \date 2016-01-19 0012 // \version 1.0 0013 // 0014 //========================================================================== 0015 #ifndef DDG4_GEANT4PHYSICSCONSTRUCTOR_H 0016 #define DDG4_GEANT4PHYSICSCONSTRUCTOR_H 1 0017 0018 0019 // Framework include files 0020 #include <DDG4/Geant4PhysicsList.h> 0021 0022 // Geant4 include files 0023 #include <G4ParticleTable.hh> 0024 #include <G4VPhysicsConstructor.hh> 0025 0026 /// Namespace for the AIDA detector description toolkit 0027 namespace dd4hep { 0028 0029 /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit 0030 namespace sim { 0031 0032 /// Implementation base of a Geant4 physics constructor 0033 /** 0034 * Concrete base of a Geant4 physics constructor. 0035 * This class is only useful for constructors, which require 0036 * initialization (and hence instantiation) by the user BEFORE 0037 * the G4 physics list is instantiated. 0038 * 0039 * The instantiation of the physics list is delayed, because 0040 * Geant4 does not like the G4VPhysicsConstructor constructor 0041 * to be called before a physics list is attached to the 0042 * G4RunManager. We overcome this problem through the delayed 0043 * instantiation of a helper object made availible to the client. 0044 * 0045 * \author M.Frank 0046 * \version 1.0 0047 * \ingroup DD4HEP_SIMULATION 0048 */ 0049 class Geant4PhysicsConstructor : public Geant4PhysicsList { 0050 public: 0051 0052 /// Helper class to be used by cleints, by NOT overloaded! 0053 /** 0054 * The concrete instance will be instantiated by the framework in due time! 0055 * Clients NEVER call the constructor directly 0056 * 0057 * \author M.Frank 0058 * \version 1.0 0059 * \ingroup DD4HEP_SIMULATION 0060 */ 0061 class Constructor : virtual public G4VPhysicsConstructor { 0062 protected: 0063 /// Initializing constructor dealing with the callbacks 0064 Constructor(); 0065 /// Default destructor 0066 virtual ~Constructor(); 0067 public: 0068 /// Access to a fresh (resetted) instance of the particle table iterator 0069 virtual G4ParticleTable::G4PTblDicIterator* particleIterator() const = 0; 0070 }; 0071 0072 protected: 0073 /// Physics type (Default: 0) 0074 int m_type; 0075 public: 0076 /// Standard constructor with initailization parameters 0077 Geant4PhysicsConstructor(Geant4Context* context, const std::string& nam); 0078 /// Default destructor 0079 virtual ~Geant4PhysicsConstructor(); 0080 /// constructPhysics callback 0081 virtual void constructPhysics(G4VModularPhysicsList* physics); 0082 /// Callback to construct processes (uses the G4 particle table) 0083 virtual void constructProcess(Constructor& ctor); 0084 /// Callback to construct particles 0085 virtual void constructParticle(Constructor& ctor); 0086 }; 0087 0088 } // End namespace sim 0089 } // End namespace dd4hep 0090 0091 #endif // DDG4_GEANT4PHYSICSCONSTRUCTOR_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |