DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Classes | Namespaces | Macros
Factories.h File Reference
#include <DDG4/Defs.h>
#include <DD4hep/Plugins.h>
#include <DD4hep/Printout.h>
#include <DD4hep/Factories.h>
#include <DD4hep/Primitives.h>
#include <string>
#include <map>

Go to the source code of this file.

Classes

class  dd4hep::Geant4SetupAction< T >
 Templated factory method to invoke setup action. More...
 
class  dd4hep::Geant4SensitiveDetectorFactory< T >
 Deprecated: Templated factory method to create sensitive detector. More...
 
class  dd4hep::Geant4MaterialFactory< T >
 Templated factory method to G4ExtendedMaterial objects. More...
 
class  dd4hep::Geant4LogicalVolumeFactory< T >
 Templated factory method to G4ExtendedMaterial objects. More...
 

Namespaces

 dd4hep
 Namespace for the AIDA detector description toolkit.
 
 dd4hep::detail
 DD4hep internal namespace.
 
 dd4hep::sim
 Namespace for the Geant4 based simulation part of the AIDA detector description toolkit.
 

Macros

#define __IMPLEMENT_GEANT4SENSDET(name, func)
 
#define DECLARE_EXTERNAL_GEANT4SENSITIVEDETECTOR(id, func)   __IMPLEMENT_GEANT4SENSDET(id,func)
 
#define DECLARE_GEANT4SENSITIVEDETECTOR(id)   __IMPLEMENT_GEANT4SENSDET(id,new id)
 
#define DECLARE_GEANT4SENSITIVEDETECTOR_NS(ns, id)   __IMPLEMENT_GEANT4SENSDET(id,new ns::id)
 
#define DECLARE_GEANT4EXTENDEDMATERIAL(name)   DD4HEP_PLUGINSVC_FACTORY(name,name,G4Material*(dd4hep::Detector*,dd4hep::Material,G4Material*),__LINE__)
 
#define DECLARE_GEANT4EXTENDEDMATERIAL_NS(ns, name)
 
#define DECLARE_GEANT4LOGICALVOLUME(name)   DD4HEP_PLUGINSVC_FACTORY(name,name,G4LogicalVolume*(dd4hep::Detector*,dd4hep::Volume,G4VSolid*,G4Material*),__LINE__)
 
#define DECLARE_GEANT4LOGICALVOLUME_NS(ns, name)
 
#define DECLARE_GEANT4SENSITIVE_NS(name_space, name)
 
#define DECLARE_GEANT4SENSITIVE(name)   DECLARE_GEANT4SENSITIVE_NS(dd4hep::sim,name)
 
#define DECLARE_GEANT4ACTION_NS(name_space, name)
 Plugin defintion to create Geant4Action objects. More...
 
#define DECLARE_GEANT4ACTION(name)   DECLARE_GEANT4ACTION_NS(dd4hep::sim,name)
 Plugin defintion to create Geant4Action objects. More...
 
#define DECLARE_GEANT4_STEPPER(name)   DD4HEP_PLUGINSVC_FACTORY(G4##name,name,_ns::Stepper*(G4EquationOfMotion*),__LINE__)
 Plugin definition to create Geant4 stepper objects. More...
 
#define DECLARE_GEANT4_MAGSTEPPER(name)   DD4HEP_PLUGINSVC_FACTORY(G4##name,name,_ns::Stepper*(G4Mag_EqRhs*),__LINE__)
 
#define DECLARE_GEANT4_MAGMOTION(name)   DD4HEP_PLUGINSVC_FACTORY(G4##name,name,G4Mag_EqRhs*(G4MagneticField*),__LINE__)
 Plugin definition to create Geant4 equations of motion for magnetic fields. More...
 
#define DECLARE_GEANT4_PROCESS(name)   DD4HEP_PLUGINSVC_FACTORY(name,name,G4VProcess*(),__LINE__)
 Plugin definition to create Geant4 physics processes (G4VProcess) More...
 
#define DECLARE_GEANT4_PHYSICS(name)   DD4HEP_PLUGINSVC_FACTORY(name,name,G4VPhysicsConstructor*(),__LINE__)
 Plugin definition to create Geant4 physics constructors (G4VPhysicsConstructor) More...
 
#define DECLARE_GEANT4_GENERATOR(name)   DD4HEP_PLUGINSVC_FACTORY(name,name,G4VPrimaryGenerator*(),__LINE__)
 Plugin definition to create Geant4 physics processes (G4VProcess) More...
 
#define DECLARE_GEANT4_PARTICLE(name)   DD4HEP_PLUGINSVC_FACTORY(name,name,G4ParticleDefinition*(),__LINE__)
 Plugin definition to force particle constructors for GEANT4 (G4ParticleDefinition) More...
 
#define DECLARE_GEANT4_PARTICLEGROUP(name)   DD4HEP_PLUGINSVC_FACTORY(name,name,long(),__LINE__)
 Plugin definition to force particle constructors for GEANT4 (G4XXXXConstructor) More...
 
#define DECLARE_GEANT4_PHYSICS_LIST(name)
 Plugin definition to force geant4 physics constructs such as FTFP_BERT (from source/physics_lists/) etc. More...
 
#define DECLARE_GEANT4_SETUP(name, func)
 Plugin defintion for setup actions. More...
 
#define DECLARE_GEANT4_EVENT_READER(name)   DD4HEP_PLUGINSVC_FACTORY(name,name,_ns::RDR*(std::string),__LINE__)
 Plugin defintion to create event reader objects. More...
 
#define DECLARE_GEANT4_EVENT_READER_NS(name_space, name)
 Plugin defintion to create event reader objects. More...
 

Macro Definition Documentation

◆ __IMPLEMENT_GEANT4SENSDET

#define __IMPLEMENT_GEANT4SENSDET (   name,
  func 
)
Value:
DD4HEP_OPEN_PLUGIN(dd4hep,geant4_sd_##name) { \
template <> G4VSensitiveDetector* Geant4SensitiveDetectorFactory< geant4_sd_##name >:: \
create(const str_t& n,dd4hep::Detector& l) { return func (n,l); } \
DD4HEP_PLUGINSVC_FACTORY(geant4_sd_##name,name,G4VSensitiveDetector*(std::string,dd4hep::Detector*),__LINE__) }

Definition at line 180 of file Factories.h.

◆ DECLARE_EXTERNAL_GEANT4SENSITIVEDETECTOR

#define DECLARE_EXTERNAL_GEANT4SENSITIVEDETECTOR (   id,
  func 
)    __IMPLEMENT_GEANT4SENSDET(id,func)

Definition at line 185 of file Factories.h.

◆ DECLARE_GEANT4_EVENT_READER

#define DECLARE_GEANT4_EVENT_READER (   name)    DD4HEP_PLUGINSVC_FACTORY(name,name,_ns::RDR*(std::string),__LINE__)

Plugin defintion to create event reader objects.

Definition at line 238 of file Factories.h.

◆ DECLARE_GEANT4_EVENT_READER_NS

#define DECLARE_GEANT4_EVENT_READER_NS (   name_space,
  name 
)
Value:
typedef name_space::name __##name##__; \
DD4HEP_PLUGINSVC_FACTORY(__##name##__,name,_ns::RDR*(std::string),__LINE__)

Plugin defintion to create event reader objects.

Definition at line 241 of file Factories.h.

◆ DECLARE_GEANT4_GENERATOR

#define DECLARE_GEANT4_GENERATOR (   name)    DD4HEP_PLUGINSVC_FACTORY(name,name,G4VPrimaryGenerator*(),__LINE__)

Plugin definition to create Geant4 physics processes (G4VProcess)

Definition at line 223 of file Factories.h.

◆ DECLARE_GEANT4_MAGMOTION

#define DECLARE_GEANT4_MAGMOTION (   name)    DD4HEP_PLUGINSVC_FACTORY(G4##name,name,G4Mag_EqRhs*(G4MagneticField*),__LINE__)

Plugin definition to create Geant4 equations of motion for magnetic fields.

Definition at line 217 of file Factories.h.

◆ DECLARE_GEANT4_MAGSTEPPER

#define DECLARE_GEANT4_MAGSTEPPER (   name)    DD4HEP_PLUGINSVC_FACTORY(G4##name,name,_ns::Stepper*(G4Mag_EqRhs*),__LINE__)

Definition at line 215 of file Factories.h.

◆ DECLARE_GEANT4_PARTICLE

#define DECLARE_GEANT4_PARTICLE (   name)    DD4HEP_PLUGINSVC_FACTORY(name,name,G4ParticleDefinition*(),__LINE__)

Plugin definition to force particle constructors for GEANT4 (G4ParticleDefinition)

Definition at line 225 of file Factories.h.

◆ DECLARE_GEANT4_PARTICLEGROUP

#define DECLARE_GEANT4_PARTICLEGROUP (   name)    DD4HEP_PLUGINSVC_FACTORY(name,name,long(),__LINE__)

Plugin definition to force particle constructors for GEANT4 (G4XXXXConstructor)

Definition at line 227 of file Factories.h.

◆ DECLARE_GEANT4_PHYSICS

#define DECLARE_GEANT4_PHYSICS (   name)    DD4HEP_PLUGINSVC_FACTORY(name,name,G4VPhysicsConstructor*(),__LINE__)

Plugin definition to create Geant4 physics constructors (G4VPhysicsConstructor)

Definition at line 221 of file Factories.h.

◆ DECLARE_GEANT4_PHYSICS_LIST

#define DECLARE_GEANT4_PHYSICS_LIST (   name)
Value:
typedef DS::Geant4UserPhysicsList< name > G4_physics_list_##name; \
DD4HEP_PLUGINSVC_FACTORY(G4_physics_list_##name,name,G4VUserPhysicsList*(DS::Geant4PhysicsListActionSequence*,int),__LINE__)

Plugin definition to force geant4 physics constructs such as FTFP_BERT (from source/physics_lists/) etc.

Definition at line 229 of file Factories.h.

◆ DECLARE_GEANT4_PROCESS

#define DECLARE_GEANT4_PROCESS (   name)    DD4HEP_PLUGINSVC_FACTORY(name,name,G4VProcess*(),__LINE__)

Plugin definition to create Geant4 physics processes (G4VProcess)

Definition at line 219 of file Factories.h.

◆ DECLARE_GEANT4_SETUP

#define DECLARE_GEANT4_SETUP (   name,
  func 
)
Value:
DD4HEP_OPEN_PLUGIN(dd4hep,xml_g4_setup_##name) { \
template <> long Geant4SetupAction< xml_g4_setup_##name >:: \
create(dd4hep::Detector& l,const _ns::GH& e, const _ns::STRM& a) {return func(l,e,a);} \
DD4HEP_PLUGINSVC_FACTORY(xml_g4_setup_##name,name##_Geant4_action,long(dd4hep::Detector*,const _ns::GH*,const _ns::STRM*),__LINE__) }

Plugin defintion for setup actions.

Definition at line 232 of file Factories.h.

◆ DECLARE_GEANT4_STEPPER

#define DECLARE_GEANT4_STEPPER (   name)    DD4HEP_PLUGINSVC_FACTORY(G4##name,name,_ns::Stepper*(G4EquationOfMotion*),__LINE__)

Plugin definition to create Geant4 stepper objects.

Definition at line 214 of file Factories.h.

◆ DECLARE_GEANT4ACTION

#define DECLARE_GEANT4ACTION (   name)    DECLARE_GEANT4ACTION_NS(dd4hep::sim,name)

Plugin defintion to create Geant4Action objects.

Definition at line 211 of file Factories.h.

◆ DECLARE_GEANT4ACTION_NS

#define DECLARE_GEANT4ACTION_NS (   name_space,
  name 
)
Value:
using name_space::name; \
DD4HEP_PLUGINSVC_FACTORY(name,name,dd4hep::sim::Geant4Action*(_ns::CT*,std::string),__LINE__)

Plugin defintion to create Geant4Action objects.

Definition at line 208 of file Factories.h.

◆ DECLARE_GEANT4EXTENDEDMATERIAL

#define DECLARE_GEANT4EXTENDEDMATERIAL (   name)    DD4HEP_PLUGINSVC_FACTORY(name,name,G4Material*(dd4hep::Detector*,dd4hep::Material,G4Material*),__LINE__)

Definition at line 189 of file Factories.h.

◆ DECLARE_GEANT4EXTENDEDMATERIAL_NS

#define DECLARE_GEANT4EXTENDEDMATERIAL_NS (   ns,
  name 
)
Value:
using name_space::name; \
DD4HEP_PLUGINSVC_FACTORY(name,name,G4Material*(dd4hep::Detector*,dd4hep::Material,G4Material*),__LINE__)

Definition at line 192 of file Factories.h.

◆ DECLARE_GEANT4LOGICALVOLUME

#define DECLARE_GEANT4LOGICALVOLUME (   name)    DD4HEP_PLUGINSVC_FACTORY(name,name,G4LogicalVolume*(dd4hep::Detector*,dd4hep::Volume,G4VSolid*,G4Material*),__LINE__)

Definition at line 195 of file Factories.h.

◆ DECLARE_GEANT4LOGICALVOLUME_NS

#define DECLARE_GEANT4LOGICALVOLUME_NS (   ns,
  name 
)
Value:
using name_space::name; \
DD4HEP_PLUGINSVC_FACTORY(name,name,G4LogicalVolume*(dd4hep::Detector*,dd4hep::Volume,G4VSolid*,G4Material*),__LINE__)

Definition at line 198 of file Factories.h.

◆ DECLARE_GEANT4SENSITIVE

#define DECLARE_GEANT4SENSITIVE (   name)    DECLARE_GEANT4SENSITIVE_NS(dd4hep::sim,name)

Definition at line 205 of file Factories.h.

◆ DECLARE_GEANT4SENSITIVE_NS

#define DECLARE_GEANT4SENSITIVE_NS (   name_space,
  name 
)
Value:
using name_space::name; \
DD4HEP_PLUGINSVC_FACTORY(name,name,DS::Geant4Sensitive*(_ns::CT*,std::string,dd4hep::DetElement*,dd4hep::Detector*),__LINE__)

Definition at line 202 of file Factories.h.

◆ DECLARE_GEANT4SENSITIVEDETECTOR

#define DECLARE_GEANT4SENSITIVEDETECTOR (   id)    __IMPLEMENT_GEANT4SENSDET(id,new id)

Definition at line 186 of file Factories.h.

◆ DECLARE_GEANT4SENSITIVEDETECTOR_NS

#define DECLARE_GEANT4SENSITIVEDETECTOR_NS (   ns,
  id 
)    __IMPLEMENT_GEANT4SENSDET(id,new ns::id)

Definition at line 187 of file Factories.h.

dd4hep::Material
Handle class describing a material.
Definition: Objects.h:272
dd4hep::DetElement
Handle class describing a detector element.
Definition: DetElement.h:188
dd4hep::Volume
Handle class holding a placed volume (also called physical volume)
Definition: Volumes.h:370
dd4hep::detail::GeoHandler
The base class for all dd4hep geometry crawlers.
Definition: GeoHandler.h:87
G4VSensitiveDetector
Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference.
Definition: Geant4Classes.h:59
dd4hep::sim::Geant4PhysicsListActionSequence
The implementation of the single Geant4 physics list action sequence.
Definition: Geant4PhysicsList.h:223
dd4hep::sim::Geant4Action
Default base class for all Geant 4 actions and derivates thereof.
Definition: Geant4Action.h:113
dd4hep::sim::Geant4EventReader
Basic geant4 event reader class. This interface/base-class must be implemented by concrete readers.
Definition: Geant4InputAction.h:60
DD4HEP_OPEN_PLUGIN
#define DD4HEP_OPEN_PLUGIN(ns, name)
Definition: Plugins.h:148
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::Detector
The main interface to the dd4hep detector description package.
Definition: Detector.h:90
dd4hep::sim::Geant4Sensitive
The base class for Geant4 sensitive detector actions implemented by users.
Definition: Geant4SensDetAction.h:121
dd4hep::sim::Geant4Context
Generic context to extend user, run and event information.
Definition: Geant4Context.h:201