lcsim-contrib/src/main/java/org/lcsim/contrib/Partridge/sidloi
diff -u -r1.1 -r1.2
--- LOIEffFake.java 8 Feb 2010 22:26:49 -0000 1.1
+++ LOIEffFake.java 11 Mar 2010 18:22:35 -0000 1.2
@@ -44,6 +44,7 @@
private IHistogram1D ctheff;
private IHistogram1D ctheff1;
private IHistogram1D ctheff2;
+ private IHistogram1D phieff;
private IHistogram1D d0eff1;
private IHistogram1D d0eff2;
private IHistogram1D z0eff1;
@@ -64,6 +65,7 @@
ctheff = hf.createHistogram1D("Efficiency vs cos(theta)", "", 200, -1., 1., "type=efficiency");
ctheff1 = hf.createHistogram1D("Efficiency vs cos(theta) - pT < 0.5 GeV", "", 200, -1., 1., "type=efficiency");
ctheff2 = hf.createHistogram1D("Efficiency vs cos(theta) - pT > 0.5 GeV", "", 200, -1., 1., "type=efficiency");
+ phieff = hf.createHistogram1D("Efficiency vs phi", "", 180, 0., 360., "type=efficiency");
d0eff1 = hf.createHistogram1D("Efficiency vs d0", "", 50, -5., 5., "type=efficiency");
d0eff2 = hf.createHistogram1D("Efficiency vs d0 full", "", 24, -12., 12., "type=efficiency");
z0eff1 = hf.createHistogram1D("Efficiency vs z0", "", 50, -5., 5., "type=efficiency");
@@ -124,6 +126,8 @@
double pz = ptrk.z();
double pt = Math.sqrt(px * px + py * py);
double cth = pz / ptrk.magnitude();
+ double phi = 180. * Math.atan2(py, px) / Math.PI;
+ if (phi < 0.) phi += 360.;
double d0 = track.getTrackParameter(HelicalTrackFit.dcaIndex);
double z0 = track.getTrackParameter(HelicalTrackFit.z0Index);
@@ -143,18 +147,21 @@
aida.histogram1D("Hits for fake tracks", 20, 0., 20.).fill(nhits);
aida.histogram1D("pT for fake tracks", 100, 0., 10.).fill(pt);
aida.histogram1D("cos(theta) for fake tracks", 100, -1., 1.).fill(cth);
+ aida.histogram1D("phi for fake tracks", 180, 0., 360.).fill(phi);
aida.histogram1D("d0 for fake tracks", 50, -10., 10.).fill(d0);
aida.histogram1D("z0 for fake tracks", 50, -10., 10.).fill(z0);
} else {
aida.histogram1D("Hits for non-fake tracks", 20, 0., 20.).fill(nhits);
aida.histogram1D("pT for non-fake tracks", 100, 0., 10.).fill(pt);
aida.histogram1D("cos(theta) for non-fake tracks", 100, -1., 1.).fill(cth);
+ aida.histogram1D("phi for non-fake tracks", 180, 0., 360.).fill(phi);
aida.histogram1D("d0 for non-fake tracks", 50, -10., 10.).fill(d0);
aida.histogram1D("z0 for non-fake tracks", 50, -10., 10.).fill(z0);
}
aida.histogram1D("Hits for all tracks", 20, 0., 20.).fill(nhits);
aida.histogram1D("pT for all tracks", 100, 0., 10.).fill(pt);
aida.histogram1D("cos(theta) for all tracks", 100, -1., 1.).fill(cth);
+ aida.histogram1D("phi for all tracks", 180, 0., 360.).fill(phi);
aida.histogram1D("d0 for all tracks", 50, -10., 10.).fill(d0);
aida.histogram1D("z0 for all tracks", 50, -10., 10.).fill(z0);
@@ -229,6 +236,8 @@
double pt = Math.sqrt(px * px + py * py);
double cth = pz / pmc.magnitude();
double theta = 180. * Math.acos(cth) / Math.PI;
+ double phi = 180. * Math.atan2(py, px) / Math.PI;
+ if (phi < 0.) phi += 360.;
// Calculate the angle between the MC Particle and the thrust axis
double calpha = VecOp.dot(pmc, taxis) / (pmc.magnitude() * taxis.magnitude());
@@ -252,12 +261,13 @@
pTeff2.fill(pt, wgt);
}
- // Make angular efficiency plot
+ // Make angular efficiency plots
if (findable.isFindable(mcp, slist)) {
thetaeff.fill(theta, wgt);
ctheff.fill(cth, wgt);
if (pt < 0.5) ctheff1.fill(cth, wgt);
else ctheff2.fill(cth, wgt);
+ phieff.fill(phi, wgt);
}
// Make d0 efficiency plot
@@ -286,6 +296,7 @@
aida.histogram1D("Hits for non-final state particles", 20, 0., 20.).fill(nhits);
aida.histogram1D("pT for non-final state particles", 100, 0., 10.).fill(pt);
aida.histogram1D("cos(theta) for non-final state particles", 100, -1., 1.).fill(cth);
+ aida.histogram1D("phi for non-final state particles", 180, 0., 360.).fill(phi);
aida.histogram1D("d0 for non-final state particles", 100, -100., 100.).fill(d0);
aida.histogram1D("z0 for non-final state particles", 100, -100., 100.).fill(z0);
aida.histogram1D("alpha for non-final state particles", 90, 0., 90.).fill(alpha);
@@ -296,6 +307,7 @@
aida.histogram1D("Hits for base MC selection", 20, 0., 20.).fill(nhits);
aida.histogram1D("pT for base MC selection", 100, 0., 10.).fill(pt);
aida.histogram1D("cos(theta) for base MC selection", 100, -1., 1.).fill(cth);
+ aida.histogram1D("phi forbase MC selection", 180, 0., 360.).fill(phi);
aida.histogram1D("d0 for base MC selection", 100, -100., 100.).fill(d0);
aida.histogram1D("z0 for base MC selection", 100, -100., 100.).fill(z0);
aida.histogram1D("alpha for base MC selection", 90, 0., 90.).fill(alpha);
@@ -305,6 +317,7 @@
aida.histogram1D("Hits for findable tracks", 20, 0., 20.).fill(nhits);
aida.histogram1D("pT for findable tracks", 100, 0., 10.).fill(pt);
aida.histogram1D("cos(theta) for findable tracks", 100, -1., 1.).fill(cth);
+ aida.histogram1D("phi for findable tracks", 180, 0., 360.).fill(phi);
aida.histogram1D("d0 for findable tracks", 100, -100., 100.).fill(d0);
aida.histogram1D("z0 for findable tracks", 100, -100., 100.).fill(z0);
aida.histogram1D("alpha for findable tracks", 90, 0., 90.).fill(alpha);
@@ -314,6 +327,7 @@
aida.histogram1D("Hits for unfound tracks", 20, 0., 20.).fill(nhits);
aida.histogram1D("pT for unfound tracks", 100, 0., 10.).fill(pt);
aida.histogram1D("cos(theta) for unfound tracks", 100, -1., 1.).fill(cth);
+ aida.histogram1D("phi for unfound tracks", 180, 0., 360.).fill(phi);
aida.histogram1D("d0 for unfound tracks", 100, -100., 100.).fill(d0);
aida.histogram1D("z0 for unfound tracks", 100, -100., 100.).fill(z0);
aida.histogram1D("alpha for unfound tracks", 90, 0., 90.).fill(alpha);
@@ -330,6 +344,7 @@
aida.histogram1D("Hits for z0 check failures", 20, 0., 20.).fill(nhits);
aida.histogram1D("pT for z0 check failures", 100, 0., 10.).fill(pt);
aida.histogram1D("cos(theta) for z0 check failures", 100, -1., 1.).fill(cth);
+ aida.histogram1D("phi for z0 check failures", 180, 0., 360.).fill(phi);
aida.histogram1D("d0 for z0 check failures", 100, -100., 100.).fill(d0);
aida.histogram1D("z0 for z0 check failures", 100, -100., 100.).fill(z0);
aida.histogram1D("alpha for z0 check failures", 90, 0., 90.).fill(alpha);
@@ -342,6 +357,7 @@
aida.histogram1D("Hits for d0 check failures", 20, 0., 20.).fill(nhits);
aida.histogram1D("pT for d0 check failures", 100, 0., 10.).fill(pt);
aida.histogram1D("cos(theta) for d0 check failures", 100, -1., 1.).fill(cth);
+ aida.histogram1D("phi for d0 check failures", 180, 0., 360.).fill(phi);
aida.histogram1D("d0 for d0 check failures", 100, -100., 100.).fill(d0);
aida.histogram1D("z0 for d0 check failures", 100, -100., 100.).fill(z0);
aida.histogram1D("alpha for d0 check failures", 90, 0., 90.).fill(alpha);
@@ -354,6 +370,7 @@
aida.histogram1D("Hits for confirm check failures", 20, 0., 20.).fill(nhits);
aida.histogram1D("pT for confir check failures", 100, 0., 10.).fill(pt);
aida.histogram1D("cos(theta) for confirm check failures", 100, -1., 1.).fill(cth);
+ aida.histogram1D("phi for confirm check failures", 180, 0., 360.).fill(phi);
aida.histogram1D("d0 for seed confirm failures", 100, -100., 100.).fill(d0);
aida.histogram1D("z0 for seed confirm failures", 100, -100., 100.).fill(z0);
aida.histogram1D("alpha for seed confirm failures", 90, 0., 90.).fill(alpha);
@@ -366,6 +383,7 @@
aida.histogram1D("Hits for seed check failures", 20, 0., 20.).fill(nhits);
aida.histogram1D("pT for seed check failures", 100, 0., 10.).fill(pt);
aida.histogram1D("cos(theta) for seed check failures", 100, -1., 1.).fill(cth);
+ aida.histogram1D("phi for seed check failures", 180, 0., 360.).fill(phi);
aida.histogram1D("d0 for seed check failures", 100, -100., 100.).fill(d0);
aida.histogram1D("z0 for seed check failures", 100, -100., 100.).fill(z0);
aida.histogram1D("alpha for seed check failures", 90, 0., 90.).fill(alpha);
@@ -378,6 +396,7 @@
aida.histogram1D("Hits for nhit check failures", 20, 0., 20.).fill(nhits);
aida.histogram1D("pT for nhit check failures", 100, 0., 10.).fill(pt);
aida.histogram1D("cos(theta) for nhit check failures", 100, -1., 1.).fill(cth);
+ aida.histogram1D("phi for nhit check failures", 180, 0., 360.).fill(phi);
aida.histogram1D("d0 for nhit check failures", 100, -100., 100.).fill(d0);
aida.histogram1D("z0 for nhit check failures", 100, -100., 100.).fill(z0);
aida.histogram1D("alpha for nhit check failures", 90, 0., 90.).fill(alpha);
@@ -390,6 +409,7 @@
aida.histogram1D("Hits for pT check failures", 20, 0., 20.).fill(nhits);
aida.histogram1D("pT for pT check failures", 100, 0., 10.).fill(pt);
aida.histogram1D("cos(theta) for pT check failures", 100, -1., 1.).fill(cth);
+ aida.histogram1D("phi for pT check failures", 180, 0., 360.).fill(phi);
aida.histogram1D("d0 for pT check failures", 100, -100., 100.).fill(d0);
aida.histogram1D("z0 for pT check failures", 100, -100., 100.).fill(z0);
aida.histogram1D("alpha for pT check failures", 90, 0., 90.).fill(alpha);