Print

Print


Commit in lcsim/src/org/lcsim/recon/pfa/identifier on MAIN
MIPChargedParticleMaker.java+6-51.7 -> 1.8
MJC: Fix bug in MIP-based track-cluster match E/p checker (avoid over-counting when multiple clusters)

lcsim/src/org/lcsim/recon/pfa/identifier
MIPChargedParticleMaker.java 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- MIPChargedParticleMaker.java	7 Sep 2007 22:49:57 -0000	1.7
+++ MIPChargedParticleMaker.java	20 Sep 2007 19:50:29 -0000	1.8
@@ -19,6 +19,7 @@
 import org.lcsim.event.ParticleID;
 import org.lcsim.event.base.BaseParticleID;
 import hep.physics.particle.properties.ParticlePropertyManager;
+import org.lcsim.recon.cluster.util.BasicCluster;
 
 /**
  * Given a list of MIP clusters and a list of tracks,
@@ -35,7 +36,7 @@
  * then the entire cluster is added to the ReconstructedParticle instead.
  * The parent must be unique.
  *
- * @version $Id: MIPChargedParticleMaker.java,v 1.7 2007/09/07 22:49:57 mcharles Exp $
+ * @version $Id: MIPChargedParticleMaker.java,v 1.8 2007/09/20 19:50:29 mcharles Exp $
  */
 
 public class MIPChargedParticleMaker extends Driver
@@ -252,11 +253,11 @@
         // in the cluster
      
         // Check energy and uncertainty from calorimeter:
-	List<Cluster> partClusters = part.getClusters();
-	double estimatedClusterEnergy = 0.0;
-	for (Cluster clus : partClusters) {
-          estimatedClusterEnergy += estimateClusterEnergy(clus);
+	BasicCluster macroCluster = new BasicCluster();
+	for (Cluster clus : part.getClusters()) {
+	    macroCluster.addCluster(clus);
 	}
+	double estimatedClusterEnergy = estimateClusterEnergy(macroCluster);
         double estimatedClusterEnergyUncertainty = 0.7 * Math.sqrt(estimatedClusterEnergy); // 70%/sqrt(E) for hadrons
         
         // Check energy from tracks
CVSspam 0.2.8