14 #ifndef DD4HEP_GEOMETRY_VOLUMES_H
15 #define DD4HEP_GEOMETRY_VOLUMES_H
27 #include "TGeoPatternFinder.h"
29 #if ROOT_VERSION_CODE > ROOT_VERSION(5,34,9)
31 #include "TGeoExtension.h"
35 #define DD4HEP_EMULATE_TGEOEXTENSIONS
42 virtual void Release()
const = 0;
74 typedef std::pair<std::string, int>
VolID;
81 class VolIDs:
public std::vector<VolID> {
83 typedef std::vector<VolID>
Base;
92 if ( &c !=
this ) this->std::vector<VolID>::operator=(c);
96 std::vector<VolID>::const_iterator
find(
const std::string& name)
const;
98 std::pair<std::vector<VolID>::iterator,
bool>
insert(
const std::string& name,
int value);
291 const std::string& vis)
const;
332 operator TGeoVolume*()
const {
Handle class to hold the information of a sensitive detector.
ClassDef(VolumeExtension, 1)
Enable ROOT persistency.
virtual ~PlacedVolumeExtension()
Default destructor.
virtual void Release() const
TGeoExtension overload: Method called always when the pointer to the extension is not needed anymore...
VisAttr vis
Reference to visualization attributes.
Ref_t sensitiveDetector() const
Access to the handle to the sensitive detector.
const Volume & setLimitSet(const LCDD &lcdd, const std::string &name) const
Set the limits to the volume. Note: If the name string is empty, the action is ignored.
Handle< TGeoVolume > Base
PlacedVolume()
Default constructor.
Handle class holding a placed volume (also called physical volume)
PlacedVolumeExtension Object
Solid solid() const
Access to Solid (Shape)
Volume volume() const
Logical volume of this placement.
const VolIDs & volIDs() const
Access to the volume IDs.
PlacedVolume(const TGeoNode *e)
Constructor to be used when reading the already parsed DOM tree.
const char * name() const
Access the object name (or "" if not supported by the object)
ClassDef(PlacedVolumeExtension, 1)
Enable ROOT persistency.
Assembly & operator=(const Assembly &a)
Assignment operator (must match copy constructor)
long refCount
Reference count on object (used to implement Grab/Release)
Handle class describing a material.
Implementation class extending the ROOT assembly volumes (TGeoVolumeAsembly)
LimitSet limitSet() const
Access to the limit set.
PlacedVolume(const PlacedVolume &e)
Copy assignment.
virtual TGeoExtension * Grab()
TGeoExtension overload: Method called whenever requiring a pointer to the extension.
Object * data() const
Check if placement is properly instrumented.
VolIDs(const VolIDs &c)
Copy constructor.
Implementation class extending the ROOT placed volume.
Ref_t sens_det
Reference to the sensitive detector.
VolIDs volIDs
ID container.
virtual void Release() const
TGeoExtension overload: Method called always when the pointer to the extension is not needed anymore...
VisAttr visAttributes() const
Access the visualisation attributes.
virtual TGeoExtension * Grab()
TGeoExtension overload: Method called whenever requiring a pointer to the extension.
DD4hep::Geometry::DetElement DetElement
std::string toString() const
String dump.
PlacedVolumeExtension & operator=(const PlacedVolumeExtension &c)
Assignment operator.
Handle class holding a placed volume (also called physical volume)
std::pair< std::vector< VolID >::iterator, bool > insert(const std::string &name, int value)
Inert new entry.
Material material() const
Volume material.
const Volume & setVisAttributes(const VisAttr &obj) const
Set Visualization attributes to the volume.
long refCount
Reference count on object (used to implement Grab/Release)
std::pair< std::string, int > VolID
ROOT::Math::RotationZYX RotationZYX
Volume(const TGeoVolume *v)
Copy from handle.
Assembly()
Default constructor.
void copy(const VolumeExtension &c)
Copy the object.
const Volume & setMaterial(const Material &m) const
Set the volume's material.
ROOT::Math::Rotation3D Rotation3D
virtual void Release() const =0
TGeoExtension overload: Method called always when the pointer to the extension is not needed anymore...
Volume motherVol() const
Parent volume (envelope)
virtual ~VolumeExtension()
Default destructor.
const Volume & setAttributes(const LCDD &lcdd, const std::string ®ion, const std::string &limits, const std::string &vis) const
Attach attributes to the volume.
Volume(const Volume &v)
Copy from handle.
ROOT::Math::XYZVector Position
Volume()
Default constructor.
DD4hep::Geometry::SensitiveDetector SensitiveDetector
Implementation class extending the ROOT volume (TGeoVolume)
unsigned long magic
Magic word to detect memory corruptions.
Region region() const
Access to the handle to the region structure.
Class of the ROOT toolkit. See http://root.cern.ch/root/htmldoc/ClassIndex.html.
Volume & operator=(const Volume &a)
Assignment operator (must match copy constructor)
Handle< NamedObject > Ref_t
Default Ref_t definition describing named objects.
VolumeExtension()
Default constructor.
Handle class describing visualization attributes.
Object * data() const
Check if placement is properly instrumented.
std::vector< VolID > Base
std::vector< VolID >::const_iterator find(const std::string &name) const
Find entry.
virtual TGeoExtension * Grab()=0
TGeoExtension overload: Method called whenever requiring a pointer to the extension.
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Volume(const Handle< T > &v)
Copy from arbitrary Element.
Assembly(const Handle< T > &v)
Copy from arbitrary Element.
Handle class describing a set of limits as they are used for simulation.
Handle class describing a region as used in simulation.
const Volume & setRegion(const LCDD &lcdd, const std::string &name) const
Set the regional attributes to the volume. Note: If the name string is empty, the action is ignored...
LimitSet limits
Limit sets used for simulation.
PlacedVolume & addPhysVolID(const std::string &name, int value)
Add identifier.
The main interface to the DD4hep detector description package.
PlacedVolume & operator=(const PlacedVolume &v)
Assignment operator (must match copy constructor)
Region region
Region reference.
PlacedVolume(const Handle< T > &e)
Copy assignment from other handle type.
T * m_element
Single and only data member: Reference to the actual element.
const Volume & setSensitiveDetector(const SensitiveDetector &obj) const
Assign the sensitive detector structure.
Material material() const
Access to the Volume material.
ROOT::Math::Transform3D Transform3D
const Volume & setSolid(const Solid &s) const
Set the volume's solid shape.
VolIDs & operator=(const VolIDs &c)
Assignment operator.
PlacedVolumeExtension()
Default constructor.
Class of the ROOT toolkit. See http://root.cern.ch/root/htmldoc/ClassIndex.html.
VolIDs()
Default constructor.
PlacedVolume placeVolume(const Volume &vol) const
Place daughter volume. The position and rotation are the identity.
bool isSensitive() const
Accessor if volume is sensitive (ie. is attached to a sensitive detector)
Assembly(const Assembly &v)
Copy from handle.
unsigned long magic
Magic word to detect memory corruptions.