10 #include "DD4hep/DetFactoryHelper.h"
13 using namespace dd4hep;
18 string det_name = x_det.nameStr();
20 DetElement beamtube(det_name, x_det.id());
23 beamPipeExtension->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,
31 tube_vol.setVisAttributes(lcdd, x_det_dim.visStr());
34 Volume mother_vol = lcdd.pickMotherVolume(beamtube);
35 PlacedVolume placedTube = mother_vol.placeVolume(tube_vol);
36 placedTube.addPhysVolID(
"tube", beamtube.id());
37 beamtube.setPlacement(placedTube);