GeomConverter/src/org/lcsim/geometry/subdetector
diff -u -r1.9 -r1.10
--- PolyhedraEndcapCalorimeter.java 5 Feb 2009 21:43:23 -0000 1.9
+++ PolyhedraEndcapCalorimeter.java 5 Feb 2009 21:44:27 -0000 1.10
@@ -54,86 +54,9 @@
public void appendHepRep(HepRepFactory factory, HepRep heprep)
{
- //DetectorElementToHepRepConverter.convert(getDetectorElement(), factory, heprep, 0, -1);
- super.appendHepRep(factory, heprep);
+ DetectorElementToHepRepConverter.convert(getDetectorElement(), factory, heprep, 0, -1);
}
-
- /*
- public void appendHepRep(HepRepFactory factory, HepRep heprep)
- {
- HepRepInstanceTree instanceTree = heprep.getInstanceTreeTop("Detector","1.0");
- HepRepTypeTree typeTree = heprep.getTypeTree("DetectorType","1.0");
- HepRepType barrel = typeTree.getType("Endcap");
-
- HepRepType type = factory.createHepRepType(barrel, getName());
- type.addAttValue("drawAs","Polygon");
-
- setHepRepColor(type);
-
- HepRepInstance instance = factory.createHepRepInstance(instanceTree, type);
-
- double rmin = getInnerR();
-
- double x1 = rmin * tan(getHalfSectionPhi());
- double y1 = rmin;
-
- double x2 = -x1;
- double y2 = y1;
-
- double z1 = getZMin();
- double z2 = getZMax();
-
- double rmax = getOuterR();
-
- double x4 = rmax * tan(getHalfSectionPhi());
- double y4 = rmax;
-
- double x3 = -x4;
- double y3 = y4;
-
-
- // Place nsides sections by applying matrix transform to starting coordinates.
-
- double phi = 0;
- double flip = 1;
- for (;;)
- {
- for ( int i=0; i<getNumberOfSides(); i++)
- {
- instance = factory.createHepRepInstance(instanceTree, type);
-
- double ix1 = x1 * cos(phi) - y1 * sin(phi);
- double iy1 = x1 * sin(phi) + y1 * cos(phi);
-
- double ix2 = x2 * cos(phi) - y2 * sin(phi);
- double iy2 = x2 * sin(phi) + y2 * cos(phi);
-
- double ix3 = x3 * cos(phi) - y3 * sin(phi);
- double iy3 = x3 * sin(phi) + y3 * cos(phi);
-
- double ix4 = x4 * cos(phi) - y4 * sin(phi);
- double iy4 = x4 * sin(phi) + y4 * cos(phi);
-
- // +z face
- factory.createHepRepPoint(instance, ix1, iy1, flip*z1);
- factory.createHepRepPoint(instance, ix2, iy2, flip*z1);
- factory.createHepRepPoint(instance, ix3, iy3, flip*z1);
- factory.createHepRepPoint(instance, ix4, iy4, flip*z1);
-
- // -z face
- factory.createHepRepPoint(instance, ix4, iy4, flip*z2);
- factory.createHepRepPoint(instance, ix3, iy3, flip*z2);
- factory.createHepRepPoint(instance, ix2, iy2, flip*z2);
- factory.createHepRepPoint(instance, ix1, iy1, flip*z2);
-
- phi += getSectionPhi();
- }
- if (!getReflect() || flip<0) break;
- flip = -1;
- }
- }
-*/
-
+
public boolean isEndcap()
{
return true;