11 #include "DD4hep/DetFactoryHelper.h"
13 using dd4hep::DetElement;
14 using dd4hep::PlacedVolume;
19 dd4hep::SensitiveDetector) {
21 std::string det_name = x_det.nameStr();
23 DetElement beamtube(det_name, x_det.id());
25 detvolume->addType(
"beampipe",
"layer");
27 dd4hep::xml::Dimension x_det_dim(x_det.dimensions());
28 Tube tube_shape(x_det_dim.rmin(), x_det_dim.rmax(), x_det_dim.z());
29 Volume tube_vol(det_name, tube_shape,
30 lcdd.material(x_det_dim.attr<std::string>(
"material")));
31 tube_vol.setVisAttributes(lcdd, x_det_dim.visStr());
33 Volume mother_vol = lcdd.pickMotherVolume(beamtube);
34 PlacedVolume placedTube = mother_vol.placeVolume(tube_vol);
35 beamtube.setPlacement(placedTube);