Commit in hps-java/src/main/java/org/lcsim/hps/recon/tracking on MAIN
HelicalTrackHitResidualsDriver.java+25-101.2 -> 1.3
Use event quality and remove update of track direction which should be addressed in another commit.

hps-java/src/main/java/org/lcsim/hps/recon/tracking
HelicalTrackHitResidualsDriver.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- HelicalTrackHitResidualsDriver.java	27 Nov 2012 02:17:29 -0000	1.2
+++ HelicalTrackHitResidualsDriver.java	20 Apr 2013 04:01:44 -0000	1.3
@@ -15,6 +15,7 @@
 import java.util.logging.Logger;
 import org.lcsim.detector.tracker.silicon.SiSensor;
 import org.lcsim.event.*;
+import org.lcsim.fit.helicaltrack.HelicalTrackCross;
 import org.lcsim.fit.helicaltrack.HelicalTrackFit;
 import org.lcsim.fit.helicaltrack.HelicalTrackHit;
 import org.lcsim.geometry.Detector;
@@ -101,7 +102,8 @@
         
     }
     
-    
+   
+
     
     @Override
     public void process(EventHeader event) {
@@ -113,15 +115,27 @@
                 System.out.println(this.getClass().getSimpleName() + ": Number of Tracks = " + tracklist.size());
              }
         }
-        
 
+        
+        
         for (Track track : tracklist) {
+            
+            if(TrackUtils.passTrackSelection(track, tracklist, EventQuality.Quality.MEDIUM)) {
+                //System.out.printf("%s: passed track selections\n",this.getClass().getSimpleName());
+            } else {
+                //System.out.printf("%s: failed track selections\n",this.getClass().getSimpleName());
+                continue;
+            }
+            
             SeedTrack st = (SeedTrack) track;
             SeedCandidate seed = st.getSeedCandidate();
             HelicalTrackFit trk = seed.getHelix();
             List<TrackerHit> hitsOnTrack = track.getTrackerHits();
             for(TrackerHit hit : hitsOnTrack) {
                 HelicalTrackHit hth = (HelicalTrackHit) hit;
+                HelicalTrackCross htc = (HelicalTrackCross) hth;
+            //System.out.printf("%s: getHitMap: hth position before trkdir: (%.3f,%.3f,%.3f)\n",this.getClass().getSimpleName(),hth.x(),hth.y(),hth.z());
+                htc.setTrackDirection(trk);
                 Map<String,Double> res_track = TrackUtils.calculateTrackHitResidual(hth, trk, this._includeMS);
                 boolean isTop = false;
                 if(SvtUtils.getInstance().isTopLayer((SiSensor)((RawTrackerHit)hth.getRawHits().get(0)).getDetectorElement())) {
@@ -182,10 +196,11 @@
     private void makePlots() {
         
         int nbins = 50;
-        double bins_resz_min = -0.2;
-        double bins_resz_max = 0.2;
-        double bins_resy_min = -0.4;
-        double bins_resy_max = 0.4;
+        double bins_resz_min[] = {-0.2,-0.4,-0.4,-0.4,-0.4};
+        double bins_resz_max[] = {0.2,0.4,0.4,0.4,0.4};
+        double bins_resy_min[] = {-1,-1,-2,-2,-3};
+        double bins_resy_max[] = {1,1,2,2,3};
+        
         
         _plotter_resz_top = aida.analysisFactory().createPlotterFactory().create();
         _plotter_resz_top.setTitle("res z top");
@@ -196,8 +211,8 @@
         for(int i=1;i<6;++i) {
 //            _h_resz_track_top[i-1] = aida.cloud1D("h_resz_track_top_layer"+i);
 //            _h_resy_track_top[i-1] = aida.cloud1D("h_resy_track_top_layer"+i);
-            _h_resz_track_top[i-1] = aida.histogram1D("h_resz_track_top_layer"+i,nbins,bins_resz_min,bins_resz_max);
-            _h_resy_track_top[i-1] = aida.histogram1D("h_resy_track_top_layer"+i,nbins,bins_resy_min,bins_resy_max);
+            _h_resz_track_top[i-1] = aida.histogram1D("h_resz_track_top_layer"+i,nbins,bins_resz_min[i-1],bins_resz_max[i-1]);
+            _h_resy_track_top[i-1] = aida.histogram1D("h_resy_track_top_layer"+i,nbins,bins_resy_min[i-1],bins_resy_max[i-1]);
             _plotter_resz_top.region(i-1).plot(_h_resz_track_top[i-1]);
             _plotter_resy_top.region(i-1).plot(_h_resy_track_top[i-1]);
         }
@@ -209,8 +224,8 @@
         _plotter_resy_bottom.setTitle("res y bottom");
         _plotter_resy_bottom.createRegions(5,1);
         for(int i=1;i<6;++i) {
-            _h_resz_track_bottom[i-1] = aida.histogram1D("h_resz_track_bottom_layer"+i,nbins,bins_resz_min,bins_resz_max);
-            _h_resy_track_bottom[i-1] = aida.histogram1D("h_resy_track_bottom_layer"+i,nbins,bins_resy_min,bins_resy_max);
+            _h_resz_track_bottom[i-1] = aida.histogram1D("h_resz_track_bottom_layer"+i,nbins,bins_resz_min[i-1],bins_resz_max[i-1]);
+            _h_resy_track_bottom[i-1] = aida.histogram1D("h_resy_track_bottom_layer"+i,nbins,bins_resy_min[i-1],bins_resy_max[i-1]);
 //            _h_resz_track_bottom[i-1] = aida.cloud1D("h_resz_track_bottom_layer"+i);
 //            _h_resy_track_bottom[i-1] = aida.cloud1D("h_resy_track_bottom_layer"+i);
             _plotter_resz_bottom.region(i-1).plot(_h_resz_track_bottom[i-1]);
CVSspam 0.2.12


Use REPLY-ALL to reply to list

To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1