GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd
diff -u -r1.8 -r1.9
--- PolyhedraEndcapCalorimeter2.java 20 Feb 2009 05:48:48 -0000 1.8
+++ PolyhedraEndcapCalorimeter2.java 20 Feb 2009 07:29:45 -0000 1.9
@@ -154,9 +154,10 @@
physvol.setZ(zmin+subdetectorThickness/2);
physvol.addPhysVolID("system",id);
physvol.addPhysVolID("barrel",1);
- Rotation rotation = new Rotation(envelopeVolume + "_positive");
- rotation.setZ(zrot);
- physvol.setRotation(rotation);
+ Rotation positiveEndcapRotation = new Rotation(subdetectorName + "_positive");
+ positiveEndcapRotation.setZ(zrot);
+ lcdd.getDefine().addRotation(positiveEndcapRotation);
+ physvol.setRotation(positiveEndcapRotation);
motherVolume.addPhysVol(physvol);
// Negative endcap.
@@ -172,11 +173,12 @@
{
PhysVol physvol2 = new PhysVol(envelopeVolume);
physvol2.setZ(-zmin-subdetectorThickness/2);
- Rotation reflection = new Rotation(envelopeVolume + "_negative");
- reflection.setX(Math.PI);
- reflection.setZ(zrot);
+ Rotation negativeEndcapRotation = new Rotation(subdetectorName + "_negative");
+ lcdd.getDefine().addRotation(negativeEndcapRotation);
+ negativeEndcapRotation.setX(Math.PI);
+ negativeEndcapRotation.setZ(zrot);
- physvol2.setRotation(reflection);
+ physvol2.setRotation(negativeEndcapRotation);
physvol2.addPhysVolID("system",id);
physvol2.addPhysVolID("barrel",2);
motherVolume.addPhysVol(physvol2);