GeomConverter/src/org/lcsim/geometry/subdetector
diff -u -r1.1 -r1.2
--- AbstractTestBeam.java 26 Sep 2005 18:13:29 -0000 1.1
+++ AbstractTestBeam.java 27 Sep 2005 17:59:26 -0000 1.2
@@ -108,26 +108,29 @@
{
HepRepInstanceTree instanceTree = heprep.getInstanceTreeTop("Detector","1.0");
HepRepTypeTree typeTree = heprep.getTypeTree("DetectorType","1.0");
- HepRepType barrel = typeTree.getType("Barrel");
- HepRepType type = factory.createHepRepType(barrel, getName());
+ HepRepType ec = typeTree.getType("Endcap");
+ HepRepType type = factory.createHepRepType(ec, getName());
type.addAttValue("drawAs","Prism");
HepRepInstance instance = factory.createHepRepInstance(instanceTree, type);
Hep3Vector position = getPosition();
+
double x = getX()/2 + position.x();
double y = getY()/2 + position.y();
- double z = getZ()/2 + position.z();
- factory.createHepRepPoint(instance, x, y, -z);
- factory.createHepRepPoint(instance, x, -y, -z);
- factory.createHepRepPoint(instance, -x, -y, -z);
- factory.createHepRepPoint(instance, -x, y, -z);
-
- factory.createHepRepPoint(instance, x, y, z);
- factory.createHepRepPoint(instance, x, -y, z);
- factory.createHepRepPoint(instance, -x, -y, z);
- factory.createHepRepPoint(instance, -x, y, z);
+ double z1 = position.z() + getZ()/2;
+ double z2 = position.z() - getZ()/2;
+
+ factory.createHepRepPoint(instance, x, y, z1);
+ factory.createHepRepPoint(instance, x, -y, z1);
+ factory.createHepRepPoint(instance, -x, -y, z1);
+ factory.createHepRepPoint(instance, -x, y, z1);
+
+ factory.createHepRepPoint(instance, x, y, z2);
+ factory.createHepRepPoint(instance, x, -y, z2);
+ factory.createHepRepPoint(instance, -x, -y, z2);
+ factory.createHepRepPoint(instance, -x, y, z2);
}
}
\ No newline at end of file