lcsim/src/org/lcsim/contrib/Cassell/recon/Cheat
diff -u -r1.5 -r1.6
--- PPRReconParticleConstructor.java 20 Nov 2007 16:34:49 -0000 1.5
+++ PPRReconParticleConstructor.java 5 Dec 2007 19:39:26 -0000 1.6
@@ -34,8 +34,19 @@
DetailedNeutralHadronClusterEnergyCalculator calc;
int minTrkhits = 3;
int minCalhits = 3;
- double cmass = .1395679;
- double nmass = .497671;
+ double pimass = .1395679;
+ ParticleID pippid;
+ ParticleID pimpid;
+ double mumass = .10566;
+ ParticleID muppid;
+ ParticleID mumpid;
+ double emass = .00051;
+ ParticleID eppid;
+ ParticleID empid;
+ double k0lmass = .497671;
+ ParticleID k0lpid;
+ double photonmass = 0.;
+ ParticleID photonpid;
double[] cov = {0.,0.,0.,0.,0.,0.};
/** Creates a new instance of PPRReconParticleConstructor */
public PPRReconParticleConstructor()
@@ -43,6 +54,14 @@
scalc = null;
calc = null;
clusterer = new NearestNeighborClusterer(4,4,2,0,0.);
+ pippid = new CheatParticleID(211);
+ pimpid = new CheatParticleID(-211);
+ mumpid = new CheatParticleID(13);
+ muppid = new CheatParticleID(-13);
+ empid = new CheatParticleID(11);
+ eppid = new CheatParticleID(-11);
+ photonpid = new CheatParticleID(22);
+ k0lpid = new CheatParticleID(130);
}
public void setMinTrackerHits(int n)
{
@@ -96,14 +115,29 @@
mom = rt.getDocaMomentumVec(p.getOrigin());
ref = rt.getDocaPositionVec(p.getOrigin());
}
- E = Math.sqrt(mom.magnitude()*mom.magnitude() + cmass*cmass);
+ double mass = pimass;
+ ParticleID pid = pippid;
+ if(p.getCharge() < 0.)pid = pimpid;
+ int pdg = Math.abs(p.getPDGID());
+ if(pdg == 11)
+ {
+ mass = emass;
+ pid = empid;
+ if(p.getCharge() > 0.)pid = eppid;
+ }
+ else if(pdg == 13)
+ {
+ mass = mumass;
+ pid = mumpid;
+ if(p.getCharge() > 0.)pid = muppid;
+ }
+ E = Math.sqrt(mom.magnitude()*mom.magnitude() + mass*mass);
BaseReconstructedParticle rp = new BaseReconstructedParticle(E,mom);
- rp.setMass(cmass);
+ rp.setMass(mass);
rp.setCharge(p.getCharge());
rp.setReferencePoint(ref);
- ParticleID id = new CheatParticleID(p.getPDGID());
- rp.setParticleIdUsed(id);
- rp.addParticleID(id);
+ rp.setParticleIdUsed(pid);
+ rp.addParticleID(pid);
for(Track t:lt)
{
rp.addTrack(t);
@@ -116,7 +150,7 @@
}
}
double mass = 0.;
- ParticleID pid = new CheatParticleID(22);
+ ParticleID pid = photonpid;
BasicCluster cc = new BasicCluster();
if(lc.size() > 0)
{
@@ -130,8 +164,8 @@
else
{
E = calc.getEnergy(cc);
- mass = nmass;
- pid = new CheatParticleID(130);
+ mass = k0lmass;
+ pid = k0lpid;
}
}
}