|
DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Go to the documentation of this file.
25 string det_name = x_det.nameStr();
28 Assembly assembly (det_name+
"_assembly");
34 string l_name = det_name+
_toString(n,
"_layer%d");
35 double z = x_layer.outer_z();
36 double rmin = x_layer.inner_r();
39 Tube l_tub (rmin,2*rmin,z);
40 Volume l_vol(l_name,l_tub,air);
46 string s_name= l_name+
_toString(im,
"_slice%d");
47 double thickness = x_slice.thickness();
49 Volume s_vol(s_name, s_tub, mat);
52 if ( x_slice.isSensitive() ) {
54 s_vol.setSensitiveDetector(sens);
57 s_vol.setAttributes(description,x_slice.regionStr(),x_slice.limitsStr(),x_slice.visStr());
58 pv = l_vol.placeVolume(s_vol);
62 l_tub.setDimensions(rmin,r,z);
64 l_vol.setVisAttributes(description,x_layer.visStr());
66 pv = assembly.placeVolume(l_vol);
68 layer.setPlacement(pv);
70 if ( x_det.hasAttr(
_U(combineHits)) ) {
71 sdet.setCombineHits(x_det.combineHits(),sens);
76 sdet.setPlacement(pv);
Class to support the access to collections of XmlNodes (or XmlElements)
Handle class to hold the information of a sensitive detector.
#define DECLARE_DETELEMENT(name, func)
Handle class holding a placed volume (also called physical volume)
PlacedVolume & addPhysVolID(const std::string &name, int value)
Add identifier.
std::string _toString(bool value)
String conversions: boolean value to string.
virtual Volume pickMotherVolume(const DetElement &sd) const =0
Access mother volume by detector element.
Class to easily access the properties of single XmlElements.
Implementation class extending the ROOT assembly volumes (TGeoVolumeAssembly)
PlacedVolume placeVolume(const Volume &volume) const
Place daughter volume. The position and rotation are the identity.
dd4hep::xml::Component xml_comp_t
Handle class describing a material.
virtual Material material(const std::string &name) const =0
Retrieve a matrial by its name from the detector description.
Handle class describing a detector element.
virtual Material air() const =0
Return handle to material describing air.
Handle class holding a placed volume (also called physical volume)
DD4hep internal namespace.
dd4hep::xml::DetElement xml_det_t
Namespace for the AIDA detector description toolkit.
The main interface to the dd4hep detector description package.
Class describing a tube shape of a section of a tube.
SensitiveDetector & setType(const std::string &typ)
Set detector type (structure, tracker, calorimeter, etc.).