Commit in hps-java/src/main/java/org/lcsim/hps/users/phansson on MAIN
MPAlignmentParameters.java+14-4211.12 -> 1.13
Moved HTH residuals to separate driver.

hps-java/src/main/java/org/lcsim/hps/users/phansson
MPAlignmentParameters.java 1.12 -> 1.13
diff -u -r1.12 -r1.13
--- MPAlignmentParameters.java	12 Oct 2012 05:59:36 -0000	1.12
+++ MPAlignmentParameters.java	17 Oct 2012 23:00:38 -0000	1.13
@@ -79,7 +79,6 @@
     boolean _includeMS = false;
     
     private AIDAFrame plotterFrame;
-    private AIDAFrame plotterFrameHTH;
     private AIDAFrame plotterFrameSimHit;
     private AIDAFrame plotterFrameSummary;
     private boolean hideFrame = false;
@@ -87,16 +86,8 @@
     private IAnalysisFactory af = aida.analysisFactory();
     IDataPointSet dps_t;
     IDataPointSet dps_b;
-    IDataPointSet dps_hth_y_b;
-    IDataPointSet dps_hth_y_t;
-    IDataPointSet dps_hth_z_b;
-    IDataPointSet dps_hth_z_t;
     IDataPointSet dps_pull_t;
     IDataPointSet dps_pull_b;
-    IDataPointSet dps_pull_hth_y_b;
-    IDataPointSet dps_pull_hth_y_t;
-    IDataPointSet dps_pull_hth_z_b;
-    IDataPointSet dps_pull_hth_z_t;
     IPlotter plotter_resuydiff_t;
     IPlotter plotter_resuydiff_b;
     IDataPointSet[] dps_resuydiff_t = new IDataPointSet[10];
@@ -160,6 +151,10 @@
             
             HelicalTrackHit htc = (HelicalTrackHit) hit;
             
+            if(!(htc instanceof HelicalTrackCross)) {
+                if(_DEBUG) System.out.println(this.getClass().getSimpleName() + ": this hit is not a cross");
+                continue;
+            }
             HelicalTrackCross cross = (HelicalTrackCross) htc;
             cross.setTrackDirection(_trk);
             
@@ -167,15 +162,15 @@
             double msdz = msmap.get(htc).dz();
             double sHit = _trk.PathMap().get(htc);
 
-            calculateTrackHitResidual(htc,msmap);
 
             List<HelicalTrackStrip> clusterlist = cross.getStrips();
             
             if(_DEBUG) System.out.println(this.getClass().getSimpleName() + ": Loop over " + clusterlist.size() + " clusterlist for this hitontrack");
             
             for (HelicalTrackStrip cl : clusterlist) {
+
                 if(_DEBUG) System.out.println(this.getClass().getSimpleName() + ": cluster size " + cl.rawhits().size());
-                //if(cl.rawhits().size()>1) continue;
+                
                 if(type=="GLOBAL") {
                     
                     //CalculateLocalDerivativesGLOBAL(cl);
@@ -188,10 +183,7 @@
                     if(_doSimHitsResiduals) CalculateResidualSim(cl, msdrphi, msdz,simhits);
                     
                     CalculateLocalDerivatives(cl);
-                    CalculateGlobalDerivatives(cl);
-                    
-    //                CalculateResidual(cl, 0,0);
-                    //PrintStripResiduals(cl);
+                    CalculateGlobalDerivatives(cl);                    
                     PrintStripResidualsNew(cl);
                 }
             }
@@ -1047,137 +1039,8 @@
         
     }
 
-    public void calculateTrackHitResidual(HelicalTrackHit hth,Map<HelicalTrackHit, MultipleScatter> msmap) {
-        
-        double msdrphi = msmap.get(hth).drphi();
-        double msdz = msmap.get(hth).dz();
-        
-        //Calculate the residuals that are being used in the track fit
-        
-        //Start with the bendplane y
-        double drphi_res = hth.drphi();
-        double wrphi = Math.sqrt(drphi_res*drphi_res + msdrphi*msdrphi);
-        double s = _trk.PathMap().get(hth);
-        Hep3Vector posOnHelix = HelixUtils.PointOnHelix(_trk, s);
-        double resy = hth.y() - posOnHelix.y();
-        double resypull = this._includeMS ? resy/wrphi : resy/drphi_res;
-        
-        String side = "top";
-        if (hth.getPosition()[2]<0) side = "bottom";
-        int layer = hth.Layer();
-        if(layer % 2 == 0) {
-            layer = layer/2;
-        } else {
-            layer = (layer+1)/2;
-        }
-        
-            
-        aida.histogram1D("hthres_y_layer" + layer + "_" + side).fill(resy);
-        aida.histogram1D("hthrespull_y_layer" + layer + "_" + side).fill(resypull);
-        aida.histogram1D("hthreserr_y_layer" + layer + "_" + side).fill(wrphi);
-        aida.histogram2D("hthrespull_slope_y_layer" + layer + "_" + side).fill(_trk.slope(),resypull);
-            
-        
-        //Now the residual for the "measurement" direction z
-        double resz = hth.z() - posOnHelix.z();
-        //double dz = HitUtils.zres(hth, msmap, _trk);
-        
-        double slope = hth.z() / hth.r();
-        //  Don't use the helix slope if the magnitude of the slope is smaller than its uncertainty
-        if (Math.abs(_trk.slope()) > _trk.getSlopeError()) slope = _trk.slope();
-        //  Take the resolution uncertainty to be dr * |slope|
-        double dzres = hth.dr() * Math.abs(slope);
-        //  Combine resolution and multiple scattering uncertainties in quadrature
-        double dz = dzres; //Math.sqrt(dzres*dzres + msdz*msdz);
-
-        aida.histogram1D("hthres_z_layer" + layer + "_" + side).fill(resz);
-        aida.histogram1D("hthrespull_z_layer" + layer + "_" + side).fill(resz/dz);
-        aida.histogram1D("hthreserr_z_layer" + layer + "_" + side).fill(dz);
-        aida.histogram1D("hthreserrms_z_layer" + layer + "_" + side).fill(msdz);
-        aida.histogram1D("hthreserrres_z_layer" + layer + "_" + side).fill(dzres);
-
-        
-        //if(this._DEBUG) {
-            if(resy<-0.15) {
-                System.out.println(this.getClass().getSimpleName() + ": LARGE TRACK HIT RESIDUAL yres " + resy + " zres " + resz );
-                double[] pos = hth.getPosition();
-                double[] pos_cor = hth.getCorrectedPosition().v();
-                System.out.println(this.getClass().getSimpleName() + ": HelicalTrackHit at [" + pos[0] + "," + pos[1] + "," + pos[2] + "]  cor : [" + pos_cor[0] + "," + pos_cor[1] + "," + pos_cor[2] + "]");
-                System.exit(1);
-            }
-        //}
-
-          
-          //        
-//        //  Store the coordinates and errors for the line fit
-//            for (int i = 0; i < npix; i++) {
-//                HelicalTrackHit hit = pixel_hits.get(i);
-//                z[i] = hit.z();
-//                dz[i] = HitUtils.zres(hit, msmap, oldhelix);
-//                s[i] = smap.get(hit);
-//            }
-//
-//        
-        
-        
-        //From HelicalTrackFitter.java
-        //        //  Store the hit coordinates and weights in arrays for the circle fitter
-//        for (int i = 0; i < nc; i++) {
-//            HelicalTrackHit hit = circle_hits.get(i);
-//            //  Store the hit position
-//            x[i] = hit.x();
-//            y[i] = hit.y();
-//            //  Find the weight (= 1/uncertainty^2) for this hit
-//            //  First get the multiple scattering uncertainty
-//            double drphi_ms = 0.;
-//            if (msmap.containsKey(hit)) {
-//                drphi_ms = msmap.get(hit).drphi();
-//            }
-//            //  Get the hit resolution and combine uncertainties in quadrature
-//            double drphi_res = hit.drphi();
-//            wrphi[i] = 1. / (drphi_res * drphi_res + drphi_ms * drphi_ms);
-//        }
-    }
     
     
-   
-/*
-    public void AddTarget(double beamdy, double beamdz) {
-        double[][] dfdp = new double[3][1];
-        double d0 = _trk.dca();
-        double z0 = _trk.z0();
-        double slope = _trk.slope();
-        double phi0 = _trk.phi0();
-        double R = _trk.R();
-        double xint = 0; //target
-        double s = HelixUtils.PathToXPlane(_trk, xint, smax, _nlc).get(0);
-        Hep3Vector ptAtTarget = HelixUtils.PointOnHelix(_trk, s);
-        double[] mydydq = dydq(R, d0, phi0, xint, s);
-        double[] mydzdq = dzdq(R, d0, phi0, xint, slope, s);
-        _resid[0] = ptAtTarget.z();
-        _resid[1] = ptAtTarget.y();
-        _resid[2] = ptAtTarget.x();
-        _error[0] = beamdz;
-        _error[1] = beamdy;
-        _error[2] = 666;
-        dfdp[0][0] = 1;
-        dfdp[1][0] = 0;
-        dfdp[2][0] = 0;
-        _dfdp.add(FillMatrix(dfdp, 3, 1));
-        _globalLabel[0] = 666;
-        pWriter.printf("%4d\n", 666);
-        pWriter.printf("%5.5e %5.5e %5.5e\n", _resid[0], _resid[1], _resid[2]);
-        pWriter.printf("%5.5e %5.5e %5.5e\n", _error[0], _error[1], _error[2]);
-        for (int i = 0; i < _nlc; i++) {
-            pWriter.printf("%5.5e %5.5e -1.0\n", mydzdq[i], mydydq[i]);
-        }
-        for (int j = 0; j < _ngl; j++) {
-            pWriter.printf("%5.5e %5.5e %5.5e   %5d\n", _dfdp.get(_dfdp.size()-1).e(0, j), _dfdp.get(_dfdp.size()-1).e(1, j), _dfdp.get(_dfdp.size()-1).e(2, j), _globalLabel.get(_globalLabel.size()-1)[j]);
-        }
-
-    }
-*/
-    
 
     private void PrintStripResidualsNew(HelicalTrackStrip strip) {
         if (_DEBUG) {
@@ -1398,9 +1261,6 @@
         plotterFrame = new AIDAFrame();
         plotterFrame.setTitle("Residuals");
 
-        plotterFrameHTH = new AIDAFrame();
-        plotterFrameHTH.setTitle("Residuals HTH");
-
         plotterFrameSummary = new AIDAFrame();
         plotterFrameSummary.setTitle("Summary");
               
@@ -1522,167 +1382,15 @@
                 plotterFrame.addPlotter(plotter_respull);
                 plotterFrame.addPlotter(plotter_respull_slope);
             }
-        }
-            
         
-        for (int s=0;s<2;++s) { 
             
-            IPlotter plotter_hthresy = af.createPlotterFactory().create();
-            plotter_hthresy.createRegions(5,1,0);
-            plotter_hthresy.setTitle("hthres_y " + side[s]);
-            IPlotter plotter_hthresypull = af.createPlotterFactory().create();
-            plotter_hthresypull.createRegions(5,1,0);
-            plotter_hthresypull.setTitle("hthrespull_y " + side[s]);
-            IPlotter plotter_hthresyerr = af.createPlotterFactory().create();
-            plotter_hthresyerr.createRegions(5,1,0);
-            plotter_hthresyerr.setTitle("hthreserr_y " + side[s]);
-            IPlotter plotter_hthresz = af.createPlotterFactory().create();
-            plotter_hthresz.createRegions(5,1,0);
-            plotter_hthresz.setTitle("hthres_z " + side[s]);
-            IPlotter plotter_hthreszerr = af.createPlotterFactory().create();
-            plotter_hthreszerr.createRegions(5,1,0);
-            plotter_hthreszerr.setTitle("hthreserr_z " + side[s]);
-            IPlotter plotter_hthreszpull = af.createPlotterFactory().create();
-            plotter_hthreszpull.createRegions(5,1,0);
-            plotter_hthreszpull.setTitle("hthrespull_z " + side[s]);
-            IPlotter plotter_hthreszerrms = af.createPlotterFactory().create();
-            plotter_hthreszerrms.createRegions(5,1,0);
-            plotter_hthreszerrms.setTitle("hthreserrms_z " + side[s]);
-            IPlotter plotter_hthreszerrres = af.createPlotterFactory().create();
-            plotter_hthreszerrres.createRegions(5,1,0);
-            plotter_hthreszerrres.setTitle("hthreserrres_z " + side[s]);
-            
-            IPlotter plotter_hthresypullslope = af.createPlotterFactory().create();
-            plotter_hthresypullslope.createRegions(5,1,0);
-            plotter_hthresypullslope.setTitle("hthrespullslope_y " + side[s]);
-            
-            double xbins_hthy_res[][] = {
-                {-0.05,0.05},
-                {-0.05,0.05},
-                {-0.05,0.05},
-                {-0.2,0.2},
-                {-0.05,0.05}
-//                {-0.4,0.4},
-//                {-0.5,0.5},
-//                {-1.5,1.5},
-//                {-2.5,2.5},
-//                {-2.5,2.5}
-             };
-             double xbins_hthy_reserr[][] = {
-                {0,0.5},
-                {0,0.5},
-                {0,1},
-                {0,2},
-                {0,2}
-             };
-             double xbins_hthy_respull[][] = {
-                {-4,4},
-                {-4,4},
-                {-4,4},
-                {-4,4},
-                {-4,4}
-             };
-             double xbins_hthz_res[][] = {
-                {-0.01,0.01},
-                {-0.01,0.01},
-                {-0.01,0.01},
-                {-0.01,0.01},
-                {-0.01,0.01}
-//                {-0.03,0.03},
-//                {-0.8,0.8},
-//                {-0.8,0.8},
-//                {-2,2},
-//                {-2,2}
-             };
-             double xbins_hthz_reserr[][] = {
-                {0,0.05},
-                {0,0.5},
-                {0,0.7},
-                {0,1.5},
-                {0,2}
-             };
-             double xbins_hthz_respull[][] = {
-                {-4,4},
-                {-4,4},
-                {-4,4},
-                {-4,4},
-                {-4,4}
-             };
         
+       
         
             
             
-            
-            for (int iLayer=1;iLayer<6;++iLayer) {
-               
-        
-                IHistogram h = aida.histogram1D("hthres_y_layer" + (iLayer) + "_" + side[s] , 50, xbins_hthy_res[iLayer-1][0], xbins_hthy_res[iLayer-1][1]);
-                IHistogram h1 = aida.histogram1D("hthreserr_y_layer" + (iLayer) + "_" + side[s] , 50, xbins_hthy_reserr[iLayer-1][0], xbins_hthy_reserr[iLayer-1][1]);
-                IHistogram h2 = aida.histogram1D("hthrespull_y_layer" + (iLayer) + "_" + side[s] , 50, xbins_hthy_respull[iLayer-1][0], xbins_hthy_respull[iLayer-1][1]);
-                
-                IHistogram hz = aida.histogram1D("hthres_z_layer" + (iLayer) + "_" + side[s] , 50, xbins_hthz_res[iLayer-1][0], xbins_hthz_res[iLayer-1][1]);
-                IHistogram hz1 = aida.histogram1D("hthreserr_z_layer" + (iLayer) + "_" + side[s] , 50, xbins_hthz_reserr[iLayer-1][0], xbins_hthz_reserr[iLayer-1][1]);
-                IHistogram hz2 = aida.histogram1D("hthrespull_z_layer" + (iLayer) + "_" + side[s] , 50, xbins_hthz_respull[iLayer-1][0], xbins_hthz_respull[iLayer-1][1]);
-                IHistogram hz11 = aida.histogram1D("hthreserrms_z_layer" + (iLayer) + "_" + side[s] , 50, 0, 1);
-                IHistogram hz111 = aida.histogram1D("hthreserrres_z_layer" + (iLayer) + "_" + side[s] , 50, 0, 1);
-                
-                IHistogram h2_slope;
-                if("top".equals(side[s])) h2_slope = aida.histogram2D("hthrespull_slope_y_layer" + (iLayer) + "_" + side[s],50,0,0.1, 50, xbins_hthy_respull[iLayer-1][0], xbins_hthy_respull[iLayer-1][1]);
-                else h2_slope = aida.histogram2D("hthrespull_slope_y_layer" + (iLayer) + "_" + side[s],50,-0.1,0, 50, xbins_hthy_respull[iLayer-1][0], xbins_hthy_respull[iLayer-1][1]);
-                
-                
-                
-
-                int region = (iLayer-1);//*2+iSide;
-
-                plotter_hthresy.region(region).plot(h);
-                plotter_hthresyerr.region(region).plot(h1);
-                plotter_hthresypull.region(region).plot(h2);
-                plotter_hthresypullslope.region(region).plot(h2_slope);
-
-                plotter_hthresz.region(region).plot(hz);
-                plotter_hthreszerr.region(region).plot(hz1);
-                plotter_hthreszpull.region(region).plot(hz2);
-
-                plotter_hthreszerrms.region(region).plot(hz11);
-                plotter_hthreszerrres.region(region).plot(hz111);
-
-                
-                ((PlotterRegion) plotter_hthresy.region(region)).getPlot().setAllowUserInteraction(true);
-                ((PlotterRegion) plotter_hthresy.region(region)).getPlot().setAllowPopupMenus(true);
-                ((PlotterRegion) plotter_hthresyerr.region(region)).getPlot().setAllowUserInteraction(true);
-                ((PlotterRegion) plotter_hthresyerr.region(region)).getPlot().setAllowPopupMenus(true);
-                ((PlotterRegion) plotter_hthresypull.region(region)).getPlot().setAllowUserInteraction(true);
-                ((PlotterRegion) plotter_hthresypull.region(region)).getPlot().setAllowPopupMenus(true);
-                ((PlotterRegion) plotter_hthresypullslope.region(region)).getPlot().setAllowUserInteraction(true);
-                ((PlotterRegion) plotter_hthresypullslope.region(region)).getPlot().setAllowPopupMenus(true);
-                 plotter_hthresypull.style().dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow");
-
-                ((PlotterRegion) plotter_hthresz.region(region)).getPlot().setAllowUserInteraction(true);
-                ((PlotterRegion) plotter_hthresz.region(region)).getPlot().setAllowPopupMenus(true);
-                ((PlotterRegion) plotter_hthreszerr.region(region)).getPlot().setAllowUserInteraction(true);
-                ((PlotterRegion) plotter_hthreszerr.region(region)).getPlot().setAllowPopupMenus(true);
-                ((PlotterRegion) plotter_hthreszpull.region(region)).getPlot().setAllowUserInteraction(true);
-                ((PlotterRegion) plotter_hthreszpull.region(region)).getPlot().setAllowPopupMenus(true);
-                
-                ((PlotterRegion) plotter_hthreszerrms.region(region)).getPlot().setAllowUserInteraction(true);
-                ((PlotterRegion) plotter_hthreszerrms.region(region)).getPlot().setAllowPopupMenus(true);
-                ((PlotterRegion) plotter_hthreszerrres.region(region)).getPlot().setAllowUserInteraction(true);
-                ((PlotterRegion) plotter_hthreszerrres.region(region)).getPlot().setAllowPopupMenus(true);
-            
-                
-            
-            }
-            
-            plotterFrameHTH.addPlotter(plotter_hthresy);
-            plotterFrameHTH.addPlotter(plotter_hthresyerr);
-            plotterFrameHTH.addPlotter(plotter_hthresypull);
-            plotterFrameHTH.addPlotter(plotter_hthresypullslope);
-            plotterFrameHTH.addPlotter(plotter_hthresz);
-            plotterFrameHTH.addPlotter(plotter_hthreszerr);
-            plotterFrameHTH.addPlotter(plotter_hthreszpull);
-            plotterFrameHTH.addPlotter(plotter_hthreszerrms);
-            plotterFrameHTH.addPlotter(plotter_hthreszerrres);
+          
+           
         }
         
         
@@ -1814,7 +1522,7 @@
          
          
         IPlotter plotter_prf = af.createPlotterFactory().create();
-        plotter_prf.createRegions(2,3,0);
+        plotter_prf.createRegions(1,2,0);
         plotter_prf.setTitle("<Residuals>");
         IDataPointSetFactory dpsf = aida.analysisFactory().createDataPointSetFactory(null);
         dps_t = dpsf.create("dps_t", "Mean of u residuals top",2);
@@ -1823,31 +1531,11 @@
         plotter_prf.region(0).plot(dps_b);
         
         dps_pull_t = dpsf.create("dps_pull_t", "Mean of u pulls top",2);
-        plotter_prf.region(3).plot(dps_pull_t);
+        plotter_prf.region(1).plot(dps_pull_t);
         dps_pull_b = dpsf.create("dps_pull_b", "Mean of u pulls bottom",2);
-        plotter_prf.region(3).plot(dps_pull_b);
+        plotter_prf.region(1).plot(dps_pull_b);
 
-        dps_hth_y_t = dpsf.create("dps_hth_y_t", "Mean of y residuals top",2);
-        plotter_prf.region(1).plot(dps_hth_y_t);
-        dps_hth_y_b = dpsf.create("dps_hth_y_b", "Mean of y residuals bottom",2);
-        plotter_prf.region(1).plot(dps_hth_y_b);
-
-        dps_pull_hth_y_t = dpsf.create("dps_pull_hth_y_t", "Mean of y pulls top",2);
-        plotter_prf.region(4).plot(dps_pull_hth_y_t);
-        dps_pull_hth_y_b = dpsf.create("dps_pull_hth_y_b", "Mean of y pulls bottom",2);
-        plotter_prf.region(4).plot(dps_pull_hth_y_b);
-
-        dps_hth_z_t = dpsf.create("dps_hth_z_t", "Mean of z residuals top",2);
-        plotter_prf.region(2).plot(dps_hth_z_t);
-        dps_hth_z_b = dpsf.create("dps_hth_z_b", "Mean of z residuals bottom",2);
-        plotter_prf.region(2).plot(dps_hth_z_b);
-        
-        dps_pull_hth_z_t = dpsf.create("dps_pull_hth_z_t", "Mean of z pulls top",2);
-        plotter_prf.region(5).plot(dps_pull_hth_z_t);
-        dps_pull_hth_z_b = dpsf.create("dps_pull_hth_z_b", "Mean of z pulls bottom",2);
-        plotter_prf.region(5).plot(dps_pull_hth_z_b);
-
-        for(int region=0;region<6;++region) {
+        for(int region=0;region<2;++region) {
             ((PlotterRegion) plotter_prf.region(region)).getPlot().setAllowUserInteraction(true);
             ((PlotterRegion) plotter_prf.region(region)).getPlot().setAllowPopupMenus(true);
         }
@@ -1901,8 +1589,6 @@
         
         plotterFrame.pack();
         plotterFrame.setVisible(!hideFrame);
-        plotterFrameHTH.pack();
-        plotterFrameHTH.setVisible(!hideFrame);        
         plotterFrameSummary.pack();
         plotterFrameSummary.setVisible(!hideFrame);
         
@@ -1962,101 +1648,8 @@
             dps_pull_b.point(i-1).coordinate(0).setErrorPlus(0);
             
         }
-        dps_hth_y_t.clear();
-        dps_hth_y_b.clear();
-        dps_hth_z_t.clear();
-        dps_hth_z_b.clear();
-        dps_pull_hth_y_t.clear();
-        dps_pull_hth_y_b.clear();
-        dps_pull_hth_z_t.clear();
-        dps_pull_hth_z_b.clear();
         
-         for(int i=1;i<6;++i) {
-                
-            double mean = aida.histogram1D("hthres_y_layer" + i + "_bottom").mean();
-            double stddev = aida.histogram1D("hthres_y_layer" + i + "_bottom").rms();
-            double N =  aida.histogram1D("hthres_y_layer" + i + "_bottom").entries();
-            double error = N >0 ? stddev/Math.sqrt(N) : 0; 
-            dps_hth_y_b.addPoint();
-            dps_hth_y_b.point(i-1).coordinate(1).setValue(mean);
-            dps_hth_y_b.point(i-1).coordinate(1).setErrorPlus(error);
-            dps_hth_y_b.point(i-1).coordinate(0).setValue(i);
-            dps_hth_y_b.point(i-1).coordinate(0).setErrorPlus(0);
-            
-            mean = aida.histogram1D("hthres_y_layer" + i + "_top").mean();
-            stddev = aida.histogram1D("hthres_y_layer" + i + "_top").rms();
-            N =  aida.histogram1D("hthres_y_layer" + i + "_top").entries();
-            error = N >0 ? stddev/Math.sqrt(N) : 0; 
-            dps_hth_y_t.addPoint();
-            dps_hth_y_t.point(i-1).coordinate(1).setValue(mean);
-            dps_hth_y_t.point(i-1).coordinate(1).setErrorPlus(error);
-            dps_hth_y_t.point(i-1).coordinate(0).setValue(i);
-            dps_hth_y_t.point(i-1).coordinate(0).setErrorPlus(0);
-            
-            mean = aida.histogram1D("hthres_z_layer" + i + "_top").mean();
-            stddev = aida.histogram1D("hthres_z_layer" + i + "_top").rms();
-            N =  aida.histogram1D("hthres_z_layer" + i + "_top").entries();
-            error = N >0 ? stddev/Math.sqrt(N) : 0; 
-            dps_hth_z_t.addPoint();
-            dps_hth_z_t.point(i-1).coordinate(1).setValue(mean);
-            dps_hth_z_t.point(i-1).coordinate(1).setErrorPlus(error);
-            dps_hth_z_t.point(i-1).coordinate(0).setValue(i);
-            dps_hth_z_t.point(i-1).coordinate(0).setErrorPlus(0);
-
-            mean = aida.histogram1D("hthres_z_layer" + i + "_bottom").mean();
-            stddev = aida.histogram1D("hthres_z_layer" + i + "_bottom").rms();
-            N =  aida.histogram1D("hthres_z_layer" + i + "_bottom").entries();
-            error = N >0 ? stddev/Math.sqrt(N) : 0; 
-            dps_hth_z_b.addPoint();
-            dps_hth_z_b.point(i-1).coordinate(1).setValue(mean);
-            dps_hth_z_b.point(i-1).coordinate(1).setErrorPlus(error);
-            dps_hth_z_b.point(i-1).coordinate(0).setValue(i);
-            dps_hth_z_b.point(i-1).coordinate(0).setErrorPlus(0);
-            
-            
-             mean = aida.histogram1D("hthrespull_y_layer" + i + "_bottom").mean();
-             stddev = aida.histogram1D("hthrespull_y_layer" + i + "_bottom").rms();
-             N =  aida.histogram1D("hthrespull_y_layer" + i + "_bottom").entries();
-             error = N >0 ? stddev/Math.sqrt(N) : 0; 
-            dps_pull_hth_y_b.addPoint();
-            dps_pull_hth_y_b.point(i-1).coordinate(1).setValue(mean);
-            dps_pull_hth_y_b.point(i-1).coordinate(1).setErrorPlus(error);
-            dps_pull_hth_y_b.point(i-1).coordinate(0).setValue(i);
-            dps_pull_hth_y_b.point(i-1).coordinate(0).setErrorPlus(0);
-            
-            mean = aida.histogram1D("hthrespull_y_layer" + i + "_top").mean();
-            stddev = aida.histogram1D("hthrespull_y_layer" + i + "_top").rms();
-            N =  aida.histogram1D("hthrespull_y_layer" + i + "_top").entries();
-            error = N >0 ? stddev/Math.sqrt(N) : 0; 
-            dps_pull_hth_y_t.addPoint();
-            dps_pull_hth_y_t.point(i-1).coordinate(1).setValue(mean);
-            dps_pull_hth_y_t.point(i-1).coordinate(1).setErrorPlus(error);
-            dps_pull_hth_y_t.point(i-1).coordinate(0).setValue(i);
-            dps_pull_hth_y_t.point(i-1).coordinate(0).setErrorPlus(0);
-            
-            mean = aida.histogram1D("hthrespull_z_layer" + i + "_top").mean();
-            stddev = aida.histogram1D("hthrespull_z_layer" + i + "_top").rms();
-            N =  aida.histogram1D("hthrespull_z_layer" + i + "_top").entries();
-            error = N >0 ? stddev/Math.sqrt(N) : 0; 
-            dps_pull_hth_z_t.addPoint();
-            dps_pull_hth_z_t.point(i-1).coordinate(1).setValue(mean);
-            dps_pull_hth_z_t.point(i-1).coordinate(1).setErrorPlus(error);
-            dps_pull_hth_z_t.point(i-1).coordinate(0).setValue(i);
-            dps_pull_hth_z_t.point(i-1).coordinate(0).setErrorPlus(0);
-
-            mean = aida.histogram1D("hthrespull_z_layer" + i + "_bottom").mean();
-            stddev = aida.histogram1D("hthrespull_z_layer" + i + "_bottom").rms();
-            N =  aida.histogram1D("hthrespull_z_layer" + i + "_bottom").entries();
-            error = N >0 ? stddev/Math.sqrt(N) : 0; 
-            dps_pull_hth_z_b.addPoint();
-            dps_pull_hth_z_b.point(i-1).coordinate(1).setValue(mean);
-            dps_pull_hth_z_b.point(i-1).coordinate(1).setErrorPlus(error);
-            dps_pull_hth_z_b.point(i-1).coordinate(0).setValue(i);
-            dps_pull_hth_z_b.point(i-1).coordinate(0).setErrorPlus(0);
-            
 
-         }
-    
          /*
          for(int iLayer=1;iLayer<11;++iLayer) { 
             dps_resuydiff_t[iLayer-1].clear();
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