LISTSERV mailing list manager LISTSERV 16.5

Help for HPS-SVN Archives


HPS-SVN Archives

HPS-SVN Archives


HPS-SVN@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

HPS-SVN Home

HPS-SVN Home

HPS-SVN  July 2015

HPS-SVN July 2015

Subject:

r3277 - /java/trunk/analysis/src/main/java/org/hps/analysis/dataquality/TrackingResiduals.java

From:

[log in to unmask]

Reply-To:

Notification of commits to the hps svn repository <[log in to unmask]>

Date:

Fri, 24 Jul 2015 01:52:35 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (455 lines)

Author: [log in to unmask]
Date: Thu Jul 23 18:52:22 2015
New Revision: 3277

Log:
make u-residual plots work

Modified:
    java/trunk/analysis/src/main/java/org/hps/analysis/dataquality/TrackingResiduals.java

Modified: java/trunk/analysis/src/main/java/org/hps/analysis/dataquality/TrackingResiduals.java
 =============================================================================
--- java/trunk/analysis/src/main/java/org/hps/analysis/dataquality/TrackingResiduals.java	(original)
+++ java/trunk/analysis/src/main/java/org/hps/analysis/dataquality/TrackingResiduals.java	Thu Jul 23 18:52:22 2015
@@ -13,6 +13,7 @@
 import java.util.Map;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+import org.hps.recon.tracking.gbl.GBLStripClusterData;
 import org.lcsim.event.EventHeader;
 import org.lcsim.event.GenericObject;
 import org.lcsim.geometry.Detector;
@@ -32,12 +33,13 @@
 
     int nEvents = 0;
 
-    private String plotDir = "TrackResiduals/";
+    private final String plotDir = "TrackResiduals/";
     String[] trackingQuantNames = {};
-    int nmodules = 6;
-    private String posresDir = "PostionResiduals/";
-    private String uresDir = "UResiduals/";
-    private String timeresDir = "TimeResiduals/";
+    private final int nmodules = 6;
+    private final int nsensors = 18;
+    private final String posresDir = "PostionResiduals/";
+    private final String uresDir = "UResiduals/";
+    private final String timeresDir = "TimeResiduals/";
     private Map<String, Double> xposTopMeanResidMap;
     private Map<String, Double> yposTopMeanResidMap;
     private Map<String, Double> xposBotMeanResidMap;
@@ -48,6 +50,17 @@
     private Map<String, Double> xposBotSigmaResidMap;
     private Map<String, Double> yposBotSigmaResidMap;
     private Map<String, Double> timeSigmaResidMap;
+    IHistogram1D[] xresidtop = new IHistogram1D[nmodules];
+    IHistogram1D[] yresidtop = new IHistogram1D[nmodules];
+    IHistogram1D[] xresidbot = new IHistogram1D[nmodules];
+    IHistogram1D[] yresidbot = new IHistogram1D[nmodules];
+    IHistogram1D[] utopresid = new IHistogram1D[nsensors];
+    IHistogram1D[] ubotresid = new IHistogram1D[nsensors];
+    IHistogram1D[] tresid = new IHistogram1D[nmodules * 2];
+//    IHistogram2D[] utopresidVsU = new IHistogram2D[nsensors];
+//    IHistogram2D[] ubotresidVsU = new IHistogram2D[nsensors];
+//    IHistogram2D[] utopresidVsV = new IHistogram2D[nsensors];
+//    IHistogram2D[] ubotresidVsV = new IHistogram2D[nsensors];
 
     @Override
     protected void detectorChanged(Detector detector) {
@@ -55,41 +68,51 @@
         aida.tree().cd("/");
         resetOccupancyMap();
         for (int i = 1; i <= nmodules; i++) {
-            IHistogram1D xresid = aida.histogram1D(plotDir + triggerType + "/"+posresDir + "Module " + i + " Top x Residual", 50, -getRange(i, true), getRange(i, true));
-            IHistogram1D yresid = aida.histogram1D(plotDir + triggerType + "/"+posresDir + "Module " + i + " Top y Residual", 50, -getRange(i, false), getRange(i, false));
-            IHistogram1D xresidbot = aida.histogram1D(plotDir + triggerType + "/"+posresDir + "Module " + i + " Bot x Residual", 50, -getRange(i, true), getRange(i, true));
-            IHistogram1D yresidbot = aida.histogram1D(plotDir + triggerType + "/"+posresDir + "Module " + i + " Bot y Residual", 50, -getRange(i, false), getRange(i, false));
+            xresidtop[i - 1] = aida.histogram1D(plotDir + triggerType + "/" + posresDir + "Module " + i + " Top x Residual", 50, -getRange(i, true), getRange(i, true));
+            yresidtop[i - 1] = aida.histogram1D(plotDir + triggerType + "/" + posresDir + "Module " + i + " Top y Residual", 50, -getRange(i, false), getRange(i, false));
+            xresidbot[i - 1] = aida.histogram1D(plotDir + triggerType + "/" + posresDir + "Module " + i + " Bot x Residual", 50, -getRange(i, true), getRange(i, true));
+            yresidbot[i - 1] = aida.histogram1D(plotDir + triggerType + "/" + posresDir + "Module " + i + " Bot y Residual", 50, -getRange(i, false), getRange(i, false));
         }
 
         for (int i = 1; i <= nmodules * 2; i++) {
-            IHistogram1D tresid = aida.histogram1D(plotDir + triggerType + "/"+timeresDir + "HalfModule " + i + " t Residual", 50, -20, 20);
-            IHistogram1D utopresid = aida.histogram1D(plotDir + triggerType + "/"+uresDir + "HalfModule " + i + " Top u Residual", 50, -getRange((i + 1) / 2, false), getRange((i + 1) / 2, false));
-            IHistogram1D ubotresid = aida.histogram1D(plotDir + triggerType + "/"+uresDir + "HalfModule " + i + " Bot u Residual", 50, -getRange((i + 1) / 2, false), getRange((i + 1) / 2, false));
+            tresid[i - 1] = aida.histogram1D(plotDir + triggerType + "/" + timeresDir + "HalfModule " + i + " t Residual", 50, -20, 20);
+        }
+        for (int i = 1; i <= nsensors; i++) {
+//            IHistogram1D utopresid = aida.histogram1D(plotDir + triggerType + "/"+uresDir + "HalfModule " + i + " Top u Residual", 50, -getRange((i + 1) / 2, false), getRange((i + 1) / 2, false));
+//            IHistogram1D ubotresid = aida.histogram1D(plotDir + triggerType + "/"+uresDir + "HalfModule " + i + " Bot u Residual", 50, -getRange((i + 1) / 2, false), getRange((i + 1) / 2, false));
+            utopresid[i - 1] = aida.histogram1D(plotDir + triggerType + "/" + uresDir + "HalfModule " + i + " Top u Residual", 200, -Math.max(getRange((i + 1) / 2, false), 0.01), Math.max(getRange((i + 1) / 2, false), 0.01));
+            ubotresid[i - 1] = aida.histogram1D(plotDir + triggerType + "/" + uresDir + "HalfModule " + i + " Bot u Residual", 200, -Math.max(getRange((i + 1) / 2, false), 0.01), Math.max(getRange((i + 1) / 2, false), 0.01));
+//            utopresidVsU[i-1] = aida.histogram2D(plotDir + triggerType + "/" + uresDir + "HalfModule " + i + " Top u Residual vs. u", 100, -20.0, 20.0, 100, -Math.max(getRange((i + 1) / 2, false), 0.01), Math.max(getRange((i + 1) / 2, false), 0.01));
+//            ubotresidVsU[i-1] = aida.histogram2D(plotDir + triggerType + "/" + uresDir + "HalfModule " + i + " Bot u Residual vs. u", 100, -20.0, 20.0, 100, -Math.max(getRange((i + 1) / 2, false), 0.01), Math.max(getRange((i + 1) / 2, false), 0.01));
+//            utopresidVsV[i-1] = aida.histogram2D(plotDir + triggerType + "/" + uresDir + "HalfModule " + i + " Top u Residual vs. v", 100, -50.0, 50.0, 100, -Math.max(getRange((i + 1) / 2, false), 0.01), Math.max(getRange((i + 1) / 2, false), 0.01));
+//            ubotresidVsV[i-1] = aida.histogram2D(plotDir + triggerType + "/" + uresDir + "HalfModule " + i + " Bot u Residual vs. v", 100, -50.0, 50.0, 100, -Math.max(getRange((i + 1) / 2, false), 0.01), Math.max(getRange((i + 1) / 2, false), 0.01));
         }
     }
 
     @Override
     public void process(EventHeader event) {
         aida.tree().cd("/");
-        if (!event.hasCollection(GenericObject.class, trackResidualsCollectionName))
+        if (!event.hasCollection(GenericObject.class, trackResidualsCollectionName)) {
             return;
-          //check to see if this event is from the correct trigger (or "all");
-        if (!matchTrigger(event))
+        }
+        //check to see if this event is from the correct trigger (or "all");
+        if (!matchTrigger(event)) {
             return;
-        nEvents++;        
+        }
+        nEvents++;
         List<GenericObject> trdList = event.get(GenericObject.class, trackResidualsCollectionName);
         for (GenericObject trd : trdList) {
             int nResid = trd.getNDouble();
             int isBot = trd.getIntVal(trd.getNInt() - 1);//last Int is the top/bottom flag
-            for (int i = 1; i <= nResid; i++)
-
+            for (int i = 1; i <= nResid; i++) {
                 if (isBot == 1) {
-                    aida.histogram1D(plotDir + triggerType + "/"+posresDir + "Module " + i + " Bot x Residual").fill(trd.getDoubleVal(i - 1));//x is the double value in the generic object
-                    aida.histogram1D(plotDir + triggerType + "/"+posresDir + "Module " + i + " Bot y Residual").fill(trd.getFloatVal(i - 1));//y is the float value in the generic object
+                    xresidbot[i - 1].fill(trd.getDoubleVal(i - 1));//x is the double value in the generic object
+                    yresidbot[i - 1].fill(trd.getFloatVal(i - 1));//y is the float value in the generic object
                 } else {
-                    aida.histogram1D(plotDir + triggerType + "/"+posresDir + "Module " + i + " Top x Residual").fill(trd.getDoubleVal(i - 1));//x is the double value in the generic object
-                    aida.histogram1D(plotDir + triggerType + "/"+posresDir + "Module " + i + " Top y Residual").fill(trd.getFloatVal(i - 1));//y is the float value in the generic object                    
+                    xresidtop[i - 1].fill(trd.getDoubleVal(i - 1));//x is the double value in the generic object
+                    yresidtop[i - 1].fill(trd.getFloatVal(i - 1));//y is the float value in the generic object                    
                 }
+            }
         }
 
         if (event.hasCollection(GenericObject.class, trackTimeDataCollectionName)) {
@@ -97,26 +120,32 @@
             for (GenericObject ttd : ttdList) {
                 int nResid = ttd.getNDouble();
                 for (int i = 1; i <= nResid; i++) {
-                    aida.histogram1D(plotDir + triggerType + "/" + timeresDir + "HalfModule " + i + " t Residual").fill(ttd.getDoubleVal(i - 1));//x is the double value in the generic object               
+                    tresid[i - 1].fill(ttd.getDoubleVal(i - 1));//x is the double value in the generic object               
                 }
             }
         }
-        
-        if (!event.hasCollection(GenericObject.class, gblStripClusterDataCollectionName))
+
+        if (!event.hasCollection(GenericObject.class, gblStripClusterDataCollectionName)) {
             return;
+        }
         List<GenericObject> gblSCDList = event.get(GenericObject.class, gblStripClusterDataCollectionName);
         for (GenericObject gblSCD : gblSCDList) {
-            double umeas = gblSCD.getDoubleVal(15);//TODO:  implement generic methods into GBLStripClusterData so this isn't hard coded
-            double utrk = gblSCD.getDoubleVal(16);//implement generic methods into GBLStripClusterData so this isn't hard coded
+            double umeas = gblSCD.getDoubleVal(GBLStripClusterData.GBLDOUBLE.UMEAS);//TODO:  implement generic methods into GBLStripClusterData so this isn't hard coded
+            double utrk = gblSCD.getDoubleVal(GBLStripClusterData.GBLDOUBLE.TPOSU);//implement generic methods into GBLStripClusterData so this isn't hard coded
+//            double vtrk = gblSCD.getDoubleVal(GBLStripClusterData.GBLDOUBLE.TPOSV);//implement generic methods into GBLStripClusterData so this isn't hard coded
             double resid = umeas - utrk;
-            double tanlambda = gblSCD.getDoubleVal(21);//use the slope as a proxy for the top/bottom half of tracker
-
-            int i = gblSCD.getIntVal(0);//implement generic methods into GBLStripClusterData so this isn't hard coded
-            if (tanlambda > 0)
-                aida.histogram1D(plotDir + triggerType + "/"+uresDir + "HalfModule " + i + " Top u Residual").fill(resid);//x is the double value in the generic object                 
-            else
-                aida.histogram1D(plotDir + triggerType + "/"+uresDir + "HalfModule " + i + " Bot u Residual").fill(resid);//x is the double value in the generic object                 
-
+            double tanlambda = gblSCD.getDoubleVal(GBLStripClusterData.GBLDOUBLE.TLAMBDA);//use the slope as a proxy for the top/bottom half of tracker
+
+            int i = gblSCD.getIntVal(GBLStripClusterData.GBLINT.ID);//implement generic methods into GBLStripClusterData so this isn't hard coded
+            if (tanlambda > 0) {
+                utopresid[i - 1].fill(resid);//x is the double value in the generic object                 
+//                aida.histogram2D(plotDir + triggerType + "/"+uresDir + "HalfModule " + i + " Top u Residual vs. u").fill(utrk,resid);//x is the double value in the generic object                 
+//                aida.histogram2D(plotDir + triggerType + "/"+uresDir + "HalfModule " + i + " Top u Residual vs. v").fill(vtrk,resid);//x is the double value in the generic object                 
+            } else {
+                ubotresid[i - 1].fill(resid);//x is the double value in the generic object                 
+//                aida.histogram2D(plotDir + triggerType + "/"+uresDir + "HalfModule " + i + " Bot u Residual vs. u").fill(utrk,resid);//x is the double value in the generic object                 
+//                aida.histogram2D(plotDir + triggerType + "/"+uresDir + "HalfModule " + i + " Bot u Residual vs. v").fill(vtrk,resid);//x is the double value in the generic object                 
+            }
         }
     }
 
@@ -155,60 +184,55 @@
         int irYTop = 0;
         int irYBot = 0;
         for (int i = 1; i <= nmodules; i++) {
-            IHistogram1D xresidTop = aida.histogram1D(plotDir + triggerType + "/"+posresDir + "Module " + i + " Top x Residual");
-            IHistogram1D yresidTop = aida.histogram1D(plotDir + triggerType + "/"+posresDir + "Module " + i + " Top y Residual");
-            IHistogram1D xresidBot = aida.histogram1D(plotDir + triggerType + "/"+posresDir + "Module " + i + " Bot x Residual");
-            IHistogram1D yresidBot = aida.histogram1D(plotDir + triggerType + "/"+posresDir + "Module " + i + " Bot y Residual");
-            IFitResult xresultTop = fitGaussian(xresidTop, fitter, "range=\"(-1.0,1.0)\"");
-            IFitResult yresultTop = fitGaussian(yresidTop, fitter, "range=\"(-0.5,0.5)\"");
-            IFitResult xresultBot = fitGaussian(xresidBot, fitter, "range=\"(-1.0,1.0)\"");
-            IFitResult yresultBot = fitGaussian(yresidBot, fitter, "range=\"(-8.0,8.0)\"");
+            IFitResult xresultTop = fitGaussian(xresidtop[i - 1], fitter, "range=\"(-1.0,1.0)\"");
+            IFitResult yresultTop = fitGaussian(yresidtop[i - 1], fitter, "range=\"(-0.5,0.5)\"");
+            IFitResult xresultBot = fitGaussian(xresidbot[i - 1], fitter, "range=\"(-1.0,1.0)\"");
+            IFitResult yresultBot = fitGaussian(yresidbot[i - 1], fitter, "range=\"(-8.0,8.0)\"");
             if (xresultTop != null) {
                 double[] parsXTop = xresultTop.fittedParameters();
-                plotterXTop.region(irXTop).plot(xresidTop);
+                plotterXTop.region(irXTop).plot(xresidtop[i - 1]);
                 plotterXTop.region(irXTop).plot(xresultTop.fittedFunction());
                 irXTop++;
-                xposTopMeanResidMap.put(trackResidualsCollectionName+" " +triggerType+" " +getQuantityName(0, 0, 1, i) + "_x", parsXTop[1]);
-                xposTopSigmaResidMap.put(trackResidualsCollectionName+" " +triggerType+" " +getQuantityName(0, 1, 1, i) + "_x", parsXTop[2]);
+                xposTopMeanResidMap.put(trackResidualsCollectionName + " " + triggerType + " " + getQuantityName(0, 0, 1, i) + "_x", parsXTop[1]);
+                xposTopSigmaResidMap.put(trackResidualsCollectionName + " " + triggerType + " " + getQuantityName(0, 1, 1, i) + "_x", parsXTop[2]);
             }
             if (yresultTop != null) {
                 double[] parsYTop = yresultTop.fittedParameters();
 
-                plotterYTop.region(irYTop).plot(yresidTop);
+                plotterYTop.region(irYTop).plot(yresidtop[i - 1]);
                 plotterYTop.region(irYTop).plot(yresultTop.fittedFunction());
                 irYTop++;
-                yposTopMeanResidMap.put(trackResidualsCollectionName+" " +triggerType+" " +getQuantityName(0, 0, 1, i) + "_y", parsYTop[1]);
-                yposTopSigmaResidMap.put(trackResidualsCollectionName+" " +triggerType+" " +getQuantityName(0, 1, 1, i) + "_y", parsYTop[2]);
+                yposTopMeanResidMap.put(trackResidualsCollectionName + " " + triggerType + " " + getQuantityName(0, 0, 1, i) + "_y", parsYTop[1]);
+                yposTopSigmaResidMap.put(trackResidualsCollectionName + " " + triggerType + " " + getQuantityName(0, 1, 1, i) + "_y", parsYTop[2]);
             }
             if (xresultBot != null) {
                 double[] parsXBot = xresultBot.fittedParameters();
-                plotterXBottom.region(irXBot).plot(xresidBot);
+                plotterXBottom.region(irXBot).plot(xresidbot[i - 1]);
                 plotterXBottom.region(irXBot).plot(xresultBot.fittedFunction());
                 irXBot++;
-                xposBotMeanResidMap.put(trackResidualsCollectionName+" " +triggerType+" " +getQuantityName(0, 0, 0, i) + "_x", parsXBot[1]);
-                xposBotSigmaResidMap.put(trackResidualsCollectionName+" " +triggerType+" " +getQuantityName(0, 1, 0, i) + "_x", parsXBot[2]);
+                xposBotMeanResidMap.put(trackResidualsCollectionName + " " + triggerType + " " + getQuantityName(0, 0, 0, i) + "_x", parsXBot[1]);
+                xposBotSigmaResidMap.put(trackResidualsCollectionName + " " + triggerType + " " + getQuantityName(0, 1, 0, i) + "_x", parsXBot[2]);
             }
             if (yresultBot != null) {
                 double[] parsYBot = yresultBot.fittedParameters();
-                plotterYBottom.region(irYBot).plot(yresidBot);
+                plotterYBottom.region(irYBot).plot(yresidbot[i - 1]);
                 plotterYBottom.region(irYBot).plot(yresultBot.fittedFunction());
                 irYBot++;
-                yposBotMeanResidMap.put(trackResidualsCollectionName+" " +triggerType+" " +getQuantityName(0, 0, 0, i) + "_y", parsYBot[1]);
-                yposBotSigmaResidMap.put(trackResidualsCollectionName+" " +triggerType+" " +getQuantityName(0, 1, 0, i) + "_y", parsYBot[2]);
+                yposBotMeanResidMap.put(trackResidualsCollectionName + " " + triggerType + " " + getQuantityName(0, 0, 0, i) + "_y", parsYBot[1]);
+                yposBotSigmaResidMap.put(trackResidualsCollectionName + " " + triggerType + " " + getQuantityName(0, 1, 0, i) + "_y", parsYBot[2]);
             }
 
         }
         int iTime = 0;
         for (int i = 1; i <= nmodules * 2; i++) {
-            IHistogram1D tresid = aida.histogram1D(plotDir + triggerType + "/"+timeresDir + "HalfModule " + i + " t Residual");
-            IFitResult tresult = fitGaussian(tresid, fitter, "range=\"(-15.0,15.0)\"");
+            IFitResult tresult = fitGaussian(tresid[i - 1], fitter, "range=\"(-15.0,15.0)\"");
             if (tresult != null) {
                 double[] parsTime = tresult.fittedParameters();
-                plotterTime.region(iTime).plot(tresid);
+                plotterTime.region(iTime).plot(tresid[i - 1]);
                 plotterTime.region(iTime).plot(tresult.fittedFunction());
                 iTime++;
-                timeMeanResidMap.put(trackTimeDataCollectionName+" " +triggerType+" " +getQuantityName(1, 0, 2, i) + "_dt", parsTime[1]);
-                timeSigmaResidMap.put(trackTimeDataCollectionName+" " +triggerType+" " +getQuantityName(1, 1, 2, i) + "_dt", parsTime[2]);
+                timeMeanResidMap.put(trackTimeDataCollectionName + " " + triggerType + " " + getQuantityName(1, 0, 2, i) + "_dt", parsTime[1]);
+                timeSigmaResidMap.put(trackTimeDataCollectionName + " " + triggerType + " " + getQuantityName(1, 1, 2, i) + "_dt", parsTime[2]);
             }
 
         }
@@ -245,20 +269,25 @@
     private String getQuantityName(int itype, int iquant, int top, int nlayer) {
         String typeString = "position_resid";
         String quantString = "mean_";
-        if (itype == 1)
+        if (itype == 1) {
             typeString = "time_resid";
-        if (iquant == 1)
+        }
+        if (iquant == 1) {
             quantString = "sigma_";
+        }
 
         String botString = "bot_";
-        if (top == 1)
+        if (top == 1) {
             botString = "top_";
-        if (top == 2)
+        }
+        if (top == 2) {
             botString = "";
+        }
 
         String layerString = "module" + nlayer;
-        if (itype == 1)
+        if (itype == 1) {
             layerString = "halfmodule" + nlayer;
+        }
 
         return typeString + quantString + botString + layerString;
     }
@@ -266,51 +295,71 @@
     @Override
     public void printDQMData() {
         System.out.println("TrackingResiduals::printDQMData");
-        for (Map.Entry<String, Double> entry : xposTopMeanResidMap.entrySet())
-            System.out.println(entry.getKey() + " = " + entry.getValue());
-        for (Map.Entry<String, Double> entry : xposBotMeanResidMap.entrySet())
-            System.out.println(entry.getKey() + " = " + entry.getValue());
-        for (Map.Entry<String, Double> entry : xposTopSigmaResidMap.entrySet())
-            System.out.println(entry.getKey() + " = " + entry.getValue());
-        for (Map.Entry<String, Double> entry : xposBotSigmaResidMap.entrySet())
-            System.out.println(entry.getKey() + " = " + entry.getValue());
-        for (Map.Entry<String, Double> entry : yposTopMeanResidMap.entrySet())
-            System.out.println(entry.getKey() + " = " + entry.getValue());
-        for (Map.Entry<String, Double> entry : yposBotMeanResidMap.entrySet())
-            System.out.println(entry.getKey() + " = " + entry.getValue());
-        for (Map.Entry<String, Double> entry : yposTopSigmaResidMap.entrySet())
-            System.out.println(entry.getKey() + " = " + entry.getValue());
-        for (Map.Entry<String, Double> entry : yposBotSigmaResidMap.entrySet())
-            System.out.println(entry.getKey() + " = " + entry.getValue());
-        for (Map.Entry<String, Double> entry : timeMeanResidMap.entrySet())
-            System.out.println(entry.getKey() + " = " + entry.getValue());
-        for (Map.Entry<String, Double> entry : timeSigmaResidMap.entrySet())
-            System.out.println(entry.getKey() + " = " + entry.getValue());
+        for (Map.Entry<String, Double> entry : xposTopMeanResidMap.entrySet()) {
+            System.out.println(entry.getKey() + " = " + entry.getValue());
+        }
+        for (Map.Entry<String, Double> entry : xposBotMeanResidMap.entrySet()) {
+            System.out.println(entry.getKey() + " = " + entry.getValue());
+        }
+        for (Map.Entry<String, Double> entry : xposTopSigmaResidMap.entrySet()) {
+            System.out.println(entry.getKey() + " = " + entry.getValue());
+        }
+        for (Map.Entry<String, Double> entry : xposBotSigmaResidMap.entrySet()) {
+            System.out.println(entry.getKey() + " = " + entry.getValue());
+        }
+        for (Map.Entry<String, Double> entry : yposTopMeanResidMap.entrySet()) {
+            System.out.println(entry.getKey() + " = " + entry.getValue());
+        }
+        for (Map.Entry<String, Double> entry : yposBotMeanResidMap.entrySet()) {
+            System.out.println(entry.getKey() + " = " + entry.getValue());
+        }
+        for (Map.Entry<String, Double> entry : yposTopSigmaResidMap.entrySet()) {
+            System.out.println(entry.getKey() + " = " + entry.getValue());
+        }
+        for (Map.Entry<String, Double> entry : yposBotSigmaResidMap.entrySet()) {
+            System.out.println(entry.getKey() + " = " + entry.getValue());
+        }
+        for (Map.Entry<String, Double> entry : timeMeanResidMap.entrySet()) {
+            System.out.println(entry.getKey() + " = " + entry.getValue());
+        }
+        for (Map.Entry<String, Double> entry : timeSigmaResidMap.entrySet()) {
+            System.out.println(entry.getKey() + " = " + entry.getValue());
+        }
         System.out.println("*******************************");
     }
 
     @Override
     public void printDQMStrings() {
-        for (Map.Entry<String, Double> entry : xposTopMeanResidMap.entrySet())
-            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
-        for (Map.Entry<String, Double> entry : xposBotMeanResidMap.entrySet())
-            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
-        for (Map.Entry<String, Double> entry : xposTopSigmaResidMap.entrySet())
-            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
-        for (Map.Entry<String, Double> entry : xposBotSigmaResidMap.entrySet())
-            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
-        for (Map.Entry<String, Double> entry : yposTopMeanResidMap.entrySet())
-            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
-        for (Map.Entry<String, Double> entry : yposBotMeanResidMap.entrySet())
-            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
-        for (Map.Entry<String, Double> entry : yposTopSigmaResidMap.entrySet())
-            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
-        for (Map.Entry<String, Double> entry : yposBotSigmaResidMap.entrySet())
-            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
-        for (Map.Entry<String, Double> entry : timeMeanResidMap.entrySet())
-            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
-        for (Map.Entry<String, Double> entry : timeSigmaResidMap.entrySet())
-            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
+        for (Map.Entry<String, Double> entry : xposTopMeanResidMap.entrySet()) {
+            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
+        }
+        for (Map.Entry<String, Double> entry : xposBotMeanResidMap.entrySet()) {
+            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
+        }
+        for (Map.Entry<String, Double> entry : xposTopSigmaResidMap.entrySet()) {
+            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
+        }
+        for (Map.Entry<String, Double> entry : xposBotSigmaResidMap.entrySet()) {
+            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
+        }
+        for (Map.Entry<String, Double> entry : yposTopMeanResidMap.entrySet()) {
+            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
+        }
+        for (Map.Entry<String, Double> entry : yposBotMeanResidMap.entrySet()) {
+            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
+        }
+        for (Map.Entry<String, Double> entry : yposTopSigmaResidMap.entrySet()) {
+            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
+        }
+        for (Map.Entry<String, Double> entry : yposBotSigmaResidMap.entrySet()) {
+            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
+        }
+        for (Map.Entry<String, Double> entry : timeMeanResidMap.entrySet()) {
+            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
+        }
+        for (Map.Entry<String, Double> entry : timeSigmaResidMap.entrySet()) {
+            System.out.println("ALTER TABLE dqm ADD " + entry.getKey() + " double;");
+        }
     }
 
     private void resetOccupancyMap() {
@@ -357,31 +406,43 @@
     private double getRange(int layer, boolean isX) {
         double range = 2.5;
         if (isX) {
-            if (layer == 1)
+            if (layer == 1) {
                 return 0.2;
-            if (layer == 2)
+            }
+            if (layer == 2) {
                 return 0.5;
-            if (layer == 3)
+            }
+            if (layer == 3) {
                 return 0.5;
-            if (layer == 4)
+            }
+            if (layer == 4) {
                 return 1.0;
-            if (layer == 5)
+            }
+            if (layer == 5) {
                 return 1.0;
-            if (layer == 6)
+            }
+            if (layer == 6) {
                 return 1.0;
+            }
         } else {
-            if (layer == 1)
+            if (layer == 1) {
                 return 0.005;
-            if (layer == 2)
+            }
+            if (layer == 2) {
                 return 0.5;
-            if (layer == 3)
+            }
+            if (layer == 3) {
                 return 0.5;
-            if (layer == 4)
+            }
+            if (layer == 4) {
                 return 1.0;
-            if (layer == 5)
+            }
+            if (layer == 5) {
                 return 1.0;
-            if (layer == 6)
+            }
+            if (layer == 6) {
                 return 1.5;
+            }
         }
         return range;
 

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

November 2017
August 2017
July 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use