Skip to content
Snippets Groups Projects
Commit 9cfc05c8 authored by Markus Frank's avatar Markus Frank
Browse files

Allow to move the barrel along the z-axis

parent b88d7d44
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment