11 #include "DD4hep/DetFactoryHelper.h"
14 using namespace dd4hep;
19 string det_name = x_det.nameStr();
21 DetElement beamtube(det_name, x_det.id());
24 beamPipeExtension->addType(
"beampipe",
"layer");
28 dd4hep::xml::Dimension x_det_dim(x_det.dimensions());
29 Tube tube_shape(x_det_dim.rmin(), x_det_dim.rmax(), x_det_dim.z());
30 Volume tube_vol(det_name, tube_shape,
32 tube_vol.setVisAttributes(lcdd, x_det_dim.visStr());
35 Volume mother_vol = lcdd.pickMotherVolume(beamtube);
36 PlacedVolume placedTube = mother_vol.placeVolume(tube_vol);
37 placedTube.addPhysVolID(
"tube", beamtube.id());
38 beamtube.setPlacement(placedTube);