lcsim/src/org/lcsim/mc/fast/reconstructedparticle
diff -u -r1.4 -r1.5
--- MCFastReconstructedParticle.java 2 Jul 2005 06:38:53 -0000 1.4
+++ MCFastReconstructedParticle.java 13 Jul 2005 05:56:16 -0000 1.5
@@ -17,7 +17,7 @@
import org.lcsim.spacegeom.SpacePoint;
/**
- *
+ * AN implementation of ReconstructedParticle appropriate for the fast Monte Carlo
* @author ngraf
*/
public class MCFastReconstructedParticle implements ReconstructedParticle
@@ -60,11 +60,13 @@
double py = p*pos.sinPhi()*pos.cosTheta();
double pz = p*pos.cosTheta();
_fourVec.setV3(e, px, py, pz);
+ // fastMC only creates clusters for neutral particles.
+ // will need to fix if this changes.
_charge = 0.;
- addParticleID(new MCFastParticleID(type));
+ addParticleID(new MCFastParticleID(type));
}
-
+
// ReconstructedParticle interface
/** Type of reconstructed particle.
@@ -81,7 +83,7 @@
return _fourVec.v3();
}
- /** Energy of the reconstructed particle
+ /** Energy of the reconstructed particle
*/
public double getEnergy()
{
@@ -97,7 +99,7 @@
return _covMatrix;
}
- /** Mass of the reconstructed particle, set independently from four vector quantities
+ /** Mass of the reconstructed particle
*/
public double getMass()
{
@@ -112,6 +114,7 @@
}
/** Reference point of the reconstructedParticle parameters.
+ * currently returns the origin.
*/
public Hep3Vector getReferencePoint()
{
@@ -205,4 +208,4 @@
sb.append("E: "+getEnergy());
return sb.toString();
}
-}
+}
\ No newline at end of file
lcsim/src/org/lcsim/mc/fast/reconstructedparticle
diff -u -r1.4 -r1.5
--- MCFastReconstructedParticleDriver.java 2 Jul 2005 06:38:53 -0000 1.4
+++ MCFastReconstructedParticleDriver.java 13 Jul 2005 05:56:16 -0000 1.5
@@ -1,13 +1,3 @@
-/*
- * MCFastReconstructedParticleDriver.java
- *
- * Created on July 1, 2005, 2:55 PM
- *
- * To change this template, choose Tools | Options and locate the template under
- * the Source Creation and Management node. Right-click the template and choose
- * Open. You can then make changes to the template in the Source Editor.
- */
-
package org.lcsim.mc.fast.reconstructedparticle;
import hep.physics.particle.Particle;
@@ -43,12 +33,14 @@
public void process(EventHeader event)
{
+ // create the list of ReconstructedParticles to add back to the event.
List<ReconstructedParticle> rpList = new ArrayList<ReconstructedParticle>();
// start with the smeared tracks...
List<Track> tracks = event.getTracks();
for(Track t : tracks)
{
ParticleType type = null;
+ // Track does not have link to MCParticle, so cast to MCFast track
if(t instanceof ReconTrack)
{
ReconTrack rt = (ReconTrack) t;
@@ -64,28 +56,26 @@
{
type = new Muon((int)Math.signum(pdgid));
}
- else
+ else // assume pion for remaining charged tracks
{
type = new Pion(rt.getCharge());
}
- // assume pion for remaining charged tracks
-
}
MCFastReconstructedParticle rp = new MCFastReconstructedParticle(t, type);
rpList.add(rp);
}
- // loop over clusters...
+ // now loop over clusters...
List<Cluster> clusters = event.getClusters();
for(Cluster c : clusters)
{
ParticleType type = null;
- // photons for EM
+ // assume photon for EM cluster
if( c instanceof ReconEMCluster)
{
type = new Photon();
}
- // assume neutron here for had cluster
+ // assume neutron here for had cluster, could also use K0L
else if(c instanceof ReconHADCluster)
{
type = new Neutron();
@@ -96,5 +86,4 @@
// add the reconstructedparticles to the event
event.put("MCFastReconstructedParticles", rpList, ReconstructedParticle.class, 0);
}
-
-}
+}
\ No newline at end of file