hps-java/src/main/java/org/lcsim/hps/users/mgraham
diff -u -r1.10 -r1.11
--- FastTrackAnalysisDriver.java 12 Mar 2013 23:25:59 -0000 1.10
+++ FastTrackAnalysisDriver.java 9 Apr 2013 22:03:05 -0000 1.11
@@ -52,8 +52,8 @@
public class FastTrackAnalysisDriver extends Driver {
String[] detNames = {"Tracker"};
- Integer _minLayers = 8;
- Integer[] nlayers = {10};
+ Integer _minLayers = 10;
+ Integer[] nlayers = {12};
int nevt = 0;
double xref = 50.0; //mm
public String outputTextName = "myevents.txt";
@@ -137,7 +137,7 @@
// Create a relational table that maps TrackerHits to MCParticles
RelationalTable hittomc = new BaseRelationalTable(RelationalTable.Mode.MANY_TO_MANY, RelationalTable.Weighting.UNWEIGHTED);
- List<LCRelation> mcrelations = event.get(LCRelation.class, "RotatedMCRelations");
+ List<LCRelation> mcrelations = event.get(LCRelation.class, "RotatedHelicalTrackMCRelations");
for (LCRelation relation : mcrelations) {
if (relation != null && relation.getFrom() != null && relation.getTo() != null) {
@@ -391,7 +391,7 @@
double vtxpyP = vtxMap.get("p2Y");
double vtxpzP = vtxMap.get("p2Z");
double chisq = vtxfit.getChi2();
- BasicMatrix vtx = (BasicMatrix) vtxfit.getPosition();
+ Hep3Vector vtx = vtxfit.getPosition();
SymmetricMatrix vtxcov = vtxfit.getCovMatrix();
double chisqE = ele.getChi2();
double chisqP = pos.getChi2();
@@ -405,7 +405,7 @@
double conpyP = conMap.get("p2Y");
double conpzP = conMap.get("p2Z");
double conchisq = confit.getChi2();
- BasicMatrix conVtx = (BasicMatrix) confit.getPosition();
+ Hep3Vector conVtx = confit.getPosition();
SymmetricMatrix conVtxCov = confit.getCovMatrix();
BilliorVertex bsconfit = vtxfitterBSCon.fitVertex(btlist);
@@ -417,7 +417,7 @@
double bsconpyP = bsconMap.get("p2Y");
double bsconpzP = bsconMap.get("p2Z");
double bsconchisq = bsconfit.getChi2();
- BasicMatrix bsconVtx = (BasicMatrix) bsconfit.getPosition();
+ Hep3Vector bsconVtx = bsconfit.getPosition();
SymmetricMatrix bsconVtxCov = bsconfit.getCovMatrix();
double l1minE = -99;
@@ -469,8 +469,8 @@
if (posMC != null && pos == posID) {
posFromAp = 1;
}
- MCParticle mcEle = tkanalEle.getMCParticle();
- MCParticle mcPos = tkanalPos.getMCParticle();
+ MCParticle mcEle = tkanalEle.getMCParticleNew();
+ MCParticle mcPos = tkanalPos.getMCParticleNew();
double[] pmcEle = {-99, -99, -99};
double[] pmcPos = {-99, -99, -99};
double[] pocamcE = {-99, -99, -99};
@@ -527,7 +527,7 @@
pw.format("%d %d %d ", nPositron, badLayerPos, posFromAp);
pw.format("%5.5f %5.5f %5.5f ", vtxpxE, vtxpyE, vtxpzE);
pw.format("%5.5f %5.5f %5.5f ", vtxpxP, vtxpyP, vtxpzP);
- pw.format("%5.5f %5.5f %5.5f %5.5f %5.5f %5.5f ", vtx.e(0, 0), Math.sqrt(vtxcov.e(0, 0)), vtx.e(1, 0), Math.sqrt(vtxcov.e(1, 1)), vtx.e(2, 0), Math.sqrt(vtxcov.e(2, 2)));
+ pw.format("%5.5f %5.5f %5.5f %5.5f %5.5f %5.5f ", vtx.x(), Math.sqrt(vtxcov.e(0, 0)), vtx.y(), Math.sqrt(vtxcov.e(1, 1)), vtx.z(), Math.sqrt(vtxcov.e(2, 2)));
pw.format("%5.5f ", chisq);
pw.format("%5.5f %5.5f %5.5f ", conpxE, conpyE, conpzE);
pw.format("%5.5f %5.5f %5.5f ", conpxP, conpyP, conpzP);
@@ -538,7 +538,7 @@
double conErrY = getErr(conVtxCov.e(1, 1));
double conErrZ = getErr(conVtxCov.e(2, 2));
- pw.format("%5.5f %5.5f %5.5f %5.5f %5.5f %5.5f ", conVtx.e(0, 0), conErrX, conVtx.e(1, 0), conErrY, conVtx.e(2, 0), conErrZ);
+ pw.format("%5.5f %5.5f %5.5f %5.5f %5.5f %5.5f ", conVtx.x(), conErrX, conVtx.y(), conErrY, conVtx.z(), conErrZ);
pw.format("%5.5f ", conchisq);
pw.format("%5.5f %5.5f %5.5f ", bsconpxE, bsconpyE, bsconpzE);
@@ -550,7 +550,7 @@
double bsconErrY = getErr(bsconVtxCov.e(1, 1));
double bsconErrZ = getErr(bsconVtxCov.e(2, 2));
- pw.format("%5.5f %5.5f %5.5f %5.5f %5.5f %5.5f ", bsconVtx.e(0, 0), bsconErrX, bsconVtx.e(1, 0), bsconErrY, bsconVtx.e(2, 0), bsconErrZ);
+ pw.format("%5.5f %5.5f %5.5f %5.5f %5.5f %5.5f ", bsconVtx.x(), bsconErrX, bsconVtx.y(), bsconErrY, bsconVtx.z(), bsconErrZ);
pw.format("%5.5f ", bsconchisq);
@@ -601,9 +601,9 @@
aida.histogram1D("vtxpyP", 50, -0.1, 0.1).fill(vtxpyP);
aida.histogram1D("vtxpzP", 50, -0.1, 0.1).fill(vtxpzP);
- aida.histogram1D("vtxX", 50, -20, 20).fill(vtx.e(0, 0));
- aida.histogram1D("vtxY", 50, -0.5, 0.5).fill(vtx.e(1, 0));
- aida.histogram1D("vtxZ", 50, -0.5, 0.5).fill(vtx.e(2, 0));
+ aida.histogram1D("vtxX", 50, -20, 20).fill(vtx.x());
+ aida.histogram1D("vtxY", 50, -0.5, 0.5).fill(vtx.y());
+ aida.histogram1D("vtxZ", 50, -0.5, 0.5).fill(vtx.z());
aida.histogram1D("pxmcE", 50, 0, 2.5).fill(pmcEle[0]);
aida.histogram1D("pymcE", 50, -0.1, 0.1).fill(pmcEle[1]);