6 added + 6 removed + 8 modified, total 20 files
GeomConverter/src/org/lcsim/geometry/subdetector
diff -N AbstractCalorimeter.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ AbstractCalorimeter.java 24 Aug 2005 07:05:07 -0000 1.1
@@ -0,0 +1,35 @@
+/*
+ * AbstractCalorimeter.java
+ *
+ * Created on July 17, 2005, 3:56 PM
+ *
+ */
+package org.lcsim.geometry.subdetector;
+
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.lcsim.geometry.Calorimeter;
+
+/**
+ *
+ * @author jeremym
+ */
+abstract class AbstractCalorimeter
+ extends AbstractLayeredSubdetector implements Calorimeter
+{
+ /** Creates a new instance of AbstractCalorimeter */
+ public AbstractCalorimeter(Element node) throws JDOMException
+ {
+ super(node);
+ }
+
+ public CalorimeterIDDecoder getCalorimeterIDDecoder()
+ {
+ return (CalorimeterIDDecoder)(getReadout().getIDDecoder() );
+ }
+
+ public boolean isCalorimeter()
+ {
+ return true;
+ }
+}
\ No newline at end of file
GeomConverter/src/org/lcsim/geometry/subdetector
diff -N AbstractCylindricalTracker.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ AbstractCylindricalTracker.java 24 Aug 2005 07:05:07 -0000 1.1
@@ -0,0 +1,67 @@
+/*
+ * AbstractCylindricalTracker.java
+ *
+ * Created on August 20, 2005, 12:58 PM
+ *
+ */
+
+package org.lcsim.geometry.subdetector;
+
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.lcsim.geometry.CylindricalSubdetector;
+
+/**
+ *
+ * @author jeremym
+ */
+abstract class AbstractCylindricalTracker extends AbstractTracker
+ implements CylindricalSubdetector
+{
+ private double zmax;
+ private double zmin;
+ private double rmin;
+ private double rmax;
+
+ public AbstractCylindricalTracker(Element node) throws JDOMException
+ {
+ super(node);
+ build(node);
+ }
+
+ private void build(Element node) throws JDOMException
+ {
+ Element dimensions = node.getChild("dimensions");
+
+ if ( dimensions == null )
+ {
+ throw new JDOMException("Missing dimensions element.");
+ }
+
+ rmin = dimensions.getAttribute("inner_r").getDoubleValue();
+ zmax = dimensions.getAttribute("outer_z").getDoubleValue();
+ zmin = -zmax;
+ rmax = rmin + getLayering().getLayers().getTotalThickness();
+ getLayering().setOffset(rmin);
+ }
+
+ public double getZMax()
+ {
+ return zmax;
+ }
+
+ public double getZMin()
+ {
+ return zmin;
+ }
+
+ public double getOuterRadius()
+ {
+ return rmax;
+ }
+
+ public double getInnerRadius()
+ {
+ return rmin;
+ }
+}
\ No newline at end of file
GeomConverter/src/org/lcsim/geometry/subdetector
diff -N AbstractLayeredSubdetector.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ AbstractLayeredSubdetector.java 24 Aug 2005 07:05:07 -0000 1.1
@@ -0,0 +1,45 @@
+/*
+ * LayeredSubdetector.java
+ *
+ * Created on July 17, 2005, 5:49 PM
+ *
+ */
+
+package org.lcsim.geometry.subdetector;
+
+import org.lcsim.geometry.LayeredSubdetector;
+import org.lcsim.geometry.layer.Layering;
+import org.jdom.Element;
+import org.jdom.JDOMException;
+
+/**
+ *
+ * @author jeremym
+ */
+abstract class AbstractLayeredSubdetector extends AbstractSubdetector
+ implements LayeredSubdetector
+{
+ protected Layering layering;
+
+ /** Creates a new instance of a LayeredSubdetector */
+ public AbstractLayeredSubdetector(Element node) throws JDOMException
+ {
+ super(node);
+ build(node);
+ }
+
+ private void build(Element node) throws JDOMException
+ {
+ layering = org.lcsim.geometry.layer.Layering.makeLayering(node);
+ }
+
+ public boolean isLayered()
+ {
+ return true;
+ }
+
+ public Layering getLayering()
+ {
+ return layering;
+ }
+}
\ No newline at end of file
GeomConverter/src/org/lcsim/geometry/subdetector
diff -N AbstractPolyhedraCalorimeter.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ AbstractPolyhedraCalorimeter.java 24 Aug 2005 07:05:08 -0000 1.1
@@ -0,0 +1,54 @@
+/*
+ * PolyhedraCalorimeter.java
+ *
+ * Created on August 23, 2005, 11:17 PM
+ *
+ */
+
+package org.lcsim.geometry.subdetector;
+import org.jdom.Element;
+import org.jdom.JDOMException;
+
+/**
+ *
+ * @author jeremym
+ */
+public class AbstractPolyhedraCalorimeter extends AbstractCalorimeter
+{
+ private double irad;
+ private int nsides;
+ private double zlength;
+
+ /**
+ * Creates a new instance of PolyhedraCalorimeter
+ */
+ public AbstractPolyhedraCalorimeter(Element node) throws JDOMException
+ {
+ super(node);
+ build(node);
+ }
+
+ private void build(Element node) throws JDOMException
+ {
+ Element dimensions = node.getChild("dimensions");
+
+ nsides = dimensions.getAttribute("nsides").getIntValue();
+ zlength = dimensions.getAttribute("zlength").getDoubleValue();
+ irad = dimensions.getAttribute("rmin").getDoubleValue();
+ }
+
+ double getInnerR()
+ {
+ return irad;
+ }
+
+ double getZLength()
+ {
+ return zlength;
+ }
+
+ int getNumberOfSides()
+ {
+ return nsides;
+ }
+}
\ No newline at end of file
GeomConverter/src/org/lcsim/geometry/subdetector
diff -N AbstractSubdetector.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ AbstractSubdetector.java 24 Aug 2005 07:05:08 -0000 1.1
@@ -0,0 +1,45 @@
+/*
+ * AbstractSubdetector.java
+ *
+ * Created on July 17, 2005, 3:22 PM
+ *
+ */
+
+package org.lcsim.geometry.subdetector;
+
+/* JDOM dependence from org.lcsim.geometry.compact.Subdetector */
+import hep.graphics.heprep.HepRep;
+import hep.graphics.heprep.HepRepFactory;
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.lcsim.geometry.HepRepProvider;
+import org.lcsim.geometry.subdetector.SubdetectorIDDecoder;
+
+/**
+ *
+ * @author jeremym
+ *
+ * This class is supposed to simplify inheritance hierarchy for org.lcsim.geometry.subdetector
+ * implementation classes, which extend it.
+ *
+ */
+abstract class AbstractSubdetector
+ extends org.lcsim.geometry.compact.Subdetector
+ implements HepRepProvider
+{
+ /** Creates a new instance of AbstractSubdetector */
+ public AbstractSubdetector(Element node) throws JDOMException
+ {
+ super(node);
+ }
+
+ public SubdetectorIDDecoder getSubdetectorIDDecoder()
+ {
+ return (SubdetectorIDDecoder)(getReadout().getIDDecoder() );
+ }
+
+ /** HepRepProvider: optional impl for subclass */
+ /** FIXME: Should live in org.lcsim.geometry.heprep or equivalent. */
+ public void appendHepRep(HepRepFactory factory, HepRep heprep)
+ {}
+}
\ No newline at end of file
GeomConverter/src/org/lcsim/geometry/subdetector
diff -N AbstractTracker.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ AbstractTracker.java 24 Aug 2005 07:05:08 -0000 1.1
@@ -0,0 +1,38 @@
+/*
+ * AbstractTracker.java
+ *
+ * Created on July 17, 2005, 3:20 PM
+ *
+*/
+package org.lcsim.geometry.subdetector;
+
+import org.lcsim.geometry.Tracker;
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.lcsim.geometry.TrackerIDDecoder;
+
+/**
+ *
+ * @author jeremym
+ *
+ * Assumes that all concrete Tracker types will implement Layering interface.
+ */
+abstract class AbstractTracker
+ extends AbstractLayeredSubdetector
+ implements Tracker
+{
+ public AbstractTracker(Element node) throws JDOMException
+ {
+ super(node);
+ }
+
+ public org.lcsim.geometry.TrackerIDDecoder getTrackerIDDecoder()
+ {
+ return (org.lcsim.geometry.TrackerIDDecoder)(getReadout().getIDDecoder() );
+ }
+
+ public boolean isTracker()
+ {
+ return true;
+ }
+}
\ No newline at end of file
GeomConverter/src/org/lcsim/geometry/subdetector
diff -u -r1.3 -r1.4
--- CalorimeterIDDecoder.java 24 Aug 2005 06:10:57 -0000 1.3
+++ CalorimeterIDDecoder.java 24 Aug 2005 07:05:07 -0000 1.4
@@ -15,6 +15,7 @@
/**
* FIXME: Should be renamed as it is actually returning the distance to the midpoint of the sensitive layer.
+ * FIXME: Belongs here??? Why not just use LayeredSubdetector interface?
*/
public double getDistanceToSensitive(int layer)
{
GeomConverter/src/org/lcsim/geometry/subdetector
diff -u -r1.7 -r1.8
--- CylindricalBarrelCalorimeter.java 20 Jul 2005 22:13:14 -0000 1.7
+++ CylindricalBarrelCalorimeter.java 24 Aug 2005 07:05:07 -0000 1.8
@@ -3,7 +3,6 @@
*
* Created on June 9, 2005, 4:48 PM
*/
-
package org.lcsim.geometry.subdetector;
import hep.graphics.heprep.HepRep;
GeomConverter/src/org/lcsim/geometry/subdetector
diff -u -r1.13 -r1.14
--- CylindricalCalorimeter.java 19 Jul 2005 20:33:19 -0000 1.13
+++ CylindricalCalorimeter.java 24 Aug 2005 07:05:07 -0000 1.14
@@ -14,8 +14,12 @@
*
* @author tonyj
*/
+/*
+ * FIXME: This is public only because changing to protected would break a bunch of stuff, mostly in digisim.
+ * FIXME: This should be called AbstractCylindricalCalorimeter, as it can't be instantiated, but doing this breaks a bunch of digisim stuff.
+*/
public abstract class CylindricalCalorimeter
- extends CalorimeterBase
+ extends AbstractCalorimeter
implements CylindricalSubdetector
{
protected double innerR;
GeomConverter/src/org/lcsim/geometry/subdetector
diff -u -r1.16 -r1.17
--- CylindricalEndcapCalorimeter.java 20 Jul 2005 20:41:01 -0000 1.16
+++ CylindricalEndcapCalorimeter.java 24 Aug 2005 07:05:07 -0000 1.17
@@ -8,7 +8,6 @@
import hep.graphics.heprep.HepRepTypeTree;
import org.jdom.Element;
import org.jdom.JDOMException;
-
import org.lcsim.geometry.segmentation.GridXYZ;
/**
GeomConverter/src/org/lcsim/geometry/subdetector
diff -u -r1.9 -r1.10
--- DiskTracker.java 24 Aug 2005 06:10:58 -0000 1.9
+++ DiskTracker.java 24 Aug 2005 07:05:07 -0000 1.10
@@ -17,7 +17,7 @@
*
* @author tonyj
*/
-public class DiskTracker extends TrackerBase
+public class DiskTracker extends AbstractTracker
{
private double[] innerR;
private double[] outerR;
GeomConverter/src/org/lcsim/geometry/subdetector
diff -u -r1.10 -r1.11
--- MultiLayerTracker.java 24 Jul 2005 06:47:42 -0000 1.10
+++ MultiLayerTracker.java 24 Aug 2005 07:05:07 -0000 1.11
@@ -18,7 +18,7 @@
* @author tonyj
*
*/
-public class MultiLayerTracker extends TrackerBase
+public class MultiLayerTracker extends AbstractTracker
{
private double[] innerR;
private double[] outerZ;
GeomConverter/src/org/lcsim/geometry/subdetector
diff -u -r1.2 -r1.3
--- SubdetectorIDDecoder.java 24 Aug 2005 06:10:58 -0000 1.2
+++ SubdetectorIDDecoder.java 24 Aug 2005 07:05:07 -0000 1.3
@@ -14,7 +14,7 @@
*
* @author jeremym
*/
-public abstract class SubdetectorIDDecoder extends IDDecoderBase
+public class SubdetectorIDDecoder extends IDDecoderBase
{
public static final int BARREL = 0;
public static final int ENDCAP_NORTH = 1;
GeomConverter/src/org/lcsim/geometry/subdetector
diff -u -r1.2 -r1.3
--- TPC.java 21 Aug 2005 06:10:43 -0000 1.2
+++ TPC.java 24 Aug 2005 07:05:07 -0000 1.3
@@ -20,7 +20,7 @@
*
* @author jeremym
*/
-public class TPC extends CylindricalTracker
+public class TPC extends AbstractCylindricalTracker
{
/** Creates a new instance of TPC */
public TPC(Element node) throws JDOMException
GeomConverter/src/org/lcsim/geometry/subdetector
diff -N CalorimeterBase.java
--- CalorimeterBase.java 24 Aug 2005 06:10:57 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,35 +0,0 @@
-/*
- * CalorimeterBase.java
- *
- * Created on July 17, 2005, 3:56 PM
- *
- */
-package org.lcsim.geometry.subdetector;
-
-import org.jdom.Element;
-import org.jdom.JDOMException;
-import org.lcsim.geometry.Calorimeter;
-
-/**
- *
- * @author jeremym
- */
-abstract class CalorimeterBase
- extends LayeredSubdetectorBase implements Calorimeter
-{
- /** Creates a new instance of CalorimeterBase */
- public CalorimeterBase(Element node) throws JDOMException
- {
- super(node);
- }
-
- public CalorimeterIDDecoder getCalorimeterIDDecoder()
- {
- return (CalorimeterIDDecoder)(getReadout().getIDDecoder() );
- }
-
- public boolean isCalorimeter()
- {
- return true;
- }
-}
\ No newline at end of file
GeomConverter/src/org/lcsim/geometry/subdetector
diff -N CylindricalTracker.java
--- CylindricalTracker.java 24 Aug 2005 06:10:57 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,67 +0,0 @@
-/*
- * CylindricalTracker.java
- *
- * Created on August 20, 2005, 12:58 PM
- *
- */
-
-package org.lcsim.geometry.subdetector;
-
-import org.jdom.Element;
-import org.jdom.JDOMException;
-import org.lcsim.geometry.CylindricalSubdetector;
-
-/**
- *
- * @author jeremym
- */
-abstract class CylindricalTracker extends TrackerBase
- implements CylindricalSubdetector
-{
- private double zmax;
- private double zmin;
- private double rmin;
- private double rmax;
-
- public CylindricalTracker(Element node) throws JDOMException
- {
- super(node);
- build(node);
- }
-
- private void build(Element node) throws JDOMException
- {
- Element dimensions = node.getChild("dimensions");
-
- if ( dimensions == null )
- {
- throw new JDOMException("Missing dimensions element.");
- }
-
- rmin = dimensions.getAttribute("inner_r").getDoubleValue();
- zmax = dimensions.getAttribute("outer_z").getDoubleValue();
- zmin = -zmax;
- rmax = rmin + getLayering().getLayers().getTotalThickness();
- getLayering().setOffset(rmin);
- }
-
- public double getZMax()
- {
- return zmax;
- }
-
- public double getZMin()
- {
- return zmin;
- }
-
- public double getOuterRadius()
- {
- return rmax;
- }
-
- public double getInnerRadius()
- {
- return rmin;
- }
-}
\ No newline at end of file
GeomConverter/src/org/lcsim/geometry/subdetector
diff -N LayeredSubdetector.java
--- LayeredSubdetector.java 20 Jul 2005 19:11:59 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,20 +0,0 @@
-/*
- * LayeredSubdetector.java
- *
- * Created on July 17, 2005, 4:32 PM
- *
- */
-
-package org.lcsim.geometry.subdetector;
-
-import org.lcsim.geometry.layer.Layering;
-import org.lcsim.geometry.*;
-
-/**
- *
- * @author jeremym
- */
-public interface LayeredSubdetector extends Subdetector
-{
- Layering getLayering();
-}
\ No newline at end of file
GeomConverter/src/org/lcsim/geometry/subdetector
diff -N LayeredSubdetectorBase.java
--- LayeredSubdetectorBase.java 20 Jul 2005 19:11:59 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,44 +0,0 @@
-/*
- * LayeredSubdetector.java
- *
- * Created on July 17, 2005, 5:49 PM
- *
- */
-
-package org.lcsim.geometry.subdetector;
-
-import org.lcsim.geometry.layer.Layering;
-import org.jdom.Element;
-import org.jdom.JDOMException;
-
-/**
- *
- * @author jeremym
- */
-class LayeredSubdetectorBase extends SubdetectorBase
- implements org.lcsim.geometry.subdetector.LayeredSubdetector
-{
- protected Layering layering;
-
- /** Creates a new instance of a LayeredSubdetector */
- public LayeredSubdetectorBase(Element node) throws JDOMException
- {
- super(node);
- build(node);
- }
-
- private void build(Element node) throws JDOMException
- {
- layering = org.lcsim.geometry.layer.Layering.makeLayering(node);
- }
-
- public boolean isLayered()
- {
- return true;
- }
-
- public Layering getLayering()
- {
- return layering;
- }
-}
\ No newline at end of file
GeomConverter/src/org/lcsim/geometry/subdetector
diff -N SubdetectorBase.java
--- SubdetectorBase.java 24 Aug 2005 06:10:58 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,45 +0,0 @@
-/*
- * SubdetectorBase.java
- *
- * Created on July 17, 2005, 3:22 PM
- *
- */
-
-package org.lcsim.geometry.subdetector;
-
-/* JDOM dependence from org.lcsim.geometry.compact.Subdetector */
-import hep.graphics.heprep.HepRep;
-import hep.graphics.heprep.HepRepFactory;
-import org.jdom.Element;
-import org.jdom.JDOMException;
-import org.lcsim.geometry.HepRepProvider;
-import org.lcsim.geometry.subdetector.SubdetectorIDDecoder;
-
-/**
- *
- * @author jeremym
- *
- * This class is supposed to simplify inheritance hierarchy for org.lcsim.geometry.subdetector
- * implementation classes, which extend it.
- *
- */
-abstract class SubdetectorBase
- extends org.lcsim.geometry.compact.Subdetector
- implements HepRepProvider
-{
- /** Creates a new instance of SubdetectorBase */
- public SubdetectorBase(Element node) throws JDOMException
- {
- super(node);
- }
-
- public SubdetectorIDDecoder getSubdetectorIDDecoder()
- {
- return (SubdetectorIDDecoder)(getReadout().getIDDecoder() );
- }
-
- /** HepRepProvider: optional impl for subclass */
- /** FIXME: Should live in org.lcsim.geometry.heprep or equivalent. */
- public void appendHepRep(HepRepFactory factory, HepRep heprep)
- {}
-}
\ No newline at end of file
GeomConverter/src/org/lcsim/geometry/subdetector
diff -N TrackerBase.java
--- TrackerBase.java 24 Aug 2005 06:10:58 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,39 +0,0 @@
-/*
- * TrackerBase.java
- *
- * Created on July 17, 2005, 3:20 PM
- *
-*/
-package org.lcsim.geometry.subdetector;
-
-import org.lcsim.geometry.Tracker;
-import org.jdom.Element;
-import org.jdom.JDOMException;
-import org.lcsim.geometry.TrackerIDDecoder;
-
-/**
- *
- * @author jeremym
- *
- * Assumes that all concrete Tracker types will implement Layering interface.
- */
-abstract class TrackerBase
- extends LayeredSubdetectorBase
- implements Tracker
-{
- /** Creates a new instance of TrackerBase */
- public TrackerBase(Element node) throws JDOMException
- {
- super(node);
- }
-
- public org.lcsim.geometry.TrackerIDDecoder getTrackerIDDecoder()
- {
- return (org.lcsim.geometry.TrackerIDDecoder)(getReadout().getIDDecoder() );
- }
-
- public boolean isTracker()
- {
- return true;
- }
-}
\ No newline at end of file
CVSspam 0.2.8