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  September 2015

HPS-SVN September 2015

Subject:

r3700 - in /java/trunk/analysis/src/main/java/org/hps/analysis/dataquality: TrackingMonitoring.java TrackingResiduals.java V0Monitoring.java

From:

[log in to unmask]

Reply-To:

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

Date:

Thu, 24 Sep 2015 20:11:19 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (531 lines)

Author: [log in to unmask]
Date: Thu Sep 24 13:11:16 2015
New Revision: 3700

Log:
a couple of fixes & adds to the DQM

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

Modified: java/trunk/analysis/src/main/java/org/hps/analysis/dataquality/TrackingMonitoring.java
 =============================================================================
--- java/trunk/analysis/src/main/java/org/hps/analysis/dataquality/TrackingMonitoring.java	(original)
+++ java/trunk/analysis/src/main/java/org/hps/analysis/dataquality/TrackingMonitoring.java	Thu Sep 24 13:11:16 2015
@@ -380,7 +380,7 @@
             double sinphi0 = Math.sin(trk.getTrackStates().get(0).getPhi());
             double omega = trk.getTrackStates().get(0).getOmega();
             double lambda = trk.getTrackStates().get(0).getTanLambda();
-            double z0 = trk.getTrackStates().get(0).getZ0();
+            double z0 = trk.getTrackStates().get(0).getZ0();            
             trkChi2.fill(trk.getChi2());
             nHits.fill(trk.getTrackerHits().size());
             trackNhitsVsChi2.fill(trk.getChi2(), trk.getTrackerHits().size());

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 Sep 24 13:11:16 2015
@@ -57,11 +57,15 @@
     IHistogram1D[] utopresid = new IHistogram1D[nsensors];
     IHistogram1D[] ubotresid = new IHistogram1D[nsensors];
     IHistogram1D[] tresid = new IHistogram1D[nmodules * 2];
+    IHistogram1D xtopresidBS;
+    IHistogram1D ytopresidBS;
+    IHistogram1D xbotresidBS;
+    IHistogram1D ybotresidBS;
+
 //    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) {
 
@@ -74,9 +78,8 @@
             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++) {
+        for (int i = 1; i <= nmodules * 2; i++)
             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));
@@ -87,24 +90,29 @@
 //            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));
         }
+
+        ytopresidBS = aida.histogram1D(plotDir + triggerType + "/" + uresDir + "BeamSpot Top y Residual", 200, -0.5, 0.5);
+        ybotresidBS = aida.histogram1D(plotDir + triggerType + "/" + uresDir + "Beamspot Bot y Residual", 200, -0.5, 0.5);
+
+        xtopresidBS = aida.histogram1D(plotDir + triggerType + "/" + uresDir + "BeamSpot Top x Residual", 200, -0.5, 0.5);
+        xbotresidBS = aida.histogram1D(plotDir + triggerType + "/" + uresDir + "Beamspot Bot x Residual", 200, -0.5, 0.5);
+
     }
 
     @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)) {
+        if (!matchTrigger(event))
             return;
-        }
         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) {
                     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
@@ -112,22 +120,19 @@
                     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)) {
             List<GenericObject> ttdList = event.get(GenericObject.class, trackTimeDataCollectionName);
             for (GenericObject ttd : ttdList) {
                 int nResid = ttd.getNDouble();
-                for (int i = 1; i <= nResid; i++) {
+                for (int i = 1; i <= nResid; i++)
                     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(GBLStripClusterData.GBLDOUBLE.UMEAS);//TODO:  implement generic methods into GBLStripClusterData so this isn't hard coded
@@ -137,15 +142,24 @@
             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) {
+            if (i == 666)
+                if (tanlambda > 0)
+                    xtopresidBS.fill(resid);
+                else
+                    xbotresidBS.fill(resid);
+            else if (i == 667)
+                if (tanlambda > 0)
+                    ytopresidBS.fill(resid);
+                else
+                    ybotresidBS.fill(resid);
+            else 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 {
+            //                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                 
-            }
+            //                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                 
         }
     }
 
@@ -269,25 +283,20 @@
     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;
     }
@@ -295,71 +304,51 @@
     @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() {
@@ -406,43 +395,31 @@
     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;
 

Modified: java/trunk/analysis/src/main/java/org/hps/analysis/dataquality/V0Monitoring.java
 =============================================================================
--- java/trunk/analysis/src/main/java/org/hps/analysis/dataquality/V0Monitoring.java	(original)
+++ java/trunk/analysis/src/main/java/org/hps/analysis/dataquality/V0Monitoring.java	Thu Sep 24 13:11:16 2015
@@ -160,9 +160,8 @@
         aida.tree().cd("/");
         String xtra = "Extras";
         String trkType = "SeedTrack/";
-        if (isGBL) {
+        if (isGBL)
             trkType = "GBLTrack/";
-        }
         /*  V0 Quantities   */
         /*  Mass, vertex, chi^2 of fit */
         /*  unconstrained */
@@ -242,23 +241,18 @@
     @Override
     public void process(EventHeader event) {
         /*  make sure everything is there */
-        if (!event.hasCollection(ReconstructedParticle.class, finalStateParticlesColName)) {
+        if (!event.hasCollection(ReconstructedParticle.class, finalStateParticlesColName))
             return;
-        }
-        if (!event.hasCollection(ReconstructedParticle.class, unconstrainedV0CandidatesColName)) {
+        if (!event.hasCollection(ReconstructedParticle.class, unconstrainedV0CandidatesColName))
             return;
-        }
-        if (!event.hasCollection(ReconstructedParticle.class, beamConV0CandidatesColName)) {
+        if (!event.hasCollection(ReconstructedParticle.class, beamConV0CandidatesColName))
             return;
-        }
-        if (!event.hasCollection(ReconstructedParticle.class, targetV0ConCandidatesColName)) {
+        if (!event.hasCollection(ReconstructedParticle.class, targetV0ConCandidatesColName))
             return;
-        }
 
         //check to see if this event is from the correct trigger (or "all");
-        if (!matchTrigger(event)) {
+        if (!matchTrigger(event))
             return;
-        }
 
         nRecoEvents++;
 
@@ -267,9 +261,8 @@
 
         List<ReconstructedParticle> unonstrainedV0List = event.get(ReconstructedParticle.class, unconstrainedV0CandidatesColName);
         for (ReconstructedParticle uncV0 : unonstrainedV0List) {
-            if (isGBL != TrackType.isGBL(uncV0.getType())) {
+            if (isGBL != TrackType.isGBL(uncV0.getType()))
                 continue;
-            }
             Vertex uncVert = uncV0.getStartVertex();
             Hep3Vector pVtxRot = VecOp.mult(beamAxisRotation, uncV0.getMomentum());
             double theta = Math.acos(pVtxRot.z() / pVtxRot.magnitude());
@@ -333,9 +326,8 @@
                 pxEleVspxPos.fill(pEleRot.x(), pPosRot.x());
                 pyEleVspyPos.fill(pEleRot.y(), pPosRot.y());
                 if (pe < v0MaxPCut && pp < v0MaxPCut && (pe + pp) > v0ESumMinCut && (pe + pp) < v0ESumMaxCut)//enrich radiative-like events
-                {
+                
                     pEleVspPosWithCut.fill(pe, pp);
-                }
             }
 
             double eleT = TrackUtils.getTrackTime(ele.getTracks().get(0), hitToStrips, hitToRotated);
@@ -350,9 +342,9 @@
         List<ReconstructedParticle> beamConstrainedV0List = event.get(ReconstructedParticle.class, beamConV0CandidatesColName);
         nV0.fill(beamConstrainedV0List.size());
         for (ReconstructedParticle bsV0 : beamConstrainedV0List) {
-            if (isGBL != TrackType.isGBL(bsV0.getType())) {
+
+            if (isGBL != TrackType.isGBL(bsV0.getType()))
                 continue;
-            }
             nTotV0++;
             Vertex bsVert = bsV0.getStartVertex();
             bsconVx.fill(bsVert.getPosition().x());
@@ -371,9 +363,10 @@
 
         List<ReconstructedParticle> targetConstrainedV0List = event.get(ReconstructedParticle.class, targetV0ConCandidatesColName);
         for (ReconstructedParticle tarV0 : targetConstrainedV0List) {
-            if (isGBL != TrackType.isGBL(tarV0.getType())) {
+
+            if (isGBL != TrackType.isGBL(tarV0.getType()))
                 continue;
-            }
+
             Vertex tarVert = tarV0.getStartVertex();
             tarconVx.fill(tarVert.getPosition().x());
             tarconVy.fill(tarVert.getPosition().y());
@@ -384,32 +377,27 @@
             tarconChi2VsTrkChi2.fill(tarV0.getParticles().get(0).getTracks().get(0).getChi2() + tarV0.getParticles().get(1).getTracks().get(0).getChi2(), tarVert.getChi2());
         }
         List<ReconstructedParticle> finalStateParticles = event.get(ReconstructedParticle.class, finalStateParticlesColName);
-        if (debug) {
+        if (debug)
             System.out.println("This events has " + finalStateParticles.size() + " final state particles");
-        }
 
         ReconstructedParticle ele1 = null;
         ReconstructedParticle ele2 = null;
         int sumCharge = 0;
         int numChargedParticles = 0;
         for (ReconstructedParticle fsPart : finalStateParticles) {
-            if (isGBL != TrackType.isGBL(fsPart.getType())) {
+            if (isGBL != TrackType.isGBL(fsPart.getType()))
                 continue;
-            }
-            if (debug) {
+            if (debug)
                 System.out.println("PDGID = " + fsPart.getParticleIDUsed() + "; charge = " + fsPart.getCharge() + "; pz = " + fsPart.getMomentum().x());
-            }
             double charge = fsPart.getCharge();
             sumCharge += charge;
             if (charge != 0) {
                 numChargedParticles++;
-                if (charge < 1) {
-                    if (ele1 == null) {
+                if (charge < 1)
+                    if (ele1 == null)
                         ele1 = fsPart;
-                    } else if (!hasSharedStrips(ele1, fsPart, hitToStrips, hitToRotated)) {
+                    else if (!hasSharedStrips(ele1, fsPart, hitToStrips, hitToRotated))
                         ele2 = fsPart;
-                    }
-                }
             }
         }
         sumChargeHisto.fill(sumCharge);
@@ -480,9 +468,8 @@
     @Override
     public void printDQMData() {
         System.out.println("V0Monitoring::printDQMData");
-        for (Entry<String, Double> entry : monitoredQuantityMap.entrySet()) {
+        for (Entry<String, Double> entry : monitoredQuantityMap.entrySet())
             System.out.println(entry.getKey() + " = " + entry.getValue());
-        }
         System.out.println("*******************************");
     }
 
@@ -507,9 +494,8 @@
             double[] parsVy = resVy.fittedParameters();
             double[] parsVz = resVz.fittedParameters();
 
-            for (int i = 0; i < 5; i++) {
+            for (int i = 0; i < 5; i++)
                 System.out.println("Vertex Fit Parameters:  " + resVx.fittedParameterNames()[i] + " = " + parsVx[i] + "; " + parsVy[i] + "; " + parsVz[i]);
-            }
 
             IPlotter plotter = analysisFactory.createPlotterFactory().create("Vertex Position");
             plotter.createRegions(1, 3);
@@ -523,13 +509,12 @@
             plotter.region(1).plot(resVy.fittedFunction());
             plotter.region(2).plot(bsconVz);
             plotter.region(2).plot(resVz.fittedFunction());
-            if (outputPlots) {
+            if (outputPlots)
                 try {
                     plotter.writeToFile(outputPlotDir + "vertex.png");
                 } catch (IOException ex) {
                     Logger.getLogger(V0Monitoring.class.getName()).log(Level.SEVERE, null, ex);
                 }
-            }
 
 //        monitoredQuantityMap.put(fpQuantNames[2], sumVx / nTotV0);
 //        monitoredQuantityMap.put(fpQuantNames[3], sumVy / nTotV0);
@@ -550,9 +535,7 @@
     @Override
     public void printDQMStrings() {
         for (int i = 0; i < 9; i++)//TODO:  do this in a smarter way...loop over the map
-        {
             System.out.println("ALTER TABLE dqm ADD " + fpQuantNames[i] + " double;");
-        }
     }
 
     IFitResult fitVertexPosition(IHistogram1D h1d, IFitter fitter, double[] init, String 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