10 #include "DD4hep/DetFactoryHelper.h"
12 using dd4hep::DetElement;
13 using dd4hep::PlacedVolume;
18 dd4hep::SensitiveDetector) {
20 std::string det_name = x_det.nameStr();
22 DetElement beamtube(det_name, x_det.id());
24 detvolume->addType(
"beampipe",
"layer");
26 dd4hep::xml::Dimension x_det_dim(x_det.dimensions());
27 Tube tube_shape(x_det_dim.rmin(), x_det_dim.rmax(), x_det_dim.z());
28 Volume tube_vol(det_name, tube_shape,
29 lcdd.material(x_det_dim.attr<std::string>(
"material")));
30 tube_vol.setVisAttributes(lcdd, x_det_dim.visStr());
32 Volume mother_vol = lcdd.pickMotherVolume(beamtube);
33 PlacedVolume placedTube = mother_vol.placeVolume(tube_vol);
34 beamtube.setPlacement(placedTube);