21 using namespace DD4hep;
22 using namespace DD4hep::Geometry;
32 Volume det_vol(name+
"_vol",
Box(box.x(),box.y(),box.z()), mat);
37 det_vol.setVisAttributes(lcdd, x_det.
visStr());
38 det_vol.setLimitSet(lcdd, x_det.
limitsStr());
39 det_vol.setRegion(lcdd, x_det.
regionStr());
43 det_vol.setSensitiveDetector(sens);
49 det.setPlacement(phv);
Handle class to hold the information of a sensitive detector.
static Ref_t create_element(LCDD &lcdd, xml_h e, Ref_t sens)
Handle class holding a placed volume (also called physical volume)
virtual Volume pickMotherVolume(const DetElement &sd) const =0
Access mother volume by detector element.
Handle class describing a material.
Handle_t child(const Strng_t &tag_value, bool except=true) const
Access child by tag name. Thow an exception if required in case the child is not present.
std::string typeStr() const
Access "type" attribute as STL string.
std::string regionStr() const
Access region attribute as STL string. If not present empty return empty string.
XML Handle class extending the XML handle Dimension.
Class describing a box shape.
SensitiveDetector & setType(const std::string &typ)
Set detector type (structure, tracker, calorimeter, etc.).
Handle class holding a placed volume (also called physical volume)
std::string visStr() const
Access vis attribute as STL string. If not present empty return empty string.
std::string materialStr() const
Access material attribute as STL string. If not present empty return empty string.
std::string limitsStr() const
Access limits attribute as STL string. If not present empty return empty string.
ROOT::Math::RotationZYX RotationZYX
int id() const
Access parameters: id.
bool hasAttr(const XmlChar *name) const
Check for the existence of a named attribute.
#define DECLARE_DETELEMENT(name, func)
ROOT::Math::Rotation3D Rotation3D
XML Handle class extending the XML handle Dimension.
ROOT::Math::XYZVector Position
#define DECLARE_DEPRECATED_DETELEMENT(name, func)
Handle class describing a detector element.
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
bool isSensitive() const
Check if xml detector element is sensitive.
XML Handle to xml elements with predefined attribute access.
PlacedVolume & addPhysVolID(const std::string &name, int value)
Add identifier.
The main interface to the DD4hep detector description package.
Class to easily access the properties of single XmlElements.
virtual Material material(const std::string &name) const =0
Retrieve a matrial by it's name from the detector description.
std::string nameStr() const
Access "name" attribute as STL string.
ROOT::Math::Transform3D Transform3D
PlacedVolume placeVolume(const Volume &vol) const
Place daughter volume. The position and rotation are the identity.