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

HPS-SVN April 2015

Subject:

r2664 - in /java/trunk: analysis/src/main/java/org/hps/analysis/dataquality/ steering-files/src/main/resources/org/hps/steering/production/ steering-files/src/main/resources/org/hps/steering/recon/ tracking/src/main/java/org/hps/recon/tracking/

From:

[log in to unmask]

Reply-To:

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

Date:

Wed, 8 Apr 2015 02:10:25 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (506 lines)

Author: [log in to unmask]
Date: Tue Apr  7 19:10:15 2015
New Revision: 2664

Log:
add basic DQM plots for pair/trident monitoring

Added:
    java/trunk/analysis/src/main/java/org/hps/analysis/dataquality/TridentMonitoring.java
      - copied, changed from r2663, 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/steering-files/src/main/resources/org/hps/steering/production/DataQualityRecon.lcsim
    java/trunk/steering-files/src/main/resources/org/hps/steering/recon/HPS2014OfflineRecon.lcsim
    java/trunk/tracking/src/main/java/org/hps/recon/tracking/HitTimeTrackCheck.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	Tue Apr  7 19:10:15 2015
@@ -117,36 +117,42 @@
             sumchisq += trk.getChi2();
 
             int nStrips = 0;
+            int nSeedStrips = 0;
             double meanTime = 0;
-            double rmsTime = 0;
-
-            int nSeedStrips = 0;
-            double rmsSeedTime = 0;
+            double meanSeedTime = 0;
             for (TrackerHit hit : trk.getTrackerHits()) {
-//                System.out.format("cross time: %f\n", hit.getTime());
                 Collection<TrackerHit> htsList = hittostrip.allFrom(hittorotated.from(hit));
                 for (TrackerHit hts : htsList) {
                     nStrips++;
                     meanTime += hts.getTime();
-                    rmsTime += hts.getTime() * hts.getTime();
-//                    rmsTime += Math.abs(hts.getTime());
-
-//                    System.out.format("strip time: %f\n", hts.getTime());
                     int layer = ((HpsSiSensor) ((RawTrackerHit) hts.getRawHits().get(0)).getDetectorElement()).getLayerNumber();
                     if (layer <= 6) {
                         nSeedStrips++;
-                        rmsSeedTime += hts.getTime() * hts.getTime();
+                        meanSeedTime += hts.getTime();
                     }
                 }
             }
             meanTime /= nStrips;
-//            rmsTime = Math.sqrt(rmsTime / nStrips);
+            meanSeedTime /= nSeedStrips;
+
+            double rmsTime = 0;
+            double rmsSeedTime = 0;
+            for (TrackerHit hit : trk.getTrackerHits()) {
+                Collection<TrackerHit> htsList = hittostrip.allFrom(hittorotated.from(hit));
+                for (TrackerHit hts : htsList) {
+                    rmsTime += Math.pow(hts.getTime() - meanTime, 2);
+                    int layer = ((HpsSiSensor) ((RawTrackerHit) hts.getRawHits().get(0)).getDetectorElement()).getLayerNumber();
+                    if (layer <= 6) {
+                        rmsSeedTime += Math.pow(hts.getTime() - meanSeedTime, 2);
+                    }
+                }
+            }
             rmsTime = Math.sqrt(rmsTime / nStrips);
             aida.histogram1D(plotDir + "Mean time of hits on track").fill(meanTime);
             aida.histogram1D(plotDir + "RMS time of hits on track").fill(rmsTime);
             aida.histogram2D(plotDir + "Track chi2 vs. RMS time of hits").fill(rmsTime, trk.getChi2());
 
-            rmsSeedTime = Math.sqrt(rmsSeedTime/nSeedStrips);
+            rmsSeedTime = Math.sqrt(rmsSeedTime / nSeedStrips);
             aida.histogram1D(plotDir + "RMS time of hits on seed layers").fill(rmsSeedTime);
 //            System.out.format("%d seed strips, RMS time %f\n", nSeedStrips, rmsSeedTime);
 

Copied: java/trunk/analysis/src/main/java/org/hps/analysis/dataquality/TridentMonitoring.java (from r2663, 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/TridentMonitoring.java	Tue Apr  7 19:10:15 2015
@@ -5,29 +5,33 @@
 import hep.aida.IFitResult;
 import hep.aida.IFitter;
 import hep.aida.IHistogram1D;
-import hep.aida.IPlotter;
-import hep.aida.IPlotterStyle;
-import java.io.IOException;
-import java.util.HashMap;
+import hep.aida.IHistogram2D;
+import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
-import java.util.Map;
 import java.util.Map.Entry;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 import org.lcsim.event.EventHeader;
+import org.lcsim.event.LCRelation;
 import org.lcsim.event.ReconstructedParticle;
+import org.lcsim.event.RelationalTable;
+import org.lcsim.event.Track;
+import org.lcsim.event.TrackerHit;
 import org.lcsim.event.Vertex;
+import org.lcsim.event.base.BaseRelationalTable;
 import org.lcsim.geometry.Detector;
 
 /**
- * DQM driver V0 particles (i.e. e+e- pars) plots
- * things like number of vertex position an mass
+ * DQM driver V0 particles (i.e. e+e- pars) plots things like number of vertex
+ * position an mass
  *
  * @author mgraham on May 14, 2014
  *
  */
-public class V0Monitoring extends DataQualityMonitor {
-
+public class TridentMonitoring extends DataQualityMonitor {
+
+    private final String helicalTrackHitRelationsCollectionName = "HelicalTrackHitRelations";
+    private final String rotatedHelicalTrackHitRelationsCollectionName = "RotatedHelicalTrackHitRelations";
+    private double ebeam = 2.2;
     String finalStateParticlesColName = "FinalStateParticles";
     String unconstrainedV0CandidatesColName = "UnconstrainedV0Candidates";
     String beamConV0CandidatesColName = "BeamspotConstrainedV0Candidates";
@@ -44,54 +48,86 @@
     double sumChi2 = 0.0;
 
     boolean debug = false;
-    private String plotDir = "V0Monitoring/";
+    private String plotDir = "TridentMonitoring/";
+    IHistogram2D trackTime2D;
+    IHistogram1D trackTimeDiff;
+    IHistogram2D vertexMassMomentum;
+    IHistogram2D vertexedTrackMomentum2D;
+    IHistogram2D vertexPxPy;
+    IHistogram1D goodVertexMass;
 
     @Override
     protected void detectorChanged(Detector detector) {
-        System.out.println("V0Monitoring::detectorChanged  Setting up the plotter");
+        System.out.println("TridentMonitoring::detectorChanged  Setting up the plotter");
         aida.tree().cd("/");
 
         /*  V0 Quantities   */
         /*  Mass, vertex, chi^2 of fit */
         /* beamspot constrained */
-        IHistogram1D nV0 = aida.histogram1D(plotDir + "Number of V0 per event", 10, 0, 10);
-        IHistogram1D bsconMass = aida.histogram1D(plotDir + "BS Constrained Mass (GeV)", 100, 0, 0.200);
-        IHistogram1D bsconVx = aida.histogram1D(plotDir + "BS Constrained Vx (mm)", 50, -1, 1);
-        IHistogram1D bsconVy = aida.histogram1D(plotDir + "BS Constrained Vy (mm)", 50, -1, 1);
-        IHistogram1D bsconVz = aida.histogram1D(plotDir + "BS Constrained Vz (mm)", 50, -10, 10);
-        IHistogram1D bsconChi2 = aida.histogram1D(plotDir + "BS Constrained Chi2", 25, 0, 25);
-        /* target constrained */
-        IHistogram1D tarconMass = aida.histogram1D(plotDir + "Target Constrained Mass (GeV)", 100, 0, 0.200);
-        IHistogram1D tarconVx = aida.histogram1D(plotDir + "Target Constrained Vx (mm)", 50, -1, 1);
-        IHistogram1D tarconVy = aida.histogram1D(plotDir + "Target Constrained Vy (mm)", 50, -1, 1);
-        IHistogram1D tarconVz = aida.histogram1D(plotDir + "Target Constrained Vz (mm)", 50, -10, 10);
-        IHistogram1D tarconChi2 = aida.histogram1D(plotDir + "Target Constrained Chi2", 25, 0, 25);
+//        IHistogram1D nV0 = aida.histogram1D(plotDir + "Number of V0 per event", 10, 0, 10);
+//        IHistogram1D bsconMass = aida.histogram1D(plotDir + "BS Constrained Mass (GeV)", 100, 0, 0.200);
+//        IHistogram1D bsconVx = aida.histogram1D(plotDir + "BS Constrained Vx (mm)", 50, -1, 1);
+//        IHistogram1D bsconVy = aida.histogram1D(plotDir + "BS Constrained Vy (mm)", 50, -1, 1);
+//        IHistogram1D bsconVz = aida.histogram1D(plotDir + "BS Constrained Vz (mm)", 50, -10, 10);
+//        IHistogram1D bsconChi2 = aida.histogram1D(plotDir + "BS Constrained Chi2", 25, 0, 25);
+//        /* target constrained */
+//        IHistogram1D tarconMass = aida.histogram1D(plotDir + "Target Constrained Mass (GeV)", 100, 0, 0.200);
+//        IHistogram1D tarconVx = aida.histogram1D(plotDir + "Target Constrained Vx (mm)", 50, -1, 1);
+//        IHistogram1D tarconVy = aida.histogram1D(plotDir + "Target Constrained Vy (mm)", 50, -1, 1);
+//        IHistogram1D tarconVz = aida.histogram1D(plotDir + "Target Constrained Vz (mm)", 50, -10, 10);
+//        IHistogram1D tarconChi2 = aida.histogram1D(plotDir + "Target Constrained Chi2", 25, 0, 25);
+        trackTimeDiff = aida.histogram1D(plotDir + "Track time difference", 100, -25, 25);
+        trackTime2D = aida.histogram2D(plotDir + "Track time vs. track time", 100, -50, 100, 100, -50, 100);
+        vertexMassMomentum = aida.histogram2D(plotDir + "Vertex mass vs. vertex momentum", 100, 0, 4.0, 100, 0, 1.0);
+        vertexedTrackMomentum2D = aida.histogram2D(plotDir + "Positron vs. electron momentum", 100, 0, 2.5, 100, 0, 2.5);
+        vertexPxPy = aida.histogram2D(plotDir + "Vertex Py vs. Px", 100, -0.1, 0.2, 100, -0.1, 0.1);
+        goodVertexMass = aida.histogram1D(plotDir + "Good vertex mass", 100, 0, 0.5);
 
     }
 
     @Override
     public void process(EventHeader event) {
         /*  make sure everything is there */
-        if (!event.hasCollection(ReconstructedParticle.class, finalStateParticlesColName))
-            return;
-        if (!event.hasCollection(ReconstructedParticle.class, unconstrainedV0CandidatesColName))
-            return;
-        if (!event.hasCollection(ReconstructedParticle.class, beamConV0CandidatesColName))
-            return;
-        if (!event.hasCollection(ReconstructedParticle.class, targetV0ConCandidatesColName))
-            return;
+        if (!event.hasCollection(ReconstructedParticle.class, finalStateParticlesColName)) {
+            return;
+        }
+        if (!event.hasCollection(ReconstructedParticle.class, unconstrainedV0CandidatesColName)) {
+            return;
+        }
+        if (!event.hasCollection(ReconstructedParticle.class, beamConV0CandidatesColName)) {
+            return;
+        }
+        if (!event.hasCollection(ReconstructedParticle.class, targetV0ConCandidatesColName)) {
+            return;
+        }
         nRecoEvents++;
 
+        RelationalTable hittostrip = new BaseRelationalTable(RelationalTable.Mode.MANY_TO_MANY, RelationalTable.Weighting.UNWEIGHTED);
+        List<LCRelation> hitrelations = event.get(LCRelation.class, helicalTrackHitRelationsCollectionName);
+        for (LCRelation relation : hitrelations) {
+            if (relation != null && relation.getFrom() != null && relation.getTo() != null) {
+                hittostrip.add(relation.getFrom(), relation.getTo());
+            }
+        }
+
+        RelationalTable hittorotated = new BaseRelationalTable(RelationalTable.Mode.ONE_TO_ONE, RelationalTable.Weighting.UNWEIGHTED);
+        List<LCRelation> rotaterelations = event.get(LCRelation.class, rotatedHelicalTrackHitRelationsCollectionName);
+        for (LCRelation relation : rotaterelations) {
+            if (relation != null && relation.getFrom() != null && relation.getTo() != null) {
+                hittorotated.add(relation.getFrom(), relation.getTo());
+            }
+        }
+
         List<ReconstructedParticle> beamConstrainedV0List = event.get(ReconstructedParticle.class, beamConV0CandidatesColName);
-        aida.histogram1D(plotDir + "Number of V0 per event").fill(beamConstrainedV0List.size());
+//        aida.histogram1D(plotDir + "Number of V0 per event").fill(beamConstrainedV0List.size());
         for (ReconstructedParticle bsV0 : beamConstrainedV0List) {
             nTotV0++;
             Vertex bsVert = bsV0.getStartVertex();
-            aida.histogram1D(plotDir + "BS Constrained Vx (mm)").fill(bsVert.getPosition().x());
-            aida.histogram1D(plotDir + "BS Constrained Vy (mm)").fill(bsVert.getPosition().y());
-            aida.histogram1D(plotDir + "BS Constrained Vz (mm)").fill(bsVert.getPosition().z());
-            aida.histogram1D(plotDir + "BS Constrained Mass (GeV)").fill(bsV0.getMass());
-            aida.histogram1D(plotDir + "BS Constrained Chi2").fill(bsVert.getChi2());
+//            aida.histogram1D(plotDir + "BS Constrained Vx (mm)").fill(bsVert.getPosition().x());
+//            aida.histogram1D(plotDir + "BS Constrained Vy (mm)").fill(bsVert.getPosition().y());
+//            aida.histogram1D(plotDir + "BS Constrained Vz (mm)").fill(bsVert.getPosition().z());
+//            aida.histogram1D(plotDir + "BS Constrained Mass (GeV)").fill(bsV0.getMass());
+//            aida.histogram1D(plotDir + "BS Constrained Chi2").fill(bsVert.getChi2());
             sumMass += bsV0.getMass();
             sumVx += bsVert.getPosition().x();
             sumVy += bsVert.getPosition().y();
@@ -102,19 +138,63 @@
         List<ReconstructedParticle> targetConstrainedV0List = event.get(ReconstructedParticle.class, targetV0ConCandidatesColName);
         for (ReconstructedParticle tarV0 : targetConstrainedV0List) {
             Vertex tarVert = tarV0.getStartVertex();
-            aida.histogram1D(plotDir + "Target Constrained Vx (mm)").fill(tarVert.getPosition().x());
-            aida.histogram1D(plotDir + "Target Constrained Vy (mm)").fill(tarVert.getPosition().y());
-            aida.histogram1D(plotDir + "Target Constrained Vz (mm)").fill(tarVert.getPosition().z());
-            aida.histogram1D(plotDir + "Target Constrained Mass (GeV)").fill(tarV0.getMass());
-            aida.histogram1D(plotDir + "Target Constrained Chi2").fill(tarVert.getChi2());
+//            aida.histogram1D(plotDir + "Target Constrained Vx (mm)").fill(tarVert.getPosition().x());
+//            aida.histogram1D(plotDir + "Target Constrained Vy (mm)").fill(tarVert.getPosition().y());
+//            aida.histogram1D(plotDir + "Target Constrained Vz (mm)").fill(tarVert.getPosition().z());
+//            aida.histogram1D(plotDir + "Target Constrained Mass (GeV)").fill(tarV0.getMass());
+//            aida.histogram1D(plotDir + "Target Constrained Chi2").fill(tarVert.getChi2());
+            List<Track> tracks = new ArrayList<Track>();
+            ReconstructedParticle electron = null, positron = null;
+            for (ReconstructedParticle particle : tarV0.getParticles()) {
+                tracks.addAll(particle.getTracks());
+                if (particle.getCharge() > 0) {
+                    positron = particle;
+                } else if (particle.getCharge() < 0) {
+                    electron = particle;
+                } else {
+                    throw new RuntimeException("expected only electron and positron in vertex, got something with charge 0");
+                }
+            }
+            if (tracks.size() != 2) {
+                throw new RuntimeException("expected two tracks in vertex, got " + tracks.size());
+            }
+            List<Double> trackTimes = new ArrayList<Double>();
+            for (Track track : tracks) {
+                int nStrips = 0;
+                double meanTime = 0;
+                for (TrackerHit hit : track.getTrackerHits()) {
+                    Collection<TrackerHit> htsList = hittostrip.allFrom(hittorotated.from(hit));
+                    for (TrackerHit hts : htsList) {
+                        nStrips++;
+                        meanTime += hts.getTime();
+                    }
+                }
+                meanTime /= nStrips;
+                trackTimes.add(meanTime);
+            }
+            trackTime2D.fill(trackTimes.get(0), trackTimes.get(1));
+            trackTimeDiff.fill(trackTimes.get(0) - trackTimes.get(1));
+            boolean trackTimeDiffCut = Math.abs(trackTimes.get(0) - trackTimes.get(1)) < 5.0;
+            boolean pCut = electron.getMomentum().magnitude() > 0.4 && positron.getMomentum().magnitude() > 0.4;
+            boolean pTotCut = tarV0.getMomentum().magnitude() > 0.8 * 2.2 && tarV0.getMomentum().magnitude() < 2.2;
+            if (trackTimeDiffCut) {
+                vertexMassMomentum.fill(tarV0.getMomentum().magnitude(), tarV0.getMass());
+                vertexedTrackMomentum2D.fill(electron.getMomentum().magnitude(), positron.getMomentum().magnitude());
+                if (pCut && pTotCut) {
+                    vertexPxPy.fill(tarV0.getMomentum().x(), tarV0.getMomentum().y());
+                    goodVertexMass.fill(tarV0.getMass());
+                }
+            }
+//            System.out.println(tarV0.getTracks())
         }
     }
 
     @Override
     public void printDQMData() {
-        System.out.println("V0Monitoring::printDQMData");
-        for (Entry<String, Double> entry : monitoredQuantityMap.entrySet())
+        System.out.println("TridentMonitoring::printDQMData");
+        for (Entry<String, Double> entry : monitoredQuantityMap.entrySet()) {
             System.out.println(entry.getKey() + " = " + entry.getValue());
+        }
         System.out.println("*******************************");
     }
 
@@ -127,63 +207,66 @@
         IAnalysisFactory analysisFactory = IAnalysisFactory.create();
         IFitFactory fitFactory = analysisFactory.createFitFactory();
         IFitter fitter = fitFactory.createFitter("chi2");
-        IHistogram1D bsconVx = aida.histogram1D(plotDir + "BS Constrained Vx (mm)");
-        IHistogram1D bsconVy = aida.histogram1D(plotDir + "BS Constrained Vy (mm)");
-        IHistogram1D bsconVz = aida.histogram1D(plotDir + "BS Constrained Vz (mm)");
-        double[] init = {50.0, 0.0, 0.2, 1.0, 0.0};
-        IFitResult resVx = fitVertexPosition(bsconVx, fitter, init, "range=\"(-0.5,0.5)\"");
-        double[] init2 = {50.0, 0.0, 0.04, 1.0, 0.0};
-        IFitResult resVy = fitVertexPosition(bsconVy, fitter, init2, "range=\"(-0.2,0.2)\"");
-        double[] init3 = {50.0, 0.0, 3.0, 1.0, 0.0};
-        IFitResult resVz = fitVertexPosition(bsconVz, fitter, init3, "range=\"(-6,6)\"");
-
-        double[] parsVx = resVx.fittedParameters();
-        double[] parsVy = resVy.fittedParameters();
-        double[] parsVz = resVz.fittedParameters();
-
-        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);
-        IPlotterStyle pstyle = plotter.style();
-        pstyle.legendBoxStyle().setVisible(false);
-        pstyle.dataStyle().fillStyle().setColor("green");
-        pstyle.dataStyle().lineStyle().setColor("black");
-        plotter.region(0).plot(bsconVx);
-        plotter.region(0).plot(resVx.fittedFunction());
-        plotter.region(1).plot(bsconVy);
-        plotter.region(1).plot(resVy.fittedFunction());
-        plotter.region(2).plot(bsconVz);
-        plotter.region(2).plot(resVz.fittedFunction());
-        if(outputPlots){
-        try {
-            plotter.writeToFile(outputPlotDir +"vertex.png");
-        } catch (IOException ex) {
-            Logger.getLogger(V0Monitoring.class.getName()).log(Level.SEVERE, null, ex);
-        }
-        }
-
-        monitoredQuantityMap.put(fpQuantNames[0], (double) nTotV0 / nRecoEvents);
-        monitoredQuantityMap.put(fpQuantNames[1], sumMass / nTotV0);
-//        monitoredQuantityMap.put(fpQuantNames[2], sumVx / nTotV0);
-//        monitoredQuantityMap.put(fpQuantNames[3], sumVy / nTotV0);
-//        monitoredQuantityMap.put(fpQuantNames[4], sumVz / nTotV0);
-        monitoredQuantityMap.put(fpQuantNames[2], parsVx[1]);
-        monitoredQuantityMap.put(fpQuantNames[3], parsVy[1]);
-        monitoredQuantityMap.put(fpQuantNames[4], parsVz[1]);
-        monitoredQuantityMap.put(fpQuantNames[5], parsVx[2]);
-        monitoredQuantityMap.put(fpQuantNames[6], parsVy[2]);
-        monitoredQuantityMap.put(fpQuantNames[7], parsVz[2]);
-
-        monitoredQuantityMap.put(fpQuantNames[8], sumChi2 / nTotV0);
+//        IHistogram1D bsconVx = aida.histogram1D(plotDir + "BS Constrained Vx (mm)");
+//        IHistogram1D bsconVy = aida.histogram1D(plotDir + "BS Constrained Vy (mm)");
+//        IHistogram1D bsconVz = aida.histogram1D(plotDir + "BS Constrained Vz (mm)");
+//        double[] init = {50.0, 0.0, 0.2, 1.0, 0.0};
+//        IFitResult resVx = fitVertexPosition(bsconVx, fitter, init, "range=\"(-0.5,0.5)\"");
+//        double[] init2 = {50.0, 0.0, 0.04, 1.0, 0.0};
+//        IFitResult resVy = fitVertexPosition(bsconVy, fitter, init2, "range=\"(-0.2,0.2)\"");
+//        double[] init3 = {50.0, 0.0, 3.0, 1.0, 0.0};
+//        IFitResult resVz = fitVertexPosition(bsconVz, fitter, init3, "range=\"(-6,6)\"");
+//
+//        double[] parsVx = resVx.fittedParameters();
+//        double[] parsVy = resVy.fittedParameters();
+//        double[] parsVz = resVz.fittedParameters();
+//
+//        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);
+//        IPlotterStyle pstyle = plotter.style();
+//        pstyle.legendBoxStyle().setVisible(false);
+//        pstyle.dataStyle().fillStyle().setColor("green");
+//        pstyle.dataStyle().lineStyle().setColor("black");
+//        plotter.region(0).plot(bsconVx);
+//        plotter.region(0).plot(resVx.fittedFunction());
+//        plotter.region(1).plot(bsconVy);
+//        plotter.region(1).plot(resVy.fittedFunction());
+//        plotter.region(2).plot(bsconVz);
+//        plotter.region(2).plot(resVz.fittedFunction());
+//        if (outputPlots) {
+//            try {
+//                plotter.writeToFile(outputPlotDir + "vertex.png");
+//            } catch (IOException ex) {
+//                Logger.getLogger(TridentMonitoring.class.getName()).log(Level.SEVERE, null, ex);
+//            }
+//        }
+//
+//        monitoredQuantityMap.put(fpQuantNames[0], (double) nTotV0 / nRecoEvents);
+//        monitoredQuantityMap.put(fpQuantNames[1], sumMass / nTotV0);
+////        monitoredQuantityMap.put(fpQuantNames[2], sumVx / nTotV0);
+////        monitoredQuantityMap.put(fpQuantNames[3], sumVy / nTotV0);
+////        monitoredQuantityMap.put(fpQuantNames[4], sumVz / nTotV0);
+//        monitoredQuantityMap.put(fpQuantNames[2], parsVx[1]);
+//        monitoredQuantityMap.put(fpQuantNames[3], parsVy[1]);
+//        monitoredQuantityMap.put(fpQuantNames[4], parsVz[1]);
+//        monitoredQuantityMap.put(fpQuantNames[5], parsVx[2]);
+//        monitoredQuantityMap.put(fpQuantNames[6], parsVy[2]);
+//        monitoredQuantityMap.put(fpQuantNames[7], parsVz[2]);
+//
+//        monitoredQuantityMap.put(fpQuantNames[8], sumChi2 / nTotV0);
 
     }
 
     @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) {

Modified: java/trunk/steering-files/src/main/resources/org/hps/steering/production/DataQualityRecon.lcsim
 =============================================================================
--- java/trunk/steering-files/src/main/resources/org/hps/steering/production/DataQualityRecon.lcsim	(original)
+++ java/trunk/steering-files/src/main/resources/org/hps/steering/production/DataQualityRecon.lcsim	Tue Apr  7 19:10:15 2015
@@ -15,6 +15,7 @@
         <driver name="TrackMCEfficiency"/> 
         <driver name="FinalStateMonitoring"/>          
         <driver name="V0Monitoring"/>          
+        <driver name="TridentMonitoring"/>
         <driver name="AidaSaveDriver"/>
         <driver name="CleanupDriver"/>
     </execute>    
@@ -48,6 +49,9 @@
         <driver name="V0Monitoring" type="org.hps.analysis.dataquality.V0Monitoring">
             <overwriteDB>false</overwriteDB>
         </driver>
+        <driver name="TridentMonitoring" type="org.hps.analysis.dataquality.TridentMonitoring">
+            <overwriteDB>false</overwriteDB>
+        </driver>
         <driver name="CleanupDriver" type="org.lcsim.recon.tracking.digitization.sisim.config.ReadoutCleanupDriver"/>
 
     </drivers>

Modified: java/trunk/steering-files/src/main/resources/org/hps/steering/recon/HPS2014OfflineRecon.lcsim
 =============================================================================
--- java/trunk/steering-files/src/main/resources/org/hps/steering/recon/HPS2014OfflineRecon.lcsim	(original)
+++ java/trunk/steering-files/src/main/resources/org/hps/steering/recon/HPS2014OfflineRecon.lcsim	Tue Apr  7 19:10:15 2015
@@ -15,7 +15,7 @@
         <driver name="EcalClusterer" />
         <driver name="ReconParticle" />  
         <driver name="TrackDataDriver" />              
-        <driver name="GBLDriver"/> 
+        <!--<driver name="GBLDriver"/>--> 
         <driver name="LCIOWriter"/>
         <driver name="CleanupDriver"/>
     </execute>    
@@ -26,7 +26,7 @@
         <driver name="RawTrackerHitSensorSetup" type="org.lcsim.recon.tracking.digitization.sisim.config.RawTrackerHitSensorSetup"/>
         <driver name="RawTrackerHitFitterDriver" type="org.hps.recon.tracking.RawTrackerHitFitterDriver">
             <fitAlgorithm>Pileup</fitAlgorithm>
-            <useTimestamps>true</useTimestamps>
+            <useTimestamps>false</useTimestamps>
             <correctT0Shift>false</correctT0Shift>
             <useTruthTime>false</useTruthTime>
             <subtractTOF>true</subtractTOF>

Modified: java/trunk/tracking/src/main/java/org/hps/recon/tracking/HitTimeTrackCheck.java
 =============================================================================
--- java/trunk/tracking/src/main/java/org/hps/recon/tracking/HitTimeTrackCheck.java	(original)
+++ java/trunk/tracking/src/main/java/org/hps/recon/tracking/HitTimeTrackCheck.java	Tue Apr  7 19:10:15 2015
@@ -22,6 +22,7 @@
     private int seedsPassed = 0;
     private int tracksChecked = 0;
     private int tracksPassed = 0;
+    private boolean debug = false;
 
     public HitTimeTrackCheck(double rmsTimeCut) {
         this.rmsTimeCut = rmsTimeCut;
@@ -56,7 +57,7 @@
         if (passCheck) {
             seedsPassed++;
         }
-        if (seedsChecked % 10000 == 0) {
+        if (debug && seedsChecked % 10000 == 0) {
             System.out.format("Checked %d seeds, %d passed (%d failed)\n", seedsChecked, seedsPassed, seedsChecked - seedsPassed);
         }
         return passCheck;
@@ -91,7 +92,7 @@
         if (passCheck) {
             tracksPassed++;
         }
-        if (tracksChecked % 100 == 0) {
+        if (debug && tracksChecked % 100 == 0) {
             System.out.format("Checked %d tracks, %d passed (%d failed)\n", tracksChecked, tracksPassed, tracksChecked - tracksPassed);
         }
         return passCheck;

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