GeomConverter/src/org/lcsim/geometry/subdetector
diff -u -r1.3 -r1.4
--- CylindricalBarrelCalorimeter.java 21 Jun 2005 04:12:49 -0000 1.3
+++ CylindricalBarrelCalorimeter.java 13 Jul 2005 05:27:18 -0000 1.4
@@ -74,5 +74,5 @@
instance2.addAttValue("radius",getOuterRadius());
factory.createHepRepPoint(instance2,0,0,getZMin());
factory.createHepRepPoint(instance2,0,0,getZMax());
- }
+ }
}
GeomConverter/src/org/lcsim/geometry/subdetector
diff -u -r1.10 -r1.11
--- CylindricalCalorimeter.java 10 Jun 2005 01:12:30 -0000 1.10
+++ CylindricalCalorimeter.java 13 Jul 2005 05:27:18 -0000 1.11
@@ -2,15 +2,12 @@
import hep.graphics.heprep.HepRep;
import hep.graphics.heprep.HepRepFactory;
-import hep.graphics.heprep.HepRepInstance;
-import hep.graphics.heprep.HepRepInstanceTree;
-import hep.graphics.heprep.HepRepType;
-import hep.graphics.heprep.HepRepTypeTree;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.lcsim.geometry.Calorimeter;
import org.lcsim.geometry.CylindricalSubdetector;
import org.lcsim.geometry.HepRepProvider;
+import org.lcsim.geometry.IDDecoder;
import org.lcsim.geometry.compact.LayeredSubdetector;
/**
@@ -19,12 +16,14 @@
*/
/**
- * This class's inheritance hierarchy needs to be simplified. 5 parent classes is too many.
+ * FIXME: This class's inheritance hierarchy needs to be simplified. 4 parent classes is too many.
* Currently, Calorimeter does nothing. Are there some special plans for this class?
*
- * I don't believe that this should be bound to heprep classes. A factory or manager
+ * FIXME: I don't believe that this should be bound to heprep classes. A factory or manager
* should take this as an argument and translate it.
*
+ * --JM
+ *
*/
public abstract class CylindricalCalorimeter
extends LayeredSubdetector
@@ -69,5 +68,11 @@
public double getInnerRadius()
{
return innerR;
- }
+ }
+
+ public double[] transformLocalToGlobal(double[] localPos)
+ {
+ System.out.println("CylindricalCalorimeter.transformLocalToGlobal()");
+ return localPos;
+ }
}
GeomConverter/src/org/lcsim/geometry/subdetector
diff -u -r1.8 -r1.9
--- CylindricalEndcapCalorimeter.java 21 Jun 2005 04:12:49 -0000 1.8
+++ CylindricalEndcapCalorimeter.java 13 Jul 2005 05:27:18 -0000 1.9
@@ -6,22 +6,16 @@
import hep.graphics.heprep.HepRepInstanceTree;
import hep.graphics.heprep.HepRepType;
import hep.graphics.heprep.HepRepTypeTree;
-import java.util.Iterator;
-import java.util.List;
import org.jdom.Element;
-import org.jdom.Attribute;
import org.jdom.JDOMException;
-import org.lcsim.geometry.Calorimeter;
-import org.lcsim.geometry.CylindricalSubdetector;
-import org.lcsim.geometry.HepRepProvider;
-import org.lcsim.geometry.compact.LayeredSubdetector;
+import org.lcsim.geometry.segmentation.GridXYZ;
/**
*
* @author tonyj
*/
-class CylindricalEndcapCalorimeter extends CylindricalCalorimeter
+public class CylindricalEndcapCalorimeter extends CylindricalCalorimeter
{
CylindricalEndcapCalorimeter(Element node) throws JDOMException
{
@@ -35,7 +29,7 @@
maxZ = minZ + getLayers().getTotalThickness();
setOffset(minZ);
- }
+ }
/** I don't really agree with this function being impl here. --JM */
public void appendHepRep(HepRepFactory factory, HepRep heprep)
@@ -63,5 +57,20 @@
if (!getReflect() || flip<0) break;
flip = -1;
}
+ }
+
+ /* FIXME: This has an implicit assumption that the localPos is that of the layer. */
+ public double[] transformLocalToGlobal(double[] localPos)
+ {
+ System.out.println("CylindricalEndcapCalorimeter.transformLocalToGlobal()");
+ double[] globPos = {localPos[0], localPos[1], localPos[2] };
+ GridXYZ gridSeg = (GridXYZ)getReadout().getSegmentation();
+
+ if ( gridSeg != null )
+ {
+ globPos[2] += gridSeg.getRadius( gridSeg.getLayer() );
+ }
+
+ return globPos;
}
}