hps-java/src/main/java/org/lcsim/hps/users/phansson
diff -u -r1.27 -r1.28
--- TwoTrackAnlysis.java 18 Oct 2013 16:46:02 -0000 1.27
+++ TwoTrackAnlysis.java 28 Oct 2013 16:45:02 -0000 1.28
@@ -81,12 +81,16 @@
private TwoParticleVertexer particleVertexer = new TwoParticleVertexer();
private IPlotter _plotterParticleVertex;
private IPlotter _plotterTrackVertex;
+ private IPlotter _plotterTrackVertexFr;
private IPlotter _plotterTrackVertexNonBend;
private IPlotter _plotterTrackMult;
private IPlotter _plotterTrackAtConv;
private IHistogram1D _vtxpos_x;
private IHistogram1D _vtxpos_y;
private IHistogram1D _vtxpos_z;
+ private IHistogram1D _vtxposfr_x;
+ private IHistogram1D _vtxposfr_y;
+ private IHistogram1D _vtxposfr_z;
private IHistogram1D _vtxposnonb_x;
private IHistogram1D _vtxposnonb_y;
private IHistogram1D _vtxposnonb_dy;
@@ -115,7 +119,7 @@
private IHistogram1D _trk_z_at_conv_bot_neg;
private IHistogram1D _trk_y_at_conv_bot_neg_fr;
private IHistogram1D _trk_z_at_conv_bot_neg_fr;
-
+
private class CmpTrack implements Comparable<CmpTrack> {
private Track _track;
public CmpTrack(Track track) {
@@ -265,6 +269,13 @@
this._vtxpos_y.fill(vtxPos.y());
this._vtxpos_z.fill(vtxPos.z());
}
+
+ if(vtxPosFringe!=null) {
+ this._vtxposfr_x.fill(vtxPosFringe.x());
+ this._vtxposfr_y.fill(vtxPosFringe.y());
+ this._vtxposfr_z.fill(vtxPosFringe.z());
+ }
+
boolean useFringe = false;
StraightLineTrack[] slts = this.getSLTs(trk1, trk2, useFringe);
@@ -435,7 +446,10 @@
br_line+=""+trk_str+"_fr_conv_x/F:"+trk_str+"_fr_conv_y/F:"+trk_str+"_fr_conv_z/F:";
br_line+=""+trk_str+"_target_y/F:"+trk_str+"_target_z/F:";
br_line+=""+trk_str+"_fr_target_x/F:"+trk_str+"_fr_target_y/F:"+trk_str+"_fr_target_z/F:";
- br_line+=""+trk_str+"_ecal_y/F:"+trk_str+"_ecal_z/F:";
+ //br_line+=""+trk_str+"_ecal_y/F:"+trk_str+"_ecal_z/F:";
+ br_line+=""+trk_str+"_ecal_y/F:"+trk_str+"_ecal_z/F:"+trk_str+"_fr_ecal_x/F:"+trk_str+"_fr_ecal_y/F:"+trk_str+"_fr_ecal_z/F:";
+ //br_line+=""+trk_str+"_fr_ecal_x/F:"+trk_str+"_fr_ecal_y/F:"+trk_str+"_fr_ecal_z/F:";
+ //br_line+=""+trk_str+"_fr_ecal_x/F:";
}
//
@@ -554,11 +568,22 @@
Hep3Vector posAtNomTargetFringe1 = hpstrk1.getPositionAtZMap(100., 0.0, 5.0)[0];
if (posAtNomTargetFringe1!=null) printWriter.format("%5.5f %5.5f %5.5f ", posAtNomTargetFringe1.z(),posAtNomTargetFringe1.x(),posAtNomTargetFringe1.y()); //note rotation from JLab->tracking
else printWriter.format("%5.5f %5.5f %5.5f ", -9999999.9,-9999999.9,-9999999.9);
- Hep3Vector posAtECal = TrackUtils.extrapolateTrack(trk1,BeamlineConstants.ECAL_FACE_TESTRUN);
+
+ Hep3Vector posAtECal = TrackUtils.extrapolateTrack(trk1,BeamlineConstants.ECAL_FACE_TESTRUN);
+ Hep3Vector posAtECalFringe1 = hpstrk1.getPositionAtZMap(BeamlineConstants.DIPOLE_EDGE_TESTRUN - 100, BeamlineConstants.ECAL_FACE_TESTRUN, 5.0, false)[0];
if(posAtECal!=null && !Double.isNaN(posAtECal.x()) && !Double.isNaN(posAtECal.y())) {
- printWriter.format("%5.5f %5.5f ",posAtECal.x(),posAtECal.y()); //note rotation from JLab->tracking
+ //printWriter.format("%5.5f %5.5f ",posAtECal.x(),posAtECal.y()); //note rotation from JLab->tracking
+ printWriter.format("%5.5f %5.5f %5.5f %5.5f %5.5f ",posAtECal.x(),posAtECal.y(),posAtECalFringe1.z(),posAtECalFringe1.x(),posAtECalFringe1.y()); //note rotation from JLab->tracking
}
- else printWriter.format("%5.5f %5.5f ",-9999999.9,-9999999.9);
+ else printWriter.format("%5.5f %5.5f %5.5f %5.5f %5.5f ",-9999999.9,-9999999.9,-9999999.9,-9999999.9,-9999999.9);
+ //else printWriter.format("%5.5f %5.5f ",-9999999.9,-9999999.9);
+
+ //Hep3Vector posAtECalFringe1 = hpstrk1.getPositionAtZMap(BeamlineConstants.DIPOLE_EDGE_TESTRUN - 100, BeamlineConstants.ECAL_FACE_TESTRUN, 5.0, false)[0];
+ //if (posAtECalFringe1!=null) printWriter.format("%5.5f %5.5f %5.5f ", posAtECalFringe1.z(),posAtECalFringe1.x(),posAtECalFringe1.y()); //note rotation from JLab->tracking
+ //printWriter.format("%5.5f %5.5f %5.5f ", -9999999.9,-9999999.9,-9999999.9);
+ //if (posAtECalFringe1!=null) printWriter.format("%5.5f ", posAtECalFringe1.z()); //note rotation from JLab->tracking
+ //printWriter.format("%5.5f ", -9999999.9);
+
if(posAtConverter!=null) {
if(TrackUtils.isTopTrack(trk1, 4)) {
@@ -623,7 +648,9 @@
printWriter.format("%5.5f %5.5f %5.5f ",-9999999.9,-9999999.9,-9999999.9); //note rotation from JLab->tracking
printWriter.format("%5.5f %5.5f ",-9999999.9,-9999999.9); //note rotation from JLab->tracking
printWriter.format("%5.5f %5.5f %5.5f ",-9999999.9,-9999999.9,-9999999.9); //note rotation from JLab->tracking
- printWriter.format("%5.5f %5.5f ",-9999999.9,-9999999.9); //note rotation from JLab->tracking
+ printWriter.format("%5.5f %5.5f %5.5f %5.5f %5.5f ",-9999999.9,-9999999.9,-9999999.9,-9999999.9,-9999999.9); //note rotation from JLab->tracking
+ //printWriter.format("%5.5f %5.5f %5.5f ",-9999999.9,5555.5,-9999999.9); //note rotation from JLab->tracking
+ //printWriter.format("%5.5f ",-9999999.9); //note rotation from JLab->tracking
}
}
@@ -830,6 +857,9 @@
_vtxpos_x = aida.histogram1D("Vertex position X", 100, -800, -500);
_vtxpos_y = aida.histogram1D("Vertex position Y", 100, 0, 40);
_vtxpos_z = aida.histogram1D("Vertex position Z", 100, -4, 4);
+ _vtxposfr_x = aida.histogram1D("Vertex fr position X", 100, -800, -500);
+ _vtxposfr_y = aida.histogram1D("Vertex fr position Y", 100, 0, 40);
+ _vtxposfr_z = aida.histogram1D("Vertex fr position Z", 100, -4, 4);
_vtxposnonb_x = aida.histogram1D("Vertex position non-bend X", 100, -800, -500);
_vtxposnonb_y = aida.histogram1D("Vertex position non-bend Y", 100, 0, 40);
_vtxposnonb_dy = aida.histogram1D("Vertex position non-bend Ytrk1-Ytrk2", 100, -20, 20);
@@ -869,6 +899,11 @@
_plotterTrackVertex.region(0).plot(_vtxpos_x);
_plotterTrackVertex.region(1).plot(_vtxpos_y);
_plotterTrackVertex.region(2).plot(_vtxpos_z);
+ _plotterTrackVertexFr = aida.analysisFactory().createPlotterFactory().create();
+ _plotterTrackVertexFr.createRegions(2,2);
+ _plotterTrackVertexFr.region(0).plot(_vtxposfr_x);
+ _plotterTrackVertexFr.region(1).plot(_vtxposfr_y);
+ _plotterTrackVertexFr.region(2).plot(_vtxposfr_z);
_plotterTrackVertexNonBend = aida.analysisFactory().createPlotterFactory().create();
_plotterTrackVertexNonBend.createRegions(2,4);
_plotterTrackVertexNonBend.region(0).plot(_vtxposnonb_x);
@@ -929,6 +964,7 @@
if(!this.hideFrame) {
this._plotterParticleVertex.show();
this._plotterTrackVertex.show();
+ this._plotterTrackVertexFr.show();
this._plotterTrackVertexNonBend.show();
//this._plotterTrackMult.show();
_plotterTrackAtConv.show();