Print

Print


Commit in lcsim/src/org/lcsim/contrib/uiowa/MuonFinder on MAIN
SimpleMipQualityDecision.java+3-61.4 -> 1.5
fix bug to get isolated layer

lcsim/src/org/lcsim/contrib/uiowa/MuonFinder
SimpleMipQualityDecision.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- SimpleMipQualityDecision.java	8 Oct 2008 20:06:06 -0000	1.4
+++ SimpleMipQualityDecision.java	11 Oct 2008 01:00:34 -0000	1.5
@@ -30,11 +30,12 @@
 	// And how many instances of >1 hit in a layer?
 	Set<Integer> layersSeen = new HashSet<Integer>();
         Set<Integer> isolayer = new HashSet<Integer>();
-        CalorimeterHit outhit = null;
         Map<Integer, Set<CalorimeterHit>> exam = new HashMap<Integer, Set<CalorimeterHit>>();
-        int max = 0;
 	for (CalorimeterHit hit : mip.getCalorimeterHits()) {
+            String subdetName = hit.getSubdetector().getName();
 	    int layer = getLayer(hit);
+            //To avoid overlap with the other detector's layer
+            if(subdetName.contains("MuonEndcap")) layer = layer+100; 
 	    Integer layerInt = new Integer(layer);
             if (!layersSeen.contains(layerInt)) {
                 layersSeen.add(layerInt);
@@ -52,12 +53,8 @@
                     exam.put(layerInt,hits);
                 }
                 hits.add(hit);
-
                 if(exam.get(layerInt).size() > 2){  isolayer.remove(layerInt); }
             }
-            if(layer > max){
-                max = layer;
-            }
 	}
        
         int count = 3;
CVSspam 0.2.8