Print

Print


Commit in lcsim on MAIN
pom.xml+3-21.87 -> 1.88
test/org/lcsim/CombinedTrackerDigiTest.java+4-11.4 -> 1.5
              /HitMixingTest.java+2-21.3 -> 1.4
              /HitPositionTest.java+10-751.2 -> 1.3
              /SamplingFractionTest.java+1-31.2 -> 1.3
test/org/lcsim/detector/tracker/readout/DetectorIdentifierHelperTest.java+249-2431.1 -> 1.2
                                       /TrackerHitDriver_User_Test.java+5-41.8 -> 1.9
test/org/lcsim/digisim/DigiSimCalorimeterHitIOTest.java+3-31.2 -> 1.3
test/org/lcsim/recon/tracking/seedtracker/SeedTrackerVSTest.java+18-101.1 -> 1.2
test/org/lcsim/util/event/CellIDEncodingTest.java+2-71.2 -> 1.3
test/org/lcsim/util/lcio/RawTrackerHitIOTest.java+2-21.2 -> 1.3
test/org/lcsim/util/loop/LCIODriverTest.java+2-21.4 -> 1.5
+301-354
12 modified files
fix the build after losing test data; tests now only require 3 small test files from http://www.lcsim.org/test/lcio

lcsim
pom.xml 1.87 -> 1.88
diff -u -r1.87 -r1.88
--- pom.xml	12 Mar 2009 22:50:08 -0000	1.87
+++ pom.xml	12 Mar 2009 23:44:43 -0000	1.88
@@ -119,8 +119,9 @@
                         <exclude>org/lcsim/recon/cluster/directedtree/DirectedTreeCompareTest.java</exclude>
                         <exclude>org/lcsim/recon/cluster/nn/NearestNeighborClustererTest.java</exclude> 
                         <exclude>org/lcsim/CombinedTrackerDigiTest.java</exclude>
-                        <exclude>org/lcsim/LCIOReadTests.java</exclude>
-                        <exclude>org/lcsim/LCIOReconReadTest.java</exclude>
+                        <exclude>org/lcsim/LCIOReadTest.java</exclude>
+                        <exclude>org/lcsim/LCIOReconReadTest.java</exclude> 
+                        <exclude>org/lcsim/detector/tracker/readout/TrackerHitDriver_User_Test.java</exclude>
                     </excludes>
                 </configuration>
             </plugin>

lcsim/test/org/lcsim
CombinedTrackerDigiTest.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- CombinedTrackerDigiTest.java	24 Feb 2009 19:39:07 -0000	1.4
+++ CombinedTrackerDigiTest.java	12 Mar 2009 23:44:43 -0000	1.5
@@ -9,12 +9,15 @@
 import org.lcsim.util.cache.FileCache;
 import org.lcsim.util.loop.LCSimLoop;
 
+/**
+ * @author jeremym
+ */
 public class CombinedTrackerDigiTest extends TestCase 
 {
 	public void test() throws Exception 
 	{			
 		FileCache cache = new FileCache();
-		File file = cache.getCachedFile(new URL("http://www.lcsim.org/test/lcio/muons_Theta4-176_1-10GeV_SLIC-v2r5p3_geant4-v9r1p2_LCPhys_sid01_planar_tracker.slcio"));				
+		File file = cache.getCachedFile(new URL("http://www.lcsim.org/test/lcio/mu_10.0GeV_Theta90_SLIC-v2r5p3_geant4-v9r1p2_LCPhys_sid02.slcio"));				
 		LCSimLoop loop = new LCSimLoop();		
 		loop.setLCIORecordSource(file); 
 		loop.add(new DigiSeedTrackerDriver());

lcsim/test/org/lcsim
HitMixingTest.java 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- HitMixingTest.java	29 Jan 2009 23:50:32 -0000	1.3
+++ HitMixingTest.java	12 Mar 2009 23:44:43 -0000	1.4
@@ -29,12 +29,12 @@
     public void testMix() throws IOException, LoopException
     {
         FileCache cache = new FileCache();
-        File events = cache.getCachedFile(new URL("http://www.lcsim.org/test/lcio/muons10_Theta4-176_1-10GeV_SLIC_v2r2p1_sid01.slcio"));        
+        File events = cache.getCachedFile(new URL("http://www.lcsim.org/test/lcio/muons10_Theta4-176_1-10GeV_SLIC-v2r5p3_geant4-v9r1p2_LCPhys_sid02.slcio"));        
         LCSimLoop loop = new LCSimLoop();
         loop.setLCIORecordSource(events);
         loop.add(new MixDriver());
         loop.add(new CheckDriver());
-        loop.loop(1,null);
+        loop.loop(-1,null);
         loop.dispose();
     }
     

lcsim/test/org/lcsim
HitPositionTest.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- HitPositionTest.java	11 Sep 2007 00:21:01 -0000	1.2
+++ HitPositionTest.java	12 Mar 2009 23:44:43 -0000	1.3
@@ -4,53 +4,32 @@
 import java.net.URL;
 import java.util.List;
 
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
 import org.lcsim.event.EventHeader;
 import org.lcsim.event.SimCalorimeterHit;
 import org.lcsim.geometry.IDDecoder;
 import org.lcsim.geometry.Subdetector;
-import org.lcsim.geometry.util.BaseIDDecoder;
 import org.lcsim.util.Driver;
 import org.lcsim.util.cache.FileCache;
 import org.lcsim.util.loop.LCSimLoop;
 
-import junit.framework.*;
-
 /**
+ * Tests whether position from hit matches the decoder's position from Id
+ * and segmentation calculations.
  * @author tonyj
+ * @author jeremym
  */
 public class HitPositionTest extends TestCase
 {
-    private static final String[] detectors =
-    { "sdfeb05", "sdjan03", "sdjan03", "sidmay05", "sidmay05_20mr", "sidmay05_2mr", "sidmay05_np", "sidmay05_scinthcal" };
     private static final String[] colls =
     { "EcalBarrHits", "EcalEndcapHits", "HcalBarrHits", "HcalEndcapHits" };
-    private int recordCount = 0;
-    private static final int maxEvents = 50;
 
     public void testHitPosition() throws Exception
     {
-        for (String detectorName : getDetectors())
-        {
-            runTestFile(getBaseURL() + getFileChunk() + detectorName + ".slcio");
-        }
-    }
-
-    /** Base URL for test files. */
-    private static final String getBaseURL()
-    {
-        return "http://www.lcsim.org/test/lcio/";
-    }
-
-    /** Chunk of pathname to detector tag. */
-    private static final String getFileChunk()
-    {
-        return "n/n_Theta90_1GeV_SLIC_v1r9p1_";
-    }
-
-    public void testMuScan() throws Exception
-    {
-        runTestFile("http://www.lcsim.org/test/lcio/muons_SLIC_v1r9p1_sidmay05.slcio");
-        runTestFile("http://www.lcsim.org/test/lcio/muons_SLIC_v1r9p1_sidmay05_np.slcio");
+        runTestFile("http://www.lcsim.org/test/lcio/mu_10.0GeV_Theta90_SLIC-v2r5p3_geant4-v9r1p2_LCPhys_sid02.slcio");
     }
 
     private void runTestFile(String s) throws Exception
@@ -59,26 +38,13 @@
         FileCache cache = new FileCache();
         File file = cache.getCachedFile(url);
 
-        recordCount = 0;
         LCSimLoop loop = new LCSimLoop();
         loop.setLCIORecordSource(file);
         loop.add(new HitPositionDriver());
-        loop.loop(maxEvents, null);
+        loop.loop(-1);
         loop.dispose();
     }
 
-    /** Collections to test. */
-    private static final String[] getColls()
-    {
-        return colls;
-    }
-
-    /** Detectors to test. */
-    private static final String[] getDetectors()
-    {
-        return detectors;
-    };
-
     public HitPositionTest(String testName)
     {
         super(testName);
@@ -89,19 +55,10 @@
         return new TestSuite(HitPositionTest.class);
     }
 
-    // protected void setUp() throws Exception
-    // {
-    // }
-
-    /**
-     * Tests whether position from hit matches the decoder's position from Id
-     * and segmentation calculations.
-     */
     private class HitPositionDriver extends Driver
     {
         public void process(EventHeader event)
         {
-            ++recordCount;
             for (String s : colls)
             {
                 List<SimCalorimeterHit> hits = event.get(SimCalorimeterHit.class, s);
@@ -118,18 +75,7 @@
                     decoder.setID(id);
 
                     double[] pos = hit.getPosition();
-                    // if ( s == colls[0] )
-                    // {
-                    // System.out.println("");
-                    // System.out.println("hit: " + pos[0] + " " + pos[1] + " "
-                    // + pos[2]);
-                    // System.out.println("dec: " + decoder.getX() + " " +
-                    // decoder.getY() + " " + decoder.getZ() +
-                    // " " + decoder.getTheta() + " " + decoder.getPhi() + " " +
-                    // decoder.getValue("phi") + " " + decoder.getValue("z") );
-                    // }
-                    // FIXME: Could be added to IDDecoder as checkPosition()
-                    // with tolerance.
+
                     assertEquals(decoder.getX(), pos[0], 0.001);
                     assertEquals(decoder.getY(), pos[1], 0.001);
                     assertEquals(decoder.getZ(), pos[2], 0.001);
@@ -140,17 +86,6 @@
                     {
                         throw new RuntimeException("IDDecoder's Subdetector is null.");
                     }
-
-                    /* subdetector and decoder should agree on basic flags... */
-                    // BaseIDDecoder = (BaseIDDecoder) bdec;
-                    // if ( subdet.isBarrel() )
-                    // {
-                    // assertTrue(bdec.getBarrelEndcapFlag().isBarrel());
-                    // }
-                    // if ( subdet.isEndcap())
-                    // {
-                    // assertTrue(bdec.getBarrelEndcapFlag().isEndcap());
-                    // }
                 }
             }
         }

lcsim/test/org/lcsim
SamplingFractionTest.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- SamplingFractionTest.java	11 Sep 2007 00:21:00 -0000	1.2
+++ SamplingFractionTest.java	12 Mar 2009 23:44:43 -0000	1.3
@@ -33,9 +33,7 @@
 
     public void testLCIORead() throws Exception
     {
-        // URL url = new
-        // URL("http://www.lcsim.org/datasamples/slic_sdjan03_K0S_Theta90_1-10GeV.slcio");
-        URL url = new URL("http://www.lcsim.org/test/lcio/muons_SLIC_v1r9p1_sidmay05.slcio");
+        URL url = new URL("http://www.lcsim.org/test/lcio/muons10_Theta4-176_1-10GeV_SLIC-v2r5p3_geant4-v9r1p2_LCPhys_sid02.slcio");
         FileCache cache = new FileCache();
         File file = cache.getCachedFile(url);
 

lcsim/test/org/lcsim/detector/tracker/readout
DetectorIdentifierHelperTest.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- DetectorIdentifierHelperTest.java	9 Apr 2008 14:04:06 -0000	1.1
+++ DetectorIdentifierHelperTest.java	12 Mar 2009 23:44:43 -0000	1.2
@@ -8,7 +8,8 @@
 import junit.framework.TestCase;
 
 import org.freehep.record.loop.LoopException;
-import org.lcsim.detector.driver.*;
+import org.lcsim.detector.DetectorIdentifierHelper;
+import org.lcsim.detector.IDetectorElement;
 import org.lcsim.detector.identifier.IIdentifier;
 import org.lcsim.detector.identifier.Identifier;
 import org.lcsim.event.EventHeader;
@@ -19,256 +20,261 @@
 import org.lcsim.util.Driver;
 import org.lcsim.util.cache.FileCache;
 import org.lcsim.util.loop.LCSimLoop;
-import org.lcsim.detector.IDetectorElement;
-import org.lcsim.detector.DetectorIdentifierHelper;
 
 /**
  * Tests the functionality of {@link org.lcsim.detector.DetectorIdHelper}
  * on an sid01 LCIO file.
  *
  * @author Jeremy McCormick <[log in to unmask]>
- * @version $Id: DetectorIdentifierHelperTest.java,v 1.1 2008/04/09 14:04:06 tknelson Exp $
+ * @version $Id: DetectorIdentifierHelperTest.java,v 1.2 2009/03/12 23:44:43 jeremy Exp $
  */
 
 public class DetectorIdentifierHelperTest extends TestCase
 {
-   public void testDetectorIdHelper()
-   {
-      File file = null;
-      try
-      {
-         FileCache cache = new FileCache();
-         file = cache.getCachedFile(new URL("http://www.lcsim.org/test/lcio/pythiaZPoleuds-0-1000_SLIC-v2r3p7_geant4-v9r0p1_LCPhys_sid01.slcio"));
-         LCSimLoop loop = new LCSimLoop();
-         loop.setLCIORecordSource(file);
-         loop.add(new TrackerDriver());
-         loop.add(new CalorimeterDriver());
-         loop.loop(1,null);
-         loop.dispose();
-      }
-      catch (IOException x)
-      {
-         throw new RuntimeException(x);
-      }
-      catch (LoopException x)
-      {
-         throw new RuntimeException(x);
-      }
-   }
-   
-   class CalorimeterDriver extends Driver
-   {
-      protected void process(EventHeader event)
-      {
-         int ecalBarrel, ecalEndcap, hcalBarrel, hcalEndcap, forwardEcal, lumi, muonBarrel, muonEndcap;
-         ecalBarrel = ecalEndcap = hcalBarrel = hcalEndcap = forwardEcal = lumi = muonBarrel = muonEndcap = 0;
-         List<List<SimCalorimeterHit>> collections = event.get(SimCalorimeterHit.class);
-         for (List<SimCalorimeterHit> collection: collections)
-         {
-            LCMetaData meta = event.getMetaData(collection);
-            String collectionName = meta.getName(); 
-            Subdetector subdet = meta.getIDDecoder().getSubdetector();
-            IDetectorElement deSubdet = subdet.getDetectorElement();
-            DetectorIdentifierHelper idHelper = (DetectorIdentifierHelper)deSubdet.getIdentifierHelper();
-            
-            for (SimCalorimeterHit hit : collection)
-            {
-               IIdentifier hitId = new Identifier(hit.getCellID());
-               
-               assertTrue(idHelper.isCalorimeter(hitId));
-               
-               if (subdet.isBarrel())
-               {
-                  assertTrue(idHelper.isBarrel(hitId));
-                  assertTrue(idHelper.isCalorimeterBarrel(hitId));
-               }
-               
-               if (subdet.isEndcap())
-               {
-                  assertTrue(idHelper.isEndcap(hitId));
-                  assertTrue(idHelper.isCalorimeterEndcap(hitId));
-                  
-                  if (hit.getPosition()[2] > 0)
-                  {
-                     assertTrue(idHelper.isCalorimeterEndcapPositive(hitId));
-                  }
-                  else
-                  {
-                     assertTrue(idHelper.isCalorimeterEndcapNegative(hitId));
-                  }
-               }
-               
-               if (collectionName.equals("EcalBarrHits"))
-               {
-                  assertTrue(idHelper.isEcal(hitId));
-                  assertTrue(idHelper.isBarrel(hitId));
-               }
-               
-               if (collectionName.equals("EcalEndcapHits"))
-               {
-                  assertTrue(idHelper.isEcal(hitId));
-                  assertTrue(idHelper.isEcalEndcap(hitId));
-                  if (hit.getPosition()[2] > 0)
-                  {
-                     assertTrue(idHelper.isEcalEndcapPositive(hitId));
-                  }
-                  else
-                  {
-                     assertTrue(idHelper.isEcalEndcapNegative(hitId));
-                  }
-               }
-               
-               if (collectionName.equals("HcalBarrHits"))
-               {
-                  assertTrue(idHelper.isHcal(hitId));
-                  assertTrue(idHelper.isHcalBarrel(hitId));
-               }
-               
-               if (collectionName.equals("HcalEndcapHits"))
-               {
-                  assertTrue(idHelper.isHcal(hitId));
-                  assertTrue(idHelper.isHcalEndcap(hitId));
-                  if (hit.getPosition()[2] > 0)
-                  {
-                     assertTrue(idHelper.isHcalEndcapPositive(hitId));
-                  }
-                  else
-                  {
-                     assertTrue(idHelper.isHcalEndcapNegative(hitId));
-                  }
-               }
-               
-               if (collectionName.equals("MuonBarrHits"))
-               {
-                  assertTrue(idHelper.isMuon(hitId));
-                  assertTrue(idHelper.isMuonBarrel(hitId));
-               }
-               
-               if (collectionName.equals("MuonEndcapHits"))
-               {
-                  assertTrue(idHelper.isMuon(hitId));
-                  assertTrue(idHelper.isMuonEndcap(hitId));
-                  if (hit.getPosition()[2] > 0)
-                  {
-                     assertTrue(idHelper.isMuonEndcapPositive(hitId));
-                  }
-                  else
-                  {
-                     assertTrue(idHelper.isMuonEndcapNegative(hitId));
-                  }
-               }
-               
-               if (collectionName.equals("LuminosityMonitorHits"))
-               {
-                  assertTrue(idHelper.isLumi(hitId));
-                  
-                  if (hit.getPosition()[2] > 0)
-                  {
-                     assertTrue(idHelper.isLumiEndcapPositive(hitId));
-                  }
-                  else
-                  {
-                     assertTrue(idHelper.isLumiEndcapNegative(hitId));
-                  }
-               }
-               
-               if (collectionName.equals("ForwardEcalEndcapHits"))
-               {
-                  assertTrue(idHelper.isEcalForward(hitId));
-                  
-                  if (hit.getPosition()[2] > 0)
-                  {
-                     assertTrue(idHelper.isEcalForwardEndcapPositive(hitId));
-                  }
-                  else
-                  {
-                     assertTrue(idHelper.isEcalForwardEndcapNegative(hitId));
-                  }
-               }
-            }
-         }
-      }
-   }
-   
-   class TrackerDriver extends Driver
-   {
-      protected void process(EventHeader event)
-      {
-         event.getDetector();
-         int sitBarrel, sitEndcap, vtxBarrel, vtxEndcap;
-         sitBarrel = sitEndcap = vtxBarrel = vtxEndcap = 0;
-         List<List<SimTrackerHit>> collections = event.get(SimTrackerHit.class);
-         for (List<SimTrackerHit> collection : collections)
-         {
-            LCMetaData meta = event.getMetaData(collection);
-            String collectionName = meta.getName();
-            Subdetector subdet = meta.getIDDecoder().getSubdetector();
-            if (subdet == null)
-               throw new RuntimeException("Oops!  Subdetector for collection " + meta.getName() + " is null!");
-            IDetectorElement deSubdet = subdet.getDetectorElement();
-            DetectorIdentifierHelper idHelper = (DetectorIdentifierHelper)deSubdet.getIdentifierHelper();
-            
-            IIdentifier subdetId = deSubdet.getIdentifier();
-            
-            for (SimTrackerHit hit : collection)
-            {
-               IIdentifier hitId = new Identifier(hit.getCellID());
-               
-               assertTrue(idHelper.isTracker(hitId));
-               
-               if (subdet.isBarrel())
-               {
-                  assertTrue(idHelper.isBarrel(hitId));
-                  assertTrue(idHelper.isTrackerBarrel(hitId));
-               }
-               
-               if (subdet.isEndcap())
-               {
-                  assertTrue(idHelper.isEndcap(hitId));
-                  assertTrue(idHelper.isTrackerEndcap(hitId));
-               }
-               
-               if (collectionName.equals("TkrBarrHits"))
-               {
-                  assertTrue(idHelper.isSit(hitId));
-                  assertTrue(idHelper.isSitBarrel(hitId));
-               }
-               
-               if (collectionName.equals("TkrEndcapHits"))
-               {
-                  assertTrue(idHelper.isSit(hitId));
-                  assertTrue(idHelper.isSitEndcap(hitId));
-                  if (hit.getPoint()[2] > 0)
-                  {
-                     assertTrue(idHelper.isSitEndcapPositive(hitId));
-                  }
-                  else
-                  {
-                     assertTrue(idHelper.isSitEndcapNegative(hitId));
-                  }
-               }
-               
-               if (collectionName.equals("VtxBarrHits"))
-               {
-                  assertTrue(idHelper.isVtx(hitId));
-                  assertTrue(idHelper.isVtxBarrel(hitId));
-               }
-               
-               if (collectionName.equals("VtxEndcapHits"))
-               {
-                  assertTrue(idHelper.isVtx(hitId));
-                  assertTrue(idHelper.isVtxEndcap(hitId));
-                  if (hit.getPoint()[2] > 0)
-                  {
-                     assertTrue(idHelper.isVtxEndcapPositive(hitId));
-                  }
-                  else
-                  {
-                     assertTrue(idHelper.isVtxEndcapNegative(hitId));
-                  }
-               }
-            }
-         }         
-      }
-   }
+	public void testDetectorIdHelper()
+	{
+		File file = null;
+		try
+		{
+			FileCache cache = new FileCache();
+			file = cache.getCachedFile(new URL("http://www.lcsim.org/test/lcio/muons10_Theta4-176_1-10GeV_SLIC-v2r5p3_geant4-v9r1p2_LCPhys_sid02.slcio"));
+			LCSimLoop loop = new LCSimLoop();
+			loop.setLCIORecordSource(file);
+			loop.add(new TrackerDriver());
+			loop.add(new CalorimeterDriver());
+			loop.loop(1,null);
+			loop.dispose();
+		}
+		catch (IOException x)
+		{
+			throw new RuntimeException(x);
+		}
+		catch (LoopException x)
+		{
+			throw new RuntimeException(x);
+		}
+	}
+
+	class CalorimeterDriver extends Driver
+	{
+		protected void process(EventHeader event)
+		{
+			//int ecalBarrel, ecalEndcap, hcalBarrel, hcalEndcap, forwardEcal, lumi, muonBarrel, muonEndcap;
+			//ecalBarrel = ecalEndcap = hcalBarrel = hcalEndcap = forwardEcal = lumi = muonBarrel = muonEndcap = 0;
+			List<List<SimCalorimeterHit>> collections = event.get(SimCalorimeterHit.class);
+			for (List<SimCalorimeterHit> collection: collections)
+			{
+				LCMetaData meta = event.getMetaData(collection);
+				String collectionName = meta.getName(); 
+				Subdetector subdet = meta.getIDDecoder().getSubdetector();
+				IDetectorElement deSubdet = subdet.getDetectorElement();
+
+				if (deSubdet != null)
+				{
+					DetectorIdentifierHelper idHelper = (DetectorIdentifierHelper)deSubdet.getIdentifierHelper();
+
+					if (idHelper != null)					
+					{
+						for (SimCalorimeterHit hit : collection)
+						{
+							IIdentifier hitId = new Identifier(hit.getCellID());
+							
+							assertTrue(idHelper.isCalorimeter(hitId));
+
+							if (subdet.isBarrel())
+							{
+								assertTrue(idHelper.isBarrel(hitId));
+								assertTrue(idHelper.isCalorimeterBarrel(hitId));
+							}
+
+							if (subdet.isEndcap())
+							{
+								assertTrue(idHelper.isEndcap(hitId));
+								assertTrue(idHelper.isCalorimeterEndcap(hitId));
+
+								if (hit.getPosition()[2] > 0)
+								{
+									assertTrue(idHelper.isCalorimeterEndcapPositive(hitId));
+								}
+								else
+								{
+									assertTrue(idHelper.isCalorimeterEndcapNegative(hitId));
+								}
+							}
+
+							if (collectionName.equals("EcalBarrHits"))
+							{
+								assertTrue(idHelper.isEcal(hitId));
+								assertTrue(idHelper.isBarrel(hitId));
+							}
+
+							if (collectionName.equals("EcalEndcapHits"))
+							{
+								assertTrue(idHelper.isEcal(hitId));
+								assertTrue(idHelper.isEcalEndcap(hitId));
+								if (hit.getPosition()[2] > 0)
+								{
+									assertTrue(idHelper.isEcalEndcapPositive(hitId));
+								}
+								else
+								{
+									assertTrue(idHelper.isEcalEndcapNegative(hitId));
+								}
+							}
+
+							if (collectionName.equals("HcalBarrHits"))
+							{
+								assertTrue(idHelper.isHcal(hitId));
+								assertTrue(idHelper.isHcalBarrel(hitId));
+							}
+
+							if (collectionName.equals("HcalEndcapHits"))
+							{
+								assertTrue(idHelper.isHcal(hitId));
+								assertTrue(idHelper.isHcalEndcap(hitId));
+								if (hit.getPosition()[2] > 0)
+								{
+									assertTrue(idHelper.isHcalEndcapPositive(hitId));
+								}
+								else
+								{
+									assertTrue(idHelper.isHcalEndcapNegative(hitId));
+								}
+							}
+
+							if (collectionName.equals("MuonBarrHits"))
+							{
+								assertTrue(idHelper.isMuon(hitId));
+								assertTrue(idHelper.isMuonBarrel(hitId));
+							}
+
+							if (collectionName.equals("MuonEndcapHits"))
+							{
+								assertTrue(idHelper.isMuon(hitId));
+								assertTrue(idHelper.isMuonEndcap(hitId));
+								if (hit.getPosition()[2] > 0)
+								{
+									assertTrue(idHelper.isMuonEndcapPositive(hitId));
+								}
+								else
+								{
+									assertTrue(idHelper.isMuonEndcapNegative(hitId));
+								}
+							}
+
+							if (collectionName.equals("LuminosityMonitorHits"))
+							{
+								assertTrue(idHelper.isLumi(hitId));
+
+								if (hit.getPosition()[2] > 0)
+								{
+									assertTrue(idHelper.isLumiEndcapPositive(hitId));
+								}
+								else
+								{
+									assertTrue(idHelper.isLumiEndcapNegative(hitId));
+								}
+							}
+
+							if (collectionName.equals("ForwardEcalEndcapHits"))
+							{
+								assertTrue(idHelper.isEcalForward(hitId));
+
+								if (hit.getPosition()[2] > 0)
+								{
+									assertTrue(idHelper.isEcalForwardEndcapPositive(hitId));
+								}
+								else
+								{
+									assertTrue(idHelper.isEcalForwardEndcapNegative(hitId));
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+	class TrackerDriver extends Driver
+	{
+		protected void process(EventHeader event)
+		{
+			event.getDetector();
+			int sitBarrel, sitEndcap, vtxBarrel, vtxEndcap;
+			sitBarrel = sitEndcap = vtxBarrel = vtxEndcap = 0;
+			List<List<SimTrackerHit>> collections = event.get(SimTrackerHit.class);
+			for (List<SimTrackerHit> collection : collections)
+			{
+				LCMetaData meta = event.getMetaData(collection);
+				String collectionName = meta.getName();
+				Subdetector subdet = meta.getIDDecoder().getSubdetector();
+				if (subdet == null)
+					throw new RuntimeException("Oops!  Subdetector for collection " + meta.getName() + " is null!");
+				IDetectorElement deSubdet = subdet.getDetectorElement();
+				DetectorIdentifierHelper idHelper = (DetectorIdentifierHelper)deSubdet.getIdentifierHelper();
+
+				IIdentifier subdetId = deSubdet.getIdentifier();
+
+				for (SimTrackerHit hit : collection)
+				{
+					IIdentifier hitId = new Identifier(hit.getCellID());
+
+					assertTrue(idHelper.isTracker(hitId));
+
+					if (subdet.isBarrel())
+					{
+						assertTrue(idHelper.isBarrel(hitId));
+						assertTrue(idHelper.isTrackerBarrel(hitId));
+					}
+
+					if (subdet.isEndcap())
+					{
+						assertTrue(idHelper.isEndcap(hitId));
+						assertTrue(idHelper.isTrackerEndcap(hitId));
+					}
+
+					if (collectionName.equals("TkrBarrHits"))
+					{
+						assertTrue(idHelper.isSit(hitId));
+						assertTrue(idHelper.isSitBarrel(hitId));
+					}
+
+					if (collectionName.equals("TkrEndcapHits"))
+					{
+						assertTrue(idHelper.isSit(hitId));
+						assertTrue(idHelper.isSitEndcap(hitId));
+						if (hit.getPoint()[2] > 0)
+						{
+							assertTrue(idHelper.isSitEndcapPositive(hitId));
+						}
+						else
+						{
+							assertTrue(idHelper.isSitEndcapNegative(hitId));
+						}
+					}
+
+					if (collectionName.equals("VtxBarrHits"))
+					{
+						assertTrue(idHelper.isVtx(hitId));
+						assertTrue(idHelper.isVtxBarrel(hitId));
+					}
+
+					if (collectionName.equals("VtxEndcapHits"))
+					{
+						assertTrue(idHelper.isVtx(hitId));
+						assertTrue(idHelper.isVtxEndcap(hitId));
+						if (hit.getPoint()[2] > 0)
+						{
+							assertTrue(idHelper.isVtxEndcapPositive(hitId));
+						}
+						else
+						{
+							assertTrue(idHelper.isVtxEndcapNegative(hitId));
+						}
+					}
+				}
+			}         
+		}
+	}
 }
\ No newline at end of file

lcsim/test/org/lcsim/detector/tracker/readout
TrackerHitDriver_User_Test.java 1.8 -> 1.9
diff -u -r1.8 -r1.9
--- TrackerHitDriver_User_Test.java	24 Feb 2009 21:18:45 -0000	1.8
+++ TrackerHitDriver_User_Test.java	12 Mar 2009 23:44:43 -0000	1.9
@@ -19,7 +19,8 @@
 import org.lcsim.util.loop.LCSimLoop;
 
 /**
- *
+ * Tests whether the tracker digitization completes successfully.
+ * @author jeremym
  */
 public class TrackerHitDriver_User_Test extends TestCase
 {
@@ -44,7 +45,7 @@
     public void testReadout() throws Exception
     {
         
-        URL url = new URL("http://www.lcsim.org/test/lcio/panpyttbar-0-500_SLIC-v2r5p3_geant4-v9r1p2_LCPhys_sid01_planar_tracker.slcio");
+        URL url = new URL("http://www.lcsim.org/test/lcio/muons10_Theta4-176_1-10GeV_SLIC-v2r5p3_geant4-v9r1p2_LCPhys_sid01_planar_tracker.slcio");
         
         FileCache cache = new FileCache();
         File file = cache.getCachedFile(url);
@@ -52,7 +53,7 @@
         LCSimLoop loop = new LCSimLoop();
         loop.setLCIORecordSource(file);
         
-        // This shouldn't be needed
+        // This shouldn't be needed???
         List<String> readouts = new ArrayList<String>();
         readouts.add("SiTrackerBarrel_RO");
         readouts.add("SiTrackerEndcap_RO");
@@ -60,7 +61,7 @@
         
         loop.add( _trackerhitdriver_user );
         loop.add( new TestDriver() );
-        loop.loop(2, null);
+        loop.loop(-1, null);
         loop.dispose();
     }
     

lcsim/test/org/lcsim/digisim
DigiSimCalorimeterHitIOTest.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- DigiSimCalorimeterHitIOTest.java	11 Sep 2007 00:21:00 -0000	1.2
+++ DigiSimCalorimeterHitIOTest.java	12 Mar 2009 23:44:43 -0000	1.3
@@ -29,17 +29,17 @@
 	public void testWrite() throws Exception
 	{	
 		FileCache cache = new FileCache();
-		File file = cache.getCachedFile(new URL("http://www.lcsim.org/test/lcio/gamma_Theta90_1GeV_SLIC_v2r0p0_acme0605-0-2.slcio"));
+		File file = cache.getCachedFile(new URL("http://www.lcsim.org/test/lcio/muons10_Theta4-176_1-10GeV_SLIC-v2r5p3_geant4-v9r1p2_LCPhys_sid02.slcio"));
 		LCSimLoop loop = new LCSimLoop();
 		loop.setLCIORecordSource(file);
 		loop.add(new SimToCalorimeterHitDriver());
-		loop.loop(2, null);
+		loop.loop(-1, null);
 		loop.dispose();
 		
 		loop = new LCSimLoop();
 		loop.setLCIORecordSource(new TestOutputFile("DigiSimWriteTest.slcio"));
 		loop.add(new CalorimeterHitPositionCheckDriver());
-		loop.loop(2, null);
+		loop.loop(-1, null);
 		loop.dispose();
 	}
 	

lcsim/test/org/lcsim/recon/tracking/seedtracker
SeedTrackerVSTest.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- SeedTrackerVSTest.java	27 Aug 2008 18:09:04 -0000	1.1
+++ SeedTrackerVSTest.java	12 Mar 2009 23:44:44 -0000	1.2
@@ -23,34 +23,41 @@
  *
  * @author cozzy
  */
-public class SeedTrackerVSTest extends TestCase{
+public class SeedTrackerVSTest extends TestCase
+{
 
-    public SeedTrackerVSTest(String testName) {
+    public SeedTrackerVSTest(String testName) 
+    {
         super(testName); 
     }
     
-    public static Test suite() {
+    public static Test suite() 
+    {
         return new TestSuite(SeedTrackerVSTest.class); 
     }
     
-    public void setUp() {
+    public void setUp() 
+    {
         System.gc();
     }
     
-    public void testSeedTrackerVS() throws Exception {
-        URL url = new URL("http://www.lcsim.org/test/lcio/muons10_Theta4-176_1-10GeV_SLIC_v2r2p1_sid01.slcio"); 
+    public void testSeedTrackerVS() throws Exception 
+    {
+        URL url = new URL("http://www.lcsim.org/test/lcio/muons10_Theta4-176_1-10GeV_SLIC-v2r5p3_geant4-v9r1p2_LCPhys_sid02.slcio"); 
         FileCache cache = new FileCache(); 
         File file = cache.getCachedFile(url); 
         LCSimLoop loop = new LCSimLoop(); 
         loop.setLCIORecordSource(file); 
         loop.add( new TestDriver()); 
-        loop.loop(5, null); 
+        loop.loop(-1, null); 
         loop.dispose(); 
     }
     
-    class TestDriver extends Driver{
+    class TestDriver extends Driver
+    {
         
-        public TestDriver() {
+        public TestDriver() 
+        {
             add(new VSExampleDriver());
             HelicalTrackHitDriver hitdriver = new HelicalTrackHitDriver();
             hitdriver.addCollection("NewTrackerHits",HitType.VirtualSegmentation);
@@ -58,7 +65,8 @@
             add( new SeedTracker(new MyStrategy().getStrategies()) );
         }
         
-        public void process(EventHeader event) {
+        public void process(EventHeader event) 
+        {
             super.process(event);
             assertFalse(event.getTracks().isEmpty()); 
             return;     

lcsim/test/org/lcsim/util/event
CellIDEncodingTest.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- CellIDEncodingTest.java	11 Sep 2007 00:21:03 -0000	1.2
+++ CellIDEncodingTest.java	12 Mar 2009 23:44:44 -0000	1.3
@@ -5,18 +5,13 @@
 
 import junit.framework.TestCase;
 
-import org.lcsim.conditions.ConditionsManager;
-import org.lcsim.conditions.ConditionsManagerImplementation;
-import org.lcsim.conditions.ConditionsReader;
 import org.lcsim.event.EventHeader;
 import org.lcsim.event.SimCalorimeterHit;
 import org.lcsim.event.EventHeader.LCMetaData;
 import org.lcsim.geometry.IDDecoder;
-import org.lcsim.util.loop.DummyConditionsConverter;
 import org.lcsim.util.Driver;
 import org.lcsim.util.cache.FileCache;
 import org.lcsim.util.loop.LCSimLoop;
-import org.lcsim.util.loop.DummyDetector;
 
 /**
  * A test that uses the {@link org.lcsim.geometry.IDDecoder}s created from 
@@ -31,7 +26,7 @@
  * @see org.lcsim.geometry.util.IDDescriptor
  * 
  * @author Jeremy McCormick
- * @version $Id: CellIDEncodingTest.java,v 1.2 2007/09/11 00:21:03 tonyj Exp $
+ * @version $Id: CellIDEncodingTest.java,v 1.3 2009/03/12 23:44:44 jeremy Exp $
  *
  */
 public class CellIDEncodingTest extends TestCase
@@ -45,7 +40,7 @@
         loop.setDummyDetector("UNKNOWN");
         loop.setLCIORecordSource((new FileCache()).getCachedFile(new URL(url)));
         loop.add(new IDDecoderCheck());
-        loop.loop(1, null);
+        loop.loop(-1, null);
         loop.dispose();
     }
     

lcsim/test/org/lcsim/util/lcio
RawTrackerHitIOTest.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- RawTrackerHitIOTest.java	27 Aug 2008 21:04:52 -0000	1.2
+++ RawTrackerHitIOTest.java	12 Mar 2009 23:44:44 -0000	1.3
@@ -30,13 +30,13 @@
 	{
 		// Read in a file and write out some test RawTrackerHits.
 		FileCache cache = new FileCache();
-		File inputFile = cache.getCachedFile(new URL("http://www.lcsim.org/test/lcio/muons_Theta4-176_1-10GeV_SLIC-v2r4p6_geant4-v9r1p2_LCPhys_sid01_planar_tracker.slcio"));
+		File inputFile = cache.getCachedFile(new URL("http://www.lcsim.org/test/lcio/muons10_Theta4-176_1-10GeV_SLIC-v2r5p3_geant4-v9r1p2_LCPhys_sid01_planar_tracker.slcio"));
 		LCSimLoop loop = new LCSimLoop();
 		loop.setLCIORecordSource(inputFile);
 		loop.add(new SimpleRawHitMaker());
 		File outputFile = new TestOutputFile("RawTrackerHitIOTest.slcio");
 		loop.add(new LCIODriver(outputFile));
-		loop.loop(5,null);
+		loop.loop(-1,null);
 		loop.dispose();
 				
 		// Read back file from above.

lcsim/test/org/lcsim/util/loop
LCIODriverTest.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- LCIODriverTest.java	29 Jan 2009 23:50:32 -0000	1.4
+++ LCIODriverTest.java	12 Mar 2009 23:44:44 -0000	1.5
@@ -29,7 +29,7 @@
 	public void testWriteOnlyCollection() throws Exception
 	{	
 		FileCache cache = new FileCache();
-		File inputFile = cache.getCachedFile(new URL("http://www.lcsim.org/test/lcio/pythiaZPoleuds-0-1000_SLIC-v2r3p7_geant4-v9r0p1_LCPhys_sid01.slcio"));
+		File inputFile = cache.getCachedFile(new URL("http://www.lcsim.org/test/lcio/mu_10.0GeV_Theta90_SLIC-v2r5p3_geant4-v9r1p2_LCPhys_sid02.slcio"));
 		
 		LCSimLoop loopWrite = new LCSimLoop();
 		loopWrite.setLCIORecordSource(inputFile);
@@ -75,7 +75,7 @@
 	public void testIgnoreCollections() throws Exception
 	{
 		FileCache cache = new FileCache();
-		File inputFile = cache.getCachedFile(new URL("http://www.lcsim.org/test/lcio/pythiaZPoleuds-0-1000_SLIC-v2r3p7_geant4-v9r0p1_LCPhys_sid01.slcio"));
+		File inputFile = cache.getCachedFile(new URL("http://www.lcsim.org/test/lcio/mu_10.0GeV_Theta90_SLIC-v2r5p3_geant4-v9r1p2_LCPhys_sid02.slcio"));
 		
 		LCSimLoop loopWrite = new LCSimLoop();
 		loopWrite.setLCIORecordSource(inputFile);
CVSspam 0.2.8