From 9cfc05c84581075424ed5fb20dc1a2e061b0ad48 Mon Sep 17 00:00:00 2001 From: Markus Frank <markus.frank@cern.ch> Date: Fri, 7 Jun 2013 15:05:16 +0000 Subject: [PATCH] Allow to move the barrel along the z-axis --- DDExamples/CLICSiD/src/PolyhedraBarrelCalorimeter2_geo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DDExamples/CLICSiD/src/PolyhedraBarrelCalorimeter2_geo.cpp b/DDExamples/CLICSiD/src/PolyhedraBarrelCalorimeter2_geo.cpp index bbfb17e8f..9541c302f 100644 --- a/DDExamples/CLICSiD/src/PolyhedraBarrelCalorimeter2_geo.cpp +++ b/DDExamples/CLICSiD/src/PolyhedraBarrelCalorimeter2_geo.cpp @@ -164,7 +164,8 @@ static Ref_t create_detector(LCDD& lcdd, xml_h e, SensitiveDetector sens) { // Place the staves. placeStaves(sdet,stave,rmin,numSides,totalThickness,envelopeVol,innerAngle,staveOuterVol); - PlacedVolume env_phv = motherVol.placeVolume(envelopeVol,Rotation(0,0,M_PI/numSides)); + double z_offset = dim.hasAttr(_U(z_offset)) ? dim.z_offset() : 0.0; + PlacedVolume env_phv = motherVol.placeVolume(envelopeVol,Position(0,0,z_offset),Rotation(0,0,M_PI/numSides)); env_phv.addPhysVolID("system", sdet.id()); env_phv.addPhysVolID("barrel", 0); sdet.setPlacement(env_phv); -- GitLab