lcsim/src/org/lcsim/recon/pfa/identifier
diff -u -r1.2 -r1.3
--- SimpleNeutralParticleMaker.java 5 Jul 2006 20:19:29 -0000 1.2
+++ SimpleNeutralParticleMaker.java 11 Jul 2006 17:22:48 -0000 1.3
@@ -16,7 +16,7 @@
*
* Currently, PID is predetermined and the energy calibration is ad-hoc.
*
- * @version $Id: SimpleNeutralParticleMaker.java,v 1.2 2006/07/05 20:19:29 mcharles Exp $
+ * @version $Id: SimpleNeutralParticleMaker.java,v 1.3 2006/07/11 17:22:48 mcharles Exp $
*/
public class SimpleNeutralParticleMaker extends Driver
@@ -37,7 +37,7 @@
hep.physics.particle.properties.ParticlePropertyProvider mgr =
hep.physics.particle.properties.ParticlePropertyManager.getParticlePropertyProvider();
hep.physics.particle.properties.ParticleType type = mgr.get(pdg);
- double m_mass = type.getMass();
+ m_mass = type.getMass();
}
// Process one event
@@ -50,11 +50,12 @@
for (Cluster clus : inputClusterList) {
LocalReconstructedParticle part = new LocalReconstructedParticle();
part.addCluster(clus);
- double energy = estimateClusterEnergy(clus); // clumsy, not a real calibration...
- part.setEnergy(energy);
+ double clusterEnergy = estimateClusterEnergy(clus); // clumsy, not a real calibration...
+ double particleEnergy = Math.sqrt(clusterEnergy*clusterEnergy + m_mass*m_mass);
+ part.setEnergy(particleEnergy);
// Set the other particle properties that are needed to render
// properly in the event display.
- part.setMomentum(computeMomentum(energy, clus));
+ part.setMomentum(computeMomentum(particleEnergy, clus));
part.setReferencePoint(new BasicHep3Vector(0,0,0));
part.setCharge(0);
// Add to the output list