GeomConverter/src/org/lcsim/detector/tracker/silicon
diff -u -r1.4 -r1.5
--- SiSensor.java 8 May 2007 06:41:53 -0000 1.4
+++ SiSensor.java 8 May 2007 23:39:47 -0000 1.5
@@ -9,20 +9,22 @@
* Open. You can then make changes to the template in the Source Editor.
*/
-import org.lcsim.detector.IDetectorElement;
-import org.lcsim.detector.DetectorElement;
-import org.lcsim.detector.IPhysicalVolumePath;
-import org.lcsim.detector.solids.Box;
-import org.lcsim.detector.Rotation3D;
-import org.lcsim.detector.converter.compact.DeDetector;
-//import static org.lcsim.units.clhep.SystemOfUnits.*;
-//import static org.lcsim.units.clhep.PhysicalConstants.*;
-
-import hep.physics.vec.Hep3Vector;
import hep.physics.vec.BasicHep3Vector;
+import hep.physics.vec.Hep3Vector;
import hep.physics.vec.VecOp;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.EnumMap;
+import java.util.List;
+import java.util.Map;
+
+import org.lcsim.detector.DetectorElement;
+import org.lcsim.detector.IDetectorElement;
+import org.lcsim.detector.Rotation3D;
+import org.lcsim.detector.converter.compact.DeDetector;
+import org.lcsim.detector.converter.compact.DeSubdetector;
+import org.lcsim.detector.identifier.IIdentifierHelper;
+import org.lcsim.detector.solids.Box;
/**
*
@@ -493,6 +495,16 @@
" Property 1";
return output;
}
+
+ public IIdentifierHelper getIdentifierHelper()
+ {
+ List<DeSubdetector> subdet = findAncestors(DeSubdetector.class);
+ if ( subdet.size() == 0 )
+ {
+ throw new RuntimeException("Can't find DeSubdetector for SiSensor!");
+ }
+ return subdet.get(0).getIdentifierHelper();
+ }