DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Geant4Mapping.h
Go to the documentation of this file.
1 // $Id: $
2 //==========================================================================
3 // AIDA Detector description implementation for LCD
4 //--------------------------------------------------------------------------
5 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
6 // All rights reserved.
7 //
8 // For the licensing terms see $DD4hepINSTALL/LICENSE.
9 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
10 //
11 // Author : M.Frank
12 //
13 //==========================================================================
14 
15 #ifndef DD4HEP_DDG4_GEANT4MAPPING_H
16 #define DD4HEP_DDG4_GEANT4MAPPING_H
17 
18 // Framework include files
19 #include "DD4hep/LCDD.h"
20 #include "DD4hep/GeoHandler.h"
23 
25 namespace DD4hep {
26 
28  namespace Simulation {
29 
31 
37  public:
49 
50  protected:
53 
55  void checkValidity() const;
56  public:
59 
61  virtual ~Geant4Mapping();
62 
64  static Geant4Mapping& instance();
65 
67  LCDD& lcdd() const {
68  return m_lcdd;
69  }
70 
73  return *m_dataPtr;
74  }
75 
78  return m_dataPtr;
79  }
80 
83 
86 
89 
92 
94  PlacedVolume placement(const G4VPhysicalVolume* node) const;
95  };
96  } // End namespace Simulation
97 } // End namespace DD4hep
98 
99 #endif // DD4HEP_DDG4_GEANT4MAPPING_H
Handle class to hold the information of a sensitive detector.
Definition: Detector.h:47
Geometry::SensitiveDetector SensitiveDetector
Definition: Geant4Mapping.h:40
Handle class holding a placed volume (also called physical volume)
Definition: Volumes.h:135
The Geant4VolumeManager to facilitate optimized lookups of cell IDs from touchables.
Handle class describing a material.
Definition: Objects.h:300
Handle class describing an element in the periodic table.
Definition: Objects.h:267
Defintion of the object types used by generic geometry handlers.
Definition: GeoHandler.h:50
Geometry::DetElement DetElement
Definition: Geant4Mapping.h:39
Geant4GeometryInfo & init()
Create and attach new data block. Delete old data block if present.
Geant4Mapping(LCDD &lcdd)
Initializing Constructor.
Handle class holding a placed volume (also called physical volume)
Definition: Volumes.h:237
Geant4GeometryInfo * ptr() const
Access to the data pointer.
Definition: Geant4Mapping.h:77
void checkValidity() const
When resolving pointers, we must check for the validity of the data block.
virtual ~Geant4Mapping()
Standard destructor.
LCDD & lcdd() const
Accesor to the LCDD instance.
Definition: Geant4Mapping.h:67
void attach(Geant4GeometryInfo *data)
Set a new data block.
Handle class describing visualization attributes.
Definition: Objects.h:341
Handle class describing a detector element.
Definition: Detector.h:172
Handle class describing a set of limits as they are used for simulation.
Definition: Objects.h:475
Handle class describing a region as used in simulation.
Definition: Objects.h:516
The main interface to the DD4hep detector description package.
Definition: LCDD.h:82
Concreate class holding the relation information between geant4 objects and dd4hep objects...
Geometry mapping from DD4hep to Geant 4.
Definition: Geant4Mapping.h:36
PlacedVolume placement(const G4VPhysicalVolume *node) const
Accessor to resolve geometry placements.
Geant4VolumeManager volumeManager() const
Access the volume manager.
Geant4GeometryInfo * m_dataPtr
Definition: Geant4Mapping.h:52
static Geant4Mapping & instance()
Possibility to define a singleton instance.
Geant4GeometryInfo & data() const
Access to the data pointer.
Definition: Geant4Mapping.h:72
Geometry::PlacedVolume PlacedVolume
Definition: Geant4Mapping.h:43
Geant4GeometryInfo * detach()
Release data and pass over the ownership.