18#ifndef ROOT_TG4RootDetectorConstruction
19#define ROOT_TG4RootDetectorConstruction
21#include "G4RotationMatrix.hh"
22#include "G4VUserDetectorConstruction.hh"
24#include "TGeoManager.h"
27#include <unordered_map>
39class G4VPhysicalVolume;
70 typedef std::unordered_map<const TGeoVolume*, G4LogicalVolume*>
G4VolumeMap_t;
78 typedef std::unordered_map<const G4LogicalVolume*, TGeoVolume*>
VolumeMap_t;
86 typedef std::unordered_map<const TGeoNode*, G4VPhysicalVolume*>
95 typedef std::unordered_map<const G4VPhysicalVolume*, TGeoNode*>
PVolumeMap_t;
134 G4LogicalVolume*
GetG4Volume(
const TGeoVolume* vol)
const;
135 TGeoVolume*
GetVolume(
const G4LogicalVolume* g4vol)
const;
137 TGeoNode*
GetNode(
const G4VPhysicalVolume* g4vol)
const;
Builder creating a pseudo G4 geometry starting from a TGeo geometry.
PVolumeMap_t::const_iterator PVolumeIt_t
the constant iterator for the map from G4VPhysicalVolume to TGeoNode
PVolumeMap_t fPVolumeMap
map of TGeo volumes
TVirtualUserPostDetConstruction * fSDInit
Sensitive detector hook.
G4VPhysicalVolume * GetG4VPhysicalVolume(const TGeoNode *node) const
G4VPhysicalVolume * CreateG4PhysicalVolume(TGeoNode *node)
std::unordered_map< const G4LogicalVolume *, TGeoVolume * > VolumeMap_t
the map from G4LogicalVolume to TGeoVolume
TGeoManager * GetGeometryManager() const
Return TGeo geometry manager.
G4PVolumeMap_t fG4PVolumeMap
map of G4 physical volumes
G4MaterialMap_t::const_iterator G4MaterialIt_t
the constant iterator for the map from TGeoMaterial to G4Material
G4RotationMatrix * CreateG4Rotation(const TGeoMatrix *matrix)
VolumeMap_t fVolumeMap
map of TGeo volumes
G4MaterialMap_t::value_type G4MaterialVal_t
the value type for the map from TGeoMaterial to G4Material
TGeoNode * GetNode(const G4VPhysicalVolume *g4vol) const
virtual ~TG4RootDetectorConstruction()
G4PVolumeMap_t::const_iterator G4PVolumeIt_t
the constant iterator for the map from TGeoNode to G4VPhysicalVolume
G4MaterialMap_t fG4MaterialMap
map of G4 materials
TG4RootDetectorConstruction()
std::unordered_map< const TGeoNode *, G4VPhysicalVolume * > G4PVolumeMap_t
the map from TGeoNode to G4VPhysicalVolume
G4Material * CreateG4Material(const TGeoMaterial *mat)
std::unordered_map< const TGeoMaterial *, G4Material * > G4MaterialMap_t
the map from TGeoMaterial to G4Material
TVirtualUserPostDetConstruction * GetSDInit() const
Return the sensitive detector hook.
void Initialize(TVirtualUserPostDetConstruction *sdinit=0)
G4VPhysicalVolume * fTopPV
World G4 physical volume.
PVolumeMap_t::value_type PVolumeVal_t
the value type for the map from G4VPhysicalVolume to TGeoNode
Bool_t fIsConstructed
flag Construct() called
VolumeMap_t::value_type VolumeVal_t
the value type for the map from G4LogicalVolume to TGeoVolume
virtual G4VPhysicalVolume * Construct()
std::unordered_map< const TGeoVolume *, G4LogicalVolume * > G4VolumeMap_t
the map from TGeoVolume to G4LogicalVolume
G4LogicalVolume * GetG4Volume(const TGeoVolume *vol) const
G4VSolid * CreateG4Solid(TGeoShape *shape)
Bool_t IsConstructed() const
Return the flag Construct() called.
G4Material * GetG4Material(const TGeoMaterial *mat) const
G4VolumeMap_t fG4VolumeMap
map of G4 volumes
void CreateG4PhysicalVolumes()
std::unordered_map< const G4VPhysicalVolume *, TGeoNode * > PVolumeMap_t
the map from G4VPhysicalVolume to TGeoNode
G4VPhysicalVolume * GetTopPV() const
Return the World G4 physical volume.
G4VolumeMap_t::const_iterator G4VolumeIt_t
the constant iterator for the map from TGeoVolume to G4LogicalVolume
TGeoVolume * GetVolume(const G4LogicalVolume *g4vol) const
G4PVolumeMap_t::value_type G4PVolumeVal_t
the value type for the map from TGeoNode to G4VPhysicalVolume
VolumeMap_t::const_iterator VolumeIt_t
the constant iterator for the map from G4LogicalVolume to TGeoVolume
void CreateG4LogicalVolumes()
G4Element * CreateG4Element(TGeoElement *elem)
virtual void ConstructSDandField()
G4VolumeMap_t::value_type G4VolumeVal_t
the value type for the map from TGeoVolume to G4LogicalVolume
G4LogicalVolume * CreateG4LogicalVolume(TGeoVolume *vol)
TGeoManager * fGeometry
TGeo geometry manager.
Abstract class for defining links to G4 geometry.
virtual ~TVirtualUserPostDetConstruction()
Destructor.
TVirtualUserPostDetConstruction()
Default ctor.
virtual void InitializeSDandField()
virtual void Initialize(TG4RootDetectorConstruction *dc)=0
Initialize.