11 #include "DD4hep/DetFactoryHelper.h"
14 using namespace dd4hep;
18 xml_det_t x_det = xml;
19 string det_name = x_det.nameStr();
22 DetElement beamPipeElement(det_name, x_det.id());
25 beamPipeExtension->addType(
"beampipe",
"layer");
29 xml_comp_t x_det_def = x_det.child(_U(description));
30 Tube tube_shape(x_det_def.rmin(), x_det_def.rmax(), x_det_def.dz());
31 Volume tube_vol(det_name, tube_shape, lcdd.material(x_det_def.materialStr()));
32 tube_vol.setVisAttributes(lcdd, x_det.visStr());
35 Volume mother_vol = lcdd.pickMotherVolume(beamPipeElement);
36 PlacedVolume placedTube = mother_vol.placeVolume(tube_vol);
37 placedTube.addPhysVolID(
"BeamTube", beamPipeElement.id());
38 beamPipeElement.setPlacement(placedTube);
40 return beamPipeElement;