DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Geant4GeneratorWrapper.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 
24 #ifndef DDG4_GEANT4GENERATORWRAPPER_H
25 #define DDG4_GEANT4GENERATORWRAPPER_H
26 
27 // Framework include files
29 
30 // Forward declarations
31 class G4VPrimaryGenerator;
32 
33 
35 namespace dd4hep {
36 
38  namespace sim {
39 
41 
48  protected:
50  std::string m_generatorType;
52  int m_mask { 1 };
53 
55  G4VPrimaryGenerator* m_generator { nullptr };
56 
57  public:
59  Geant4GeneratorWrapper(Geant4Context* context, const std::string& nam);
63  G4VPrimaryGenerator* generator();
65  virtual void operator()(G4Event* event) override;
66  };
67  } // End namespace sim
68 } // End namespace dd4hep
69 
70 #endif // DDG4_GEANT4GENERATORWRAPPER_H
dd4hep::sim::Geant4GeneratorWrapper::Geant4GeneratorWrapper
Geant4GeneratorWrapper(Geant4Context *context, const std::string &nam)
Standard constructor.
Geant4GeneratorWrapper
Wrap native G4 particle ganerators like the generic particle source etc.
dd4hep::sim::Geant4GeneratorWrapper::m_mask
int m_mask
Property: interaction identifier mask. name: "Mask".
Definition: Geant4GeneratorWrapper.h:52
dd4hep::sim::Geant4GeneratorWrapper::~Geant4GeneratorWrapper
virtual ~Geant4GeneratorWrapper()
Default destructor.
dd4hep::sim::Geant4GeneratorWrapper::m_generator
G4VPrimaryGenerator * m_generator
Reference to the implementation instance.
Definition: Geant4GeneratorWrapper.h:55
Geant4GeneratorAction.h
dd4hep::sim::Geant4GeneratorAction
Concrete implementation of the Geant4 generator action base class.
Definition: Geant4GeneratorAction.h:47
dd4hep::sim::Geant4GeneratorWrapper::operator()
virtual void operator()(G4Event *event) override
Event generation action callback.
dd4hep::sim::Geant4GeneratorWrapper::generator
G4VPrimaryGenerator * generator()
Access the G4VPrimaryGenerator instance.
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::sim::Geant4GeneratorWrapper::m_generatorType
std::string m_generatorType
Property: Type name of the implementation instance. name: "Uses".
Definition: Geant4GeneratorWrapper.h:50
dd4hep::sim::Geant4Context
Generic context to extend user, run and event information.
Definition: Geant4Context.h:201
dd4hep::sim::Geant4Action::context
Geant4Context * context() const
Access the context.
Definition: Geant4Action.h:270