DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Geant4PythonDetectorConstruction.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 Markus Frank
11 // \date 2015-11-03
12 //
13 //==========================================================================
14 #ifndef DDG4_PYTHON_GEANT4PYTHONDETECTORCONSTRUCTION_H
15 #define DDG4_PYTHON_GEANT4PYTHONDETECTORCONSTRUCTION_H
16 
17 // Framework include files
20 
22 namespace dd4hep {
23 
25  namespace sim {
26 
28 
64  protected:
72  void exec(const std::string& desc, const Geant4PythonCall& cmd) const;
73 
74  public:
76  Geant4PythonDetectorConstruction(Geant4Context* c, const std::string& nam);
80  void setConstructGeo(PyObject* callable, PyObject* args);
82  void setConstructField(PyObject* callable, PyObject* args);
84  void setConstructSensitives(PyObject* callable, PyObject* args);
86  virtual void constructGeo(Geant4DetectorConstructionContext* ctxt) override;
88  virtual void constructField(Geant4DetectorConstructionContext* ctxt) override;
90  virtual void constructSensitives(Geant4DetectorConstructionContext* ctxt) override;
91 
92  };
93  } // End namespace sim
94 } // End namespace dd4hep
95 #endif // DDG4_PYTHON_GEANT4PYTHONDETECTORCONSTRUCTION_H
dd4hep::sim::Geant4PythonDetectorConstruction
Base class to initialize a multi-threaded or single threaded Geant4 application.
Definition: Geant4PythonDetectorConstruction.h:63
Geant4DetectorConstruction.h
dd4hep::sim::Geant4PythonDetectorConstruction::exec
void exec(const std::string &desc, const Geant4PythonCall &cmd) const
Execute command in the python interpreter.
Definition: Geant4PythonDetectorConstruction.cpp:51
dd4hep::sim::Geant4PythonDetectorConstruction::m_constructSD
Geant4PythonCall m_constructSD
Sensitive detector initialization command. Default: empty.
Definition: Geant4PythonDetectorConstruction.h:66
dd4hep::sim::Geant4PythonDetectorConstruction::constructField
virtual void constructField(Geant4DetectorConstructionContext *ctxt) override
Electromagnetic field construction callback. Called at "ConstructSDandField()".
Definition: Geant4PythonDetectorConstruction.cpp:69
dd4hep::sim::Geant4PythonDetectorConstruction::setConstructSensitives
void setConstructSensitives(PyObject *callable, PyObject *args)
Set the sensitive detector initialization command.
Definition: Geant4PythonDetectorConstruction.cpp:46
dd4hep::sim::Geant4PythonDetectorConstruction::m_constructFLD
Geant4PythonCall m_constructFLD
Field initialization command. Default: empty.
Definition: Geant4PythonDetectorConstruction.h:68
dd4hep::sim::Geant4PythonDetectorConstruction::setConstructGeo
void setConstructGeo(PyObject *callable, PyObject *args)
Set the Detector initialization command.
Definition: Geant4PythonDetectorConstruction.cpp:36
dd4hep::sim::Geant4PythonDetectorConstruction::setConstructField
void setConstructField(PyObject *callable, PyObject *args)
Set the field initialization command.
Definition: Geant4PythonDetectorConstruction.cpp:41
dd4hep::sim::Geant4PythonDetectorConstruction::~Geant4PythonDetectorConstruction
virtual ~Geant4PythonDetectorConstruction()
Default destructor.
Definition: Geant4PythonDetectorConstruction.h:78
dd4hep::sim::Geant4DetectorConstructionContext
Geant4 detector construction context definition.
Definition: Geant4DetectorConstruction.h:61
dd4hep::sim::Geant4PythonCall
Base class to initialize a multi-threaded or single threaded Geant4 application.
Definition: Geant4PythonCall.h:32
dd4hep::sim::Geant4PythonDetectorConstruction::m_constructGEO
Geant4PythonCall m_constructGEO
Geometry initialization command. Default: empty.
Definition: Geant4PythonDetectorConstruction.h:70
dd4hep::sim::Geant4PythonDetectorConstruction::constructSensitives
virtual void constructSensitives(Geant4DetectorConstructionContext *ctxt) override
Sensitive detector construction callback. Called at "ConstructSDandField()".
Definition: Geant4PythonDetectorConstruction.cpp:76
dd4hep::sim::Geant4PythonDetectorConstruction::constructGeo
virtual void constructGeo(Geant4DetectorConstructionContext *ctxt) override
Geometry construction callback. Called at "Construct()".
Definition: Geant4PythonDetectorConstruction.cpp:61
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
Geant4PythonCall.h
dd4hep::sim::Geant4PythonDetectorConstruction::Geant4PythonDetectorConstruction
Geant4PythonDetectorConstruction(Geant4Context *c, const std::string &nam)
Standard constructor.
Definition: Geant4PythonDetectorConstruction.cpp:28
dd4hep::sim::Geant4DetectorConstruction
Basic implementation of the Geant4 detector construction action.
Definition: Geant4DetectorConstruction.h:102
dd4hep::sim::Geant4Context
Generic context to extend user, run and event information.
Definition: Geant4Context.h:201