From 8e571854cf9478a35da39cca1277aa3681720904 Mon Sep 17 00:00:00 2001 From: Jason Michael Slaunwhite Date: Fri, 2 Oct 2009 13:10:06 +0000 Subject: [PATCH] --- yaml --- r: 74605 b: "refs/heads/CMSSW_7_1_X" c: 976ffd82c1fd123eeb38931e901756815b10a980 h: "refs/heads/CMSSW_7_1_X" i: 74603: 8387c4fea7c83bea333a04cf8b394efa2412b92f v: v3 --- [refs] | 2 +- .../Trigger/interface/HLTMuonMatchAndPlot.h | 33 +- .../python/BPAGTrigRateAnalyzer_cfi.py | 14 +- .../Trigger/python/MuonPostProcessor_cfi.py | 3 +- .../python/MuonTrigRateAnalyzer_cfi.py | 27 +- .../MuonTrigRateAnalyzer_cosmics_cfi.py | 31 +- .../Trigger/python/TopTrigRateAnalyzer_cfi.py | 31 +- .../python/TopTrigRateAnalyzer_cosmics_cfi.py | 32 +- .../Trigger/src/DQMOfflineMuonTrigAnalyzer.cc | 23 +- trunk/DQMOffline/Trigger/src/HLTMuonBPAG.cc | 8 +- .../Trigger/src/HLTMuonMatchAndPlot.cc | 369 +++++++++++------- .../DQMOffline/Trigger/src/TopTrigAnalyzer.cc | 18 +- 12 files changed, 386 insertions(+), 205 deletions(-) diff --git a/[refs] b/[refs] index 66769b0701b0d..926f19bcf0c9d 100644 --- a/[refs] +++ b/[refs] @@ -1,3 +1,3 @@ --- refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e -"refs/heads/CMSSW_7_1_X": e359c174529eb0c97007c2b4a59a0f1df3d3b7f0 +"refs/heads/CMSSW_7_1_X": 976ffd82c1fd123eeb38931e901756815b10a980 diff --git a/trunk/DQMOffline/Trigger/interface/HLTMuonMatchAndPlot.h b/trunk/DQMOffline/Trigger/interface/HLTMuonMatchAndPlot.h index 9dfacd0583ba3..d4b40597ccab9 100755 --- a/trunk/DQMOffline/Trigger/interface/HLTMuonMatchAndPlot.h +++ b/trunk/DQMOffline/Trigger/interface/HLTMuonMatchAndPlot.h @@ -6,10 +6,10 @@ * Documentation available on the CMS TWiki: * https://twiki.cern.ch/twiki/bin/view/CMS/MuonHLTOfflinePerformance * - * $Date: 2009/08/14 13:29:13 $ - * $Revision: 1.6 $ - * \author M. Vander Donckt, J. Klukas (copied from J. Alcaraz) - * \author J. Slaunwhite (modified from above + * $Date: 2009/08/25 10:03:25 $ + * $Revision: 1.7 $ + * + * \author J. Slaunwhite, based on code from Jeff Klukas */ // Base Class Headers @@ -110,6 +110,7 @@ class HLTMuonMatchAndPlot { virtual void begin ( ); virtual void analyze( const edm::Event & iEvent ); virtual void finish ( ); + virtual void endRun (const edm::Run& r, const edm::EventSetup& c); virtual MonitorElement* bookIt ( TString name, TString title, std::vector ); virtual MonitorElement* bookIt ( TString name, TString title, int nbins, float* xBinLowEdges); @@ -197,6 +198,14 @@ class HLTMuonMatchAndPlot { bool virtual applyTriggerSelection (MuonSelectionStruct mySelection, const edm::Event & event); + // boolean to turn on/off overflow inclusion + // function to do the overflow + bool includeOverflow; + void moveOverflow (MonitorElement * myElement); + + // keep track of the ME's you've booked, + // rebin them at job end. + std::vector booked1DMonitorElements; // Data members @@ -259,7 +268,7 @@ class HLTMuonMatchAndPlot { // to simplify charge plots static const int POS_CHARGE = 1; - static const int NEG_CHARGE = 0; + static const int NEG_CHARGE = -1; int getCharge (int pdgId); // 1-D histogram paramters @@ -280,13 +289,15 @@ class HLTMuonMatchAndPlot { int numBinsInPtHisto; // 2-D histogram parameters - std::vector theMaxPtParameters2d; - std::vector theEtaParameters2d; - std::vector thePhiParameters2d; std::vector thePhiEtaParameters2d; - std::vector theDeltaPhiVsPhiParameters; - std::vector theDeltaPhiVsZ0Parameters; - std::vector theDeltaPhiVsD0Parameters; + + // std::vector theMaxPtParameters2d; + // std::vector theEtaParameters2d; + // std::vector thePhiParameters2d; + + // std::vector theDeltaPhiVsPhiParameters; + // std::vector theDeltaPhiVsZ0Parameters; + // std::vector theDeltaPhiVsD0Parameters; // Resolution hisotgram parameters diff --git a/trunk/DQMOffline/Trigger/python/BPAGTrigRateAnalyzer_cfi.py b/trunk/DQMOffline/Trigger/python/BPAGTrigRateAnalyzer_cfi.py index 3fc7ac02620db..2e69688a5e28b 100644 --- a/trunk/DQMOffline/Trigger/python/BPAGTrigRateAnalyzer_cfi.py +++ b/trunk/DQMOffline/Trigger/python/BPAGTrigRateAnalyzer_cfi.py @@ -56,13 +56,13 @@ # Set the ranges and numbers of bins for histograms # max pt is not very useful - MaxPtParameters = cms.vdouble(40,0.,80.), + MaxPtParameters = cms.untracked.vdouble(40,0.,80.), # PtParmeters is the low bin edges, with size = nbins + 1 - PtParameters = cms.vdouble(0.0, 3.0, 4.5, 6, 8, 20.0), - EtaParameters = cms.vdouble(4, -2.1,2.1), - PhiParameters = cms.vdouble(4, -3.15,3.15), - ResParameters = cms.vdouble(50, -0.15, 0.15), - DrParameters = cms.vdouble(50, 0.0, 0.05), + PtParameters = cms.untracked.vdouble(0.0, 3.0, 4.5, 6, 8, 20.0), + EtaParameters = cms.untracked.vdouble(4, -2.1,2.1), + PhiParameters = cms.untracked.vdouble(4, -3.15,3.15), + ResParameters = cms.untracked.vdouble(50, -0.15, 0.15), + DrParameters = cms.untracked.vdouble(50, 0.0, 0.05), MassParameters = cms.untracked.vdouble(50, 2.6, 3.6), @@ -83,7 +83,7 @@ # still used by overlap analyzer # not included in meaningful output - CrossSection = cms.double(0.97), + #CrossSection = cms.double(0.97), # ddd #NSigmas90 = cms.untracked.vdouble(3.0, 3.0, 3.0, 3.0), diff --git a/trunk/DQMOffline/Trigger/python/MuonPostProcessor_cfi.py b/trunk/DQMOffline/Trigger/python/MuonPostProcessor_cfi.py index 683b7387dfdfc..cc9325643b803 100644 --- a/trunk/DQMOffline/Trigger/python/MuonPostProcessor_cfi.py +++ b/trunk/DQMOffline/Trigger/python/MuonPostProcessor_cfi.py @@ -10,7 +10,8 @@ verbose = cms.untracked.uint32(0), # Set to 2 for all messages outputFileName = cms.untracked.string(''), commands = cms.vstring(), - resolution = cms.vstring(), + resolution = cms.vstring(), + efficiency = cms.vstring( #### Comma Checking --- check for trailing commas by searching diff --git a/trunk/DQMOffline/Trigger/python/MuonTrigRateAnalyzer_cfi.py b/trunk/DQMOffline/Trigger/python/MuonTrigRateAnalyzer_cfi.py index 77a6565e98931..bb31087995859 100644 --- a/trunk/DQMOffline/Trigger/python/MuonTrigRateAnalyzer_cfi.py +++ b/trunk/DQMOffline/Trigger/python/MuonTrigRateAnalyzer_cfi.py @@ -57,28 +57,27 @@ # Set the ranges and numbers of bins for histograms # max pt is not very useful - MaxPtParameters = cms.vdouble(25,0.,100.), + #MaxPtParameters = cms.vdouble(25,0.,100.), # PtParmeters is not currently used - EtaParameters = cms.vdouble(25, -3.5,3.5), - PhiParameters = cms.vdouble(25, -3.15,3.15), - ResParameters = cms.vdouble(25, -0.15, 0.15), - DrParameters = cms.vdouble(25, 0.0, 0.05), + EtaParameters = cms.untracked.vdouble(40, -2.1,2.1), + PhiParameters = cms.untracked.vdouble(40, -3.15,3.15), + ResParameters = cms.untracked.vdouble(25, -0.15, 0.15), + DrParameters = cms.untracked.vdouble(25, 0.0, 0.05), # Use Pt Parameters to set bin edges - PtParameters = cms.vdouble(0.0, 2.0, 4.0, + PtParameters = cms.untracked.vdouble(0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 18.0, 20.0, - 22.0, 24.0, 26.0, 28.0, - 30.0, 32.0, 34.0, 36.0, - 38.0, 40.0, - 45.0, 50.0, 55.0, 60.0, - 65.0, 70.0, 75.0, 80.0, - 85.0, 90.0, 95.0, 100.0, + 25.0, 30.0, 35.0, 40.0, + 50.0, 60.0, 70, 80, 90, 100.0, 125.0, 150.0, 175.0, 200.0, - 300.0), + 400.0), + + Z0Parameters = cms.untracked.vdouble(25, -25, 25), + D0Parameters = cms.untracked.vdouble(25, -1, 1), # valid match types are dr and cosmic # future update: make sure default is @@ -97,7 +96,7 @@ # still used by overlap analyzer # not included in meaningful output - CrossSection = cms.double(0.97), + #CrossSection = cms.double(0.97), # ddd #NSigmas90 = cms.untracked.vdouble(3.0, 3.0, 3.0, 3.0), diff --git a/trunk/DQMOffline/Trigger/python/MuonTrigRateAnalyzer_cosmics_cfi.py b/trunk/DQMOffline/Trigger/python/MuonTrigRateAnalyzer_cosmics_cfi.py index 4938a74280b11..1e57e2a256cca 100644 --- a/trunk/DQMOffline/Trigger/python/MuonTrigRateAnalyzer_cosmics_cfi.py +++ b/trunk/DQMOffline/Trigger/python/MuonTrigRateAnalyzer_cosmics_cfi.py @@ -57,28 +57,29 @@ # Set the ranges and numbers of bins for histograms # max pt is not very useful - MaxPtParameters = cms.vdouble(25,0.,100.), + #MaxPtParameters = cms.vdouble(25,0.,100.), # PtParmeters is not currently used - EtaParameters = cms.vdouble(25, -3.5,3.5), - PhiParameters = cms.vdouble(25, -3.15,3.15), - ResParameters = cms.vdouble(25, -0.15, 0.15), - DrParameters = cms.vdouble(25, 0.0, 0.05), + EtaParameters = cms.untracked.vdouble(40, -2.1,2.1), + PhiParameters = cms.untracked.vdouble(40, -3.15,3.15), + ResParameters = cms.untracked.vdouble(25, -0.15, 0.15), + DrParameters = cms.untracked.vdouble(25, 0.0, 0.05), # Use Pt Parameters to set bin edges - PtParameters = cms.vdouble(0.0, 2.0, 4.0, + PtParameters = cms.untracked.vdouble(0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 18.0, 20.0, - 22.0, 24.0, 26.0, 28.0, - 30.0, 32.0, 34.0, 36.0, - 38.0, 40.0, - 45.0, 50.0, 55.0, 60.0, - 65.0, 70.0, 75.0, 80.0, - 85.0, 90.0, 95.0, 100.0, + 25.0, 30.0, 35.0, 40.0, + 50.0, 60.0, 70, 80, 90, 100.0, 125.0, 150.0, 175.0, 200.0, - 300.0), + 400.0), + + Z0Parameters = cms.untracked.vdouble(25, -50, 50), + D0Parameters = cms.untracked.vdouble(25, -25, 25), + + # valid match types are dr and cosmic # future update: make sure default is @@ -89,8 +90,8 @@ # you will ignore the delta R cuts L1DrCut = cms.untracked.double(0.4), - L2DrCut = cms.untracked.double(0.25), - L3DrCut = cms.untracked.double(0.025), + L2DrCut = cms.untracked.double(0.4), + L3DrCut = cms.untracked.double(0.4), DQMStore = cms.untracked.bool(True), diff --git a/trunk/DQMOffline/Trigger/python/TopTrigRateAnalyzer_cfi.py b/trunk/DQMOffline/Trigger/python/TopTrigRateAnalyzer_cfi.py index 7973d29d31895..8aa76283d5e1c 100644 --- a/trunk/DQMOffline/Trigger/python/TopTrigRateAnalyzer_cfi.py +++ b/trunk/DQMOffline/Trigger/python/TopTrigRateAnalyzer_cfi.py @@ -68,13 +68,30 @@ # Set the ranges and numbers of bins for histograms # max pt is not very useful - MaxPtParameters = cms.vdouble(40,0.,80.), - # PtParmeters is not currently used - PtParameters = cms.vdouble(50,0.,80.), - EtaParameters = cms.vdouble(50, -3.5,3.5), - PhiParameters = cms.vdouble(50, -3.15,3.15), - ResParameters = cms.vdouble(50, -0.15, 0.15), - DrParameters = cms.vdouble(50, 0.0, 0.05), + + + #EtaParameters = cms.vdouble(50, -3.5,3.5), + + EtaParameters = cms.untracked.vdouble(40, -2.1,2.1), + PhiParameters = cms.untracked.vdouble(40, -3.15,3.15), + ResParameters = cms.untracked.vdouble(25, -0.15, 0.15), + DrParameters = cms.untracked.vdouble(25, 0.0, 0.05), + + # Use Pt Parameters to set bin edges + + PtParameters = cms.untracked.vdouble(0.0, 2.0, 4.0, + 6.0, 8.0, 10.0, + 12.0, 14.0, 16.0, + 18.0, 20.0, + 25.0, 30.0, 35.0, 40.0, + 50.0, 60.0, 70, 80, 90, 100.0, + 125.0, 150.0, 175.0, 200.0, + 400.0), + + Z0Parameters = cms.untracked.vdouble(25, -25, 25), + D0Parameters = cms.untracked.vdouble(25, -1, 1), + + # valid match types are dr and cosmic diff --git a/trunk/DQMOffline/Trigger/python/TopTrigRateAnalyzer_cosmics_cfi.py b/trunk/DQMOffline/Trigger/python/TopTrigRateAnalyzer_cosmics_cfi.py index bf4d3d02d9632..b19243309093f 100644 --- a/trunk/DQMOffline/Trigger/python/TopTrigRateAnalyzer_cosmics_cfi.py +++ b/trunk/DQMOffline/Trigger/python/TopTrigRateAnalyzer_cosmics_cfi.py @@ -68,13 +68,25 @@ # Set the ranges and numbers of bins for histograms # max pt is not very useful - MaxPtParameters = cms.vdouble(40,0.,80.), - # PtParmeters is not currently used - PtParameters = cms.vdouble(50,0.,80.), - EtaParameters = cms.vdouble(50, -3.5,3.5), - PhiParameters = cms.vdouble(50, -3.15,3.15), - ResParameters = cms.vdouble(50, -0.15, 0.15), - DrParameters = cms.vdouble(50, 0.0, 0.05), + EtaParameters = cms.untracked.vdouble(40, -2.1,2.1), + PhiParameters = cms.untracked.vdouble(40, -3.15,3.15), + ResParameters = cms.untracked.vdouble(25, -0.15, 0.15), + DrParameters = cms.untracked.vdouble(25, 0.0, 0.05), + + # Use Pt Parameters to set bin edges + + PtParameters = cms.untracked.vdouble(0.0, 2.0, 4.0, + 6.0, 8.0, 10.0, + 12.0, 14.0, 16.0, + 18.0, 20.0, + 25.0, 30.0, 35.0, 40.0, + 50.0, 60.0, 70, 80, 90, 100.0, + 125.0, 150.0, 175.0, 200.0, + 400.0), + + Z0Parameters = cms.untracked.vdouble(25, -50, 50), + D0Parameters = cms.untracked.vdouble(25, -25, 25), + # valid match types are dr and cosmic @@ -86,10 +98,8 @@ # you will ignore the delta R cuts L1DrCut = cms.untracked.double(0.4), - L2DrCut = cms.untracked.double(0.25), - L3DrCut = cms.untracked.double(0.025), - - + L2DrCut = cms.untracked.double(0.4), + L3DrCut = cms.untracked.double(0.4), DQMStore = cms.untracked.bool(True), # still used by overlap analyzer diff --git a/trunk/DQMOffline/Trigger/src/DQMOfflineMuonTrigAnalyzer.cc b/trunk/DQMOffline/Trigger/src/DQMOfflineMuonTrigAnalyzer.cc index 5e0a73b09eedc..7c803dbf70a2e 100755 --- a/trunk/DQMOffline/Trigger/src/DQMOfflineMuonTrigAnalyzer.cc +++ b/trunk/DQMOffline/Trigger/src/DQMOfflineMuonTrigAnalyzer.cc @@ -11,9 +11,8 @@ */ // -// Original Author: Muriel Vander Donckt -// Created: Tue Jul 24 12:17:12 CEST 2007 -// $Id: DQMOfflineMuonTrigAnalyzer.cc,v 1.9 2009/08/14 13:29:08 slaunwhj Exp $ +// Jason Slaunwhite, based on code from Jeff Klukas +// $Id: DQMOfflineMuonTrigAnalyzer.cc,v 1.10 2009/08/25 10:03:15 slaunwhj Exp $ // // @@ -52,6 +51,7 @@ class OfflineDQMMuonTrigAnalyzer : public edm::EDAnalyzer { private: virtual void beginJob() ; virtual void analyze(const edm::Event&, const edm::EventSetup&); + virtual void endRun (const edm::Run& r, const edm::EventSetup& c); virtual void endJob() ; int theNumberOfTriggers; @@ -300,6 +300,23 @@ OfflineDQMMuonTrigAnalyzer::beginJob() //theOverlapAnalyzer ->begin(); } +void +OfflineDQMMuonTrigAnalyzer::endRun ( const edm::Run& theRun, const edm::EventSetup& theEventSetup) { + + LogTrace ("HLTMuonVal") + << "Inside OfflineDQMMuonTrigAnalyzer endRun()" << endl; + + + vector::iterator thisAnalyzer; + for ( thisAnalyzer = theTriggerAnalyzers.begin(); + thisAnalyzer != theTriggerAnalyzers.end(); + ++thisAnalyzer ) + { + (*thisAnalyzer)->endRun(theRun, theEventSetup); + } + +} + void diff --git a/trunk/DQMOffline/Trigger/src/HLTMuonBPAG.cc b/trunk/DQMOffline/Trigger/src/HLTMuonBPAG.cc index b41ab47e95f72..5fc931ef3bc1c 100644 --- a/trunk/DQMOffline/Trigger/src/HLTMuonBPAG.cc +++ b/trunk/DQMOffline/Trigger/src/HLTMuonBPAG.cc @@ -7,8 +7,8 @@ * 2. A trigger name * * $Author: slaunwhj $ - * $Date: 2009/08/28 13:07:44 $ - * $Revision: 1.2 $ + * $Date: 2009/09/24 12:03:45 $ + * $Revision: 1.3 $ */ @@ -568,6 +568,8 @@ MonitorElement* HLTMuonBPAG::book2DVarBins (TString name, TString title, int nBi TH2F *tempHist = new TH2F(name, title, nBinsX, xBinLowEdges, nBinsY, yMin, yMax); tempHist->Sumw2(); - return dbe_->book2D(name.Data(), tempHist); + MonitorElement * returnedME = dbe_->book2D(name.Data(), tempHist); + delete tempHist; + return returnedME; } diff --git a/trunk/DQMOffline/Trigger/src/HLTMuonMatchAndPlot.cc b/trunk/DQMOffline/Trigger/src/HLTMuonMatchAndPlot.cc index 628d1d0eb8d08..a2c3d1d729418 100644 --- a/trunk/DQMOffline/Trigger/src/HLTMuonMatchAndPlot.cc +++ b/trunk/DQMOffline/Trigger/src/HLTMuonMatchAndPlot.cc @@ -7,8 +7,8 @@ * 2. A trigger name * * $Author: slaunwhj $ - * $Date: 2009/08/14 13:29:09 $ - * $Revision: 1.7 $ + * $Date: 2009/08/25 10:03:16 $ + * $Revision: 1.8 $ */ @@ -203,102 +203,149 @@ HLTMuonMatchAndPlot::HLTMuonMatchAndPlot //useMuonFromGenerator = false; // = ( theGenLabel == "" ) ? false : true; useMuonFromReco = true; // = ( theRecoLabel == "" ) ? false : true; - theMaxPtParameters = pset.getParameter< vector >("MaxPtParameters"); - theEtaParameters = pset.getParameter< vector >("EtaParameters"); - thePhiParameters = pset.getParameter< vector >("PhiParameters"); + //define default parameters so that you don't crash - theResParameters = pset.getParameter < vector >("ResParameters"); + vector etaDefault; + etaDefault.push_back(15); + etaDefault.push_back(-2.1); + etaDefault.push_back(2.1); + + theEtaParameters = pset.getUntrackedParameter< vector >("EtaParameters", etaDefault); + + vector phiDefault; + phiDefault.push_back(15); + phiDefault.push_back(-3.2); + phiDefault.push_back(3.2); + + thePhiParameters = pset.getUntrackedParameter< vector >("PhiParameters", phiDefault); + + // leave this vector of size 0 + vector ptDefault; // pt parameters are a different story // it's a vector of doubles but it unpacked // as bin low edges - thePtParameters = pset.getParameter< vector >("PtParameters"); + thePtParameters = pset.getUntrackedParameter< vector >("PtParameters", ptDefault); + + + vector resDefault; + resDefault.push_back(10); + resDefault.push_back(-0.1); + resDefault.push_back(0.1); + theResParameters = pset.getUntrackedParameter < vector >("ResParameters", resDefault); + + vector d0Default; + d0Default.push_back(10); + d0Default.push_back(-2.0); + d0Default.push_back(2.0); + + theD0Parameters = pset.getUntrackedParameter > ("D0Parameters", d0Default); + + vector z0Default; + z0Default.push_back(10); + z0Default.push_back(-25); + z0Default.push_back(25); + theZ0Parameters = pset.getUntrackedParameter < vector > ("Z0Parameters", z0Default); + + int numPtBinEdge = 0; if ( thePtParameters.size() > 100) { LogInfo ("HLTMuonVal") << "Warning!!! You specified a list of pt bin edges that is > 100 bins" << "This is too many bins!! Truncating the list!!! " << endl; numPtBinEdge = 100; + } else if (thePtParameters.size() < 1) { + + numPtBinEdge = 5; + numBinsInPtHisto = numPtBinEdge - 1; + ptBins[0] = 0; + ptBins[1] = 20; + ptBins[2] = 50; + ptBins[3] = 100; + ptBins[4] = 150; + } else { numPtBinEdge = thePtParameters.size(); - } - - // the number of bins in the histo is one - // less than the number of edges - numBinsInPtHisto = numPtBinEdge - 1; + // the number of bins in the histo is one + // less than the number of edges + numBinsInPtHisto = numPtBinEdge - 1; - for (int iBin = 0; iBin < numPtBinEdge; iBin++){ - ptBins[iBin] = (float) thePtParameters[iBin]; + for (int iBin = 0; iBin < numPtBinEdge; iBin++){ + ptBins[iBin] = (float) thePtParameters[iBin]; + //LogTrace ("HLTMuonVal") << the + } + } + // Duplicate the pt parameters for some 2D histos - for(int i =0; i < 2; i++){ - for (std::vector::const_iterator iNum = theMaxPtParameters.begin(); - iNum != theMaxPtParameters.end(); - iNum++){ +// for(int i =0; i < 2; i++){ +// for (std::vector::const_iterator iNum = theMaxPtParameters.begin(); +// iNum != theMaxPtParameters.end(); +// iNum++){ - // if this is the # of bins, then - // halve the number of bins. - if (iNum == theMaxPtParameters.begin()){ - theMaxPtParameters2d.push_back(floor((*iNum)/2)); - } else { - theMaxPtParameters2d.push_back((*iNum)); - } - } - } - - // Duplicate the pt parameters for some 2D histos - for(int i =0; i < 2; i++){ - for (std::vector::const_iterator iNum = theEtaParameters.begin(); - iNum != theEtaParameters.end(); - iNum++){ - // if this is the nBins param, halve it - if (iNum == theEtaParameters.begin()){ - theEtaParameters2d.push_back(floor((*iNum)/2)); - } else { - theEtaParameters2d.push_back(*iNum); - } +// // if this is the # of bins, then +// // halve the number of bins. +// if (iNum == theMaxPtParameters.begin()){ +// theMaxPtParameters2d.push_back(floor((*iNum)/2)); +// } else { +// theMaxPtParameters2d.push_back((*iNum)); +// } +// } +// } + +// // Duplicate the eta parameters for some 2D histos +// for(int i =0; i < 2; i++){ +// for (std::vector::const_iterator iNum = theEtaParameters.begin(); +// iNum != theEtaParameters.end(); +// iNum++){ +// // if this is the nBins param, halve it +// if (iNum == theEtaParameters.begin()){ +// theEtaParameters2d.push_back(floor((*iNum)/2)); +// } else { +// theEtaParameters2d.push_back(*iNum); +// } - // also fill the eta/phi plot parameters - // but don't worry about doubleing bins - // if (i < 1){ - // if (iNum == theEtaParameters.begin()){ - // thePhiEtaParameters2d.push_back(floor((*iNum)/2)); - // } else { - // thePhiEtaParameters2d.push_back(*iNum); +// // also fill the eta/phi plot parameters +// // but don't worry about doubleing bins +// // if (i < 1){ +// // if (iNum == theEtaParameters.begin()){ +// // thePhiEtaParameters2d.push_back(floor((*iNum)/2)); +// // } else { +// // thePhiEtaParameters2d.push_back(*iNum); - // } +// // } - // } - } - } - - // Duplicate the pt parameters for some 2D histos - for(int i =0; i < 2; i++){ - for (std::vector::const_iterator iNum = thePhiParameters.begin(); - iNum != thePhiParameters.end(); - iNum++){ - - if (iNum == thePhiParameters.begin()) { - thePhiParameters2d.push_back(floor((*iNum)/2)); - } else { - thePhiParameters2d.push_back(*iNum); - } - - // if (i < 1){ +// // } +// } +// } + +// // Duplicate the pt parameters for some 2D histos +// for(int i =0; i < 2; i++){ +// for (std::vector::const_iterator iNum = thePhiParameters.begin(); +// iNum != thePhiParameters.end(); +// iNum++){ + +// if (iNum == thePhiParameters.begin()) { +// thePhiParameters2d.push_back(floor((*iNum)/2)); +// } else { +// thePhiParameters2d.push_back(*iNum); +// } + +// // if (i < 1){ - // // if (iNum == theEtaParameters.begin()){ - // // thePhiEtaParameters2d.push_back(floor((*iNum)/2)); - // // } else { - // // thePhiEtaParameters2d.push_back(*iNum); +// // // if (iNum == theEtaParameters.begin()){ +// // // thePhiEtaParameters2d.push_back(floor((*iNum)/2)); +// // // } else { +// // // thePhiEtaParameters2d.push_back(*iNum); - // // } +// // // } - // } - } - } +// // } +// } +// } @@ -306,9 +353,9 @@ HLTMuonMatchAndPlot::HLTMuonMatchAndPlot - theL1DrCut = pset.getUntrackedParameter("L1DrCut"); - theL2DrCut = pset.getUntrackedParameter("L2DrCut"); - theL3DrCut = pset.getUntrackedParameter("L3DrCut"); + theL1DrCut = pset.getUntrackedParameter("L1DrCut", 0.4); + theL2DrCut = pset.getUntrackedParameter("L2DrCut", 0.1); + theL3DrCut = pset.getUntrackedParameter("L3DrCut", 0.05); //========================================== @@ -327,13 +374,13 @@ HLTMuonMatchAndPlot::HLTMuonMatchAndPlot thePhiEtaParameters2d.push_back(3.5); - theD0Parameters.push_back(25); - theD0Parameters.push_back(-50.0); - theD0Parameters.push_back(50.0); + // theD0Parameters.push_back(25); + // theD0Parameters.push_back(-50.0); + // theD0Parameters.push_back(50.0); - theZ0Parameters.push_back(25); - theZ0Parameters.push_back(-100); - theZ0Parameters.push_back(100); + // theZ0Parameters.push_back(25); + // theZ0Parameters.push_back(-100); + // theZ0Parameters.push_back(100); theChargeParameters.push_back(3); theChargeParameters.push_back(-1.5); @@ -344,12 +391,11 @@ HLTMuonMatchAndPlot::HLTMuonMatchAndPlot theDRParameters.push_back(theL3DrCut); theChargeFlipParameters.push_back(2); - theChargeFlipParameters.push_back(-0.5); - theChargeFlipParameters.push_back(1.5); + theChargeFlipParameters.push_back(-1.0); + theChargeFlipParameters.push_back(1.0); theChargeFlipParameters.push_back(2); - theChargeFlipParameters.push_back(-0.5); - theChargeFlipParameters.push_back(1.5); - + theChargeFlipParameters.push_back(-1.0); + theChargeFlipParameters.push_back(1.0); theIsolationParameters.push_back(25); theIsolationParameters.push_back(0.0); @@ -359,26 +405,26 @@ HLTMuonMatchAndPlot::HLTMuonMatchAndPlot thePhiParameters0Pi.push_back(0); thePhiParameters0Pi.push_back(3.2); - theDeltaPhiVsPhiParameters.push_back(50); - theDeltaPhiVsPhiParameters.push_back(-3.15); - theDeltaPhiVsPhiParameters.push_back(3.15); - theDeltaPhiVsPhiParameters.push_back(50); - theDeltaPhiVsPhiParameters.push_back(0); - theDeltaPhiVsPhiParameters.push_back(3.2); - - theDeltaPhiVsZ0Parameters.push_back(theZ0Parameters[0]); - theDeltaPhiVsZ0Parameters.push_back(theZ0Parameters[1]); - theDeltaPhiVsZ0Parameters.push_back(theZ0Parameters[2]); - theDeltaPhiVsZ0Parameters.push_back(50); - theDeltaPhiVsZ0Parameters.push_back(0); - theDeltaPhiVsZ0Parameters.push_back(3.2); - - theDeltaPhiVsD0Parameters.push_back(theD0Parameters[0]); - theDeltaPhiVsD0Parameters.push_back(theD0Parameters[1]); - theDeltaPhiVsD0Parameters.push_back(theD0Parameters[2]); - theDeltaPhiVsD0Parameters.push_back(50); - theDeltaPhiVsD0Parameters.push_back(0); - theDeltaPhiVsD0Parameters.push_back(3.2); + // theDeltaPhiVsPhiParameters.push_back(50); + // theDeltaPhiVsPhiParameters.push_back(-3.15); + // theDeltaPhiVsPhiParameters.push_back(3.15); + // theDeltaPhiVsPhiParameters.push_back(50); + // theDeltaPhiVsPhiParameters.push_back(0); + // theDeltaPhiVsPhiParameters.push_back(3.2); + +// theDeltaPhiVsZ0Parameters.push_back(theZ0Parameters[0]); +// theDeltaPhiVsZ0Parameters.push_back(theZ0Parameters[1]); +// theDeltaPhiVsZ0Parameters.push_back(theZ0Parameters[2]); +// theDeltaPhiVsZ0Parameters.push_back(50); +// theDeltaPhiVsZ0Parameters.push_back(0); +// theDeltaPhiVsZ0Parameters.push_back(3.2); + +// theDeltaPhiVsD0Parameters.push_back(theD0Parameters[0]); +// theDeltaPhiVsD0Parameters.push_back(theD0Parameters[1]); +// theDeltaPhiVsD0Parameters.push_back(theD0Parameters[2]); +// theDeltaPhiVsD0Parameters.push_back(50); +// theDeltaPhiVsD0Parameters.push_back(0); +// theDeltaPhiVsD0Parameters.push_back(3.2); @@ -406,17 +452,42 @@ HLTMuonMatchAndPlot::HLTMuonMatchAndPlot +void HLTMuonMatchAndPlot::endRun (const edm::Run& r, const edm::EventSetup& c) +{ + + LogTrace ("HLTMuonVal") << "\n\nInside HLTMuonMatchAndPlot endRun()"; + + // loop over all the histograms we booked, and handle the overflow bins + + // do this at end run, since you want to be sure you did it before you + // saved your ME's. + + vector::iterator iMonitorEl; + + for ( iMonitorEl = booked1DMonitorElements.begin(); + iMonitorEl != booked1DMonitorElements.end(); + iMonitorEl++ ) { + + moveOverflow((*iMonitorEl)); + + } + + +} + + void HLTMuonMatchAndPlot::finish() { - LogTrace ("HLTMuonVal") << "\n\nInside HLTMuonMatchAndPlot finish()"; + LogTrace ("HLTMuonVal") << "\n\nInside HLTMuonMatchAndPlot finish()" << endl; + if (createStandAloneHistos && histoFileName != "") { dbe_->save(histoFileName); } + } - void HLTMuonMatchAndPlot::analyze( const Event & iEvent ) { @@ -1949,9 +2020,9 @@ void HLTMuonMatchAndPlot::begin() // 0 = MaxPt_All - hPassMaxPtRec.push_back( bookIt( "recPassMaxPt_All", "pt of Leading Reco Muon" , theMaxPtParameters) ); + hPassMaxPtRec.push_back( bookIt( "recPassMaxPt_All", "pt of Leading Reco Muon" , numBinsInPtHisto, ptBins) ); // 1 = MaxPt if matched to L1 Trigger - if (useFullDebugInformation || isL1Path) hPassMaxPtRec.push_back( bookIt( "recPassMaxPt_" + myLabel, "pt of Leading Reco Muon, if matched to " + myLabel, theMaxPtParameters) ); + if (useFullDebugInformation || isL1Path) hPassMaxPtRec.push_back( bookIt( "recPassMaxPt_" + myLabel, "pt of Leading Reco Muon, if matched to " + myLabel, numBinsInPtHisto, ptBins) ); hPassEtaRec.push_back( bookIt( "recPassEta_All", "#eta of Reco Muons", theEtaParameters) ); if (useFullDebugInformation || isL1Path) hPassEtaRec.push_back( bookIt( "recPassEta_" + myLabel, "#eta of Reco Muons matched to " + myLabel, theEtaParameters) ); @@ -1961,14 +2032,14 @@ void HLTMuonMatchAndPlot::begin() - hPassPtRec.push_back( bookIt( "recPassPt_All", "Pt of Reco Muon" , theMaxPtParameters) ); - if (useFullDebugInformation || isL1Path) hPassPtRec.push_back( bookIt( "recPassPt_" + myLabel, "pt Reco Muon, if matched to " + myLabel, theMaxPtParameters) ); + hPassPtRec.push_back( bookIt( "recPassPt_All", "Pt of Reco Muon" , numBinsInPtHisto, ptBins) ); + if (useFullDebugInformation || isL1Path) hPassPtRec.push_back( bookIt( "recPassPt_" + myLabel, "pt Reco Muon, if matched to " + myLabel, numBinsInPtHisto, ptBins) ); - hPassPtRecExactlyOne.push_back( bookIt( "recPassPtExactlyOne_All", "pt of Leading Reco Muon (==1 muon)" , theMaxPtParameters) ); - if (useFullDebugInformation || isL1Path) hPassPtRecExactlyOne.push_back( bookIt( "recPassPtExactlyOne_" + myLabel, "pt of Leading Reco Muon (==1 muon), if matched to " + myLabel, theMaxPtParameters) ); + hPassPtRecExactlyOne.push_back( bookIt( "recPassPtExactlyOne_All", "pt of Leading Reco Muon (==1 muon)" , numBinsInPtHisto, ptBins) ); + if (useFullDebugInformation || isL1Path) hPassPtRecExactlyOne.push_back( bookIt( "recPassPtExactlyOne_" + myLabel, "pt of Leading Reco Muon (==1 muon), if matched to " + myLabel, numBinsInPtHisto, ptBins) ); - hPassExaclyOneMuonMaxPtRec.push_back( bookIt("recPassExactlyOneMuonMaxPt_All", "pt of Leading Reco Muon in events with exactly one muon" , theMaxPtParameters) ); - if (useFullDebugInformation || isL1Path) hPassExaclyOneMuonMaxPtRec.push_back( bookIt("recPassExactlyOneMuonMaxPt_" + myLabel, "pt of Leading Reco Muon in events with exactly one muon match to " + myLabel , theMaxPtParameters) ); + hPassExaclyOneMuonMaxPtRec.push_back( bookIt("recPassExactlyOneMuonMaxPt_All", "pt of Leading Reco Muon in events with exactly one muon" , numBinsInPtHisto, ptBins) ); + if (useFullDebugInformation || isL1Path) hPassExaclyOneMuonMaxPtRec.push_back( bookIt("recPassExactlyOneMuonMaxPt_" + myLabel, "pt of Leading Reco Muon in events with exactly one muon match to " + myLabel , numBinsInPtHisto, ptBins) ); hPassD0Rec.push_back( bookIt("recPassD0_All", "Track 2-D impact parameter wrt (0,0,0)(d0) ALL", theD0Parameters)); if (useFullDebugInformation || isL1Path) hPassD0Rec.push_back( bookIt("recPassD0_" + myLabel, "Track 2-D impact parameter (0,0,0)(d0) " + myLabel, theD0Parameters)); @@ -2002,7 +2073,7 @@ void HLTMuonMatchAndPlot::begin() // hChargeFlipMatched.push_back ( bookIt("recChargeFlipMatched_All" , "Charge Flip from hlt to RECO;HLT;Reco", theChargeFlipParameters)); if (useFullDebugInformation || isL1Path) hChargeFlipMatched.push_back ( bookIt("recChargeFlipMatched_" + myLabel, "Charge Flip from hlt to RECO;HLT Charge (-,+);Reco (-,+)", theChargeFlipParameters)); - if (useFullDebugInformation || isL1Path) hPassMatchPtRec.push_back( bookIt( "recPassMatchPt_" + myLabel, "Pt of Reco Muon that is matched to Trigger Muon " + myLabel, theMaxPtParameters) ); + if (useFullDebugInformation || isL1Path) hPassMatchPtRec.push_back( bookIt( "recPassMatchPt_" + myLabel, "Pt of Reco Muon that is matched to Trigger Muon " + myLabel, numBinsInPtHisto, ptBins) ); //hPtMatchVsPtRec.push_back (bookIt("recPtVsMatchPt" + myLabel, "Reco Pt vs Matched HLT Muon Pt" + myLabel , theMaxPtParameters2d) ); //hEtaMatchVsEtaRec.push_back( bookIt( "recEtaVsMatchEta_" + myLabel, "Reco #eta vs HLT #eta " + myLabel, theEtaParameters2d) ); //hPhiMatchVsPhiRec.push_back( bookIt( "recPhiVsMatchPhi_" + myLabel, "Reco #phi vs HLT #phi " + myLabel, thePhiParameters2d) ); @@ -2022,8 +2093,8 @@ void HLTMuonMatchAndPlot::begin() //////////////////////////////////////////////// if (useFullDebugInformation) { - rawMatchHltCandPt.push_back( bookIt( "rawPassPt_All", "Pt of Reco Muon" , theMaxPtParameters) ); - rawMatchHltCandPt.push_back( bookIt( "rawPassPt_" + myLabel, "pt Reco Muon, if matched to " + myLabel, theMaxPtParameters) ); + rawMatchHltCandPt.push_back( bookIt( "rawPassPt_All", "Pt of Reco Muon" , numBinsInPtHisto, ptBins) ); + rawMatchHltCandPt.push_back( bookIt( "rawPassPt_" + myLabel, "pt Reco Muon, if matched to " + myLabel, numBinsInPtHisto, ptBins) ); rawMatchHltCandEta.push_back( bookIt( "rawPassEta_All", "#eta of Reco Muons", theEtaParameters) ); rawMatchHltCandEta.push_back( bookIt( "rawPassEta_" + myLabel, "#eta of Reco Muons matched to " + myLabel, theEtaParameters) ); @@ -2059,14 +2130,14 @@ void HLTMuonMatchAndPlot::begin() if ( useMuonFromReco ) { // These histos have All, L1, L2, L3 - hPassMaxPtRec.push_back( bookIt( "recPassMaxPt_" + myLabel, "pt of Leading Reco Muon, if matched to " + myLabel, theMaxPtParameters) ); + hPassMaxPtRec.push_back( bookIt( "recPassMaxPt_" + myLabel, "pt of Leading Reco Muon, if matched to " + myLabel, numBinsInPtHisto, ptBins) ); hPassEtaRec.push_back( bookIt( "recPassEta_" + myLabel, "#eta of Reco Muons matched to " + myLabel, theEtaParameters) ); hPassPhiRec.push_back( bookIt( "recPassPhi_" + myLabel, "#phi of Reco Muons matched to " + myLabel, thePhiParameters) ); - hPassPtRec.push_back ( bookIt( "recPassPt_" + myLabel, "Pt of Reco Muon, if matched to " + myLabel, theMaxPtParameters) ); - hPassPtRecExactlyOne.push_back (bookIt( "recPassPtExactlyOne__" + myLabel, "pt of Leading Reco Muon (==1 muon), if matched to " + myLabel, theMaxPtParameters) ); + hPassPtRec.push_back ( bookIt( "recPassPt_" + myLabel, "Pt of Reco Muon, if matched to " + myLabel, numBinsInPtHisto, ptBins) ); + hPassPtRecExactlyOne.push_back (bookIt( "recPassPtExactlyOne__" + myLabel, "pt of Leading Reco Muon (==1 muon), if matched to " + myLabel, numBinsInPtHisto, ptBins) ); - hPassExaclyOneMuonMaxPtRec.push_back( bookIt("recPassExactlyOneMuonMaxPt_" + myLabel, "pt of Leading Reco Muon in events with exactly one muon match to " + myLabel , theMaxPtParameters) ); + hPassExaclyOneMuonMaxPtRec.push_back( bookIt("recPassExactlyOneMuonMaxPt_" + myLabel, "pt of Leading Reco Muon in events with exactly one muon match to " + myLabel , numBinsInPtHisto, ptBins) ); hPhiVsEtaRec.push_back ( bookIt ("recPhiVsRecEta_" + myLabel, "Reco #phi vs Reco #eta " +myLabel, thePhiEtaParameters2d)); @@ -2079,7 +2150,7 @@ void HLTMuonMatchAndPlot::begin() hIsolationRec.push_back ( bookIt("recPassIsolation_" + myLabel, "Muon Isolation cone 0.3 " + myLabel, theIsolationParameters)); // Match histos only have numHltLabels indices - hPassMatchPtRec.push_back( bookIt( "recPassMatchPt_" + myLabel, "Pt of Reco Muon that is matched to Trigger Muon " + myLabel, theMaxPtParameters) ); + hPassMatchPtRec.push_back( bookIt( "recPassMatchPt_" + myLabel, "Pt of Reco Muon that is matched to Trigger Muon " + myLabel, numBinsInPtHisto, ptBins) ); //hPtMatchVsPtRec.push_back (bookIt("recPtVsMatchPt" + myLabel, "Reco Pt vs Matched HLT Muon Pt" + myLabel , theMaxPtParameters2d) ); //hEtaMatchVsEtaRec.push_back( bookIt( "recEtaVsMatchEta_" + myLabel, "Reco #eta vs HLT #eta " + myLabel, theEtaParameters2d) ); @@ -2101,11 +2172,11 @@ void HLTMuonMatchAndPlot::begin() // these candidates are indexed by the number // of hlt labels - allHltCandPt.push_back( bookIt("allHltCandPt_" + myLabel, "Pt of all HLT Muon Cands, for HLT " + myLabel, theMaxPtParameters)); + allHltCandPt.push_back( bookIt("allHltCandPt_" + myLabel, "Pt of all HLT Muon Cands, for HLT " + myLabel, numBinsInPtHisto, ptBins)); allHltCandEta.push_back( bookIt("allHltCandEta_" + myLabel, "Eta of all HLT Muon Cands, for HLT " + myLabel, theEtaParameters)); allHltCandPhi.push_back( bookIt("allHltCandPhi_" + myLabel, "Phi of all HLT Muon Cands, for HLT " + myLabel, thePhiParameters)); - fakeHltCandPt.push_back( bookIt("fakeHltCandPt_" + myLabel, "Pt of fake HLT Muon Cands, for HLT " + myLabel, theMaxPtParameters)); + fakeHltCandPt.push_back( bookIt("fakeHltCandPt_" + myLabel, "Pt of fake HLT Muon Cands, for HLT " + myLabel, numBinsInPtHisto, ptBins)); fakeHltCandEta.push_back( bookIt("fakeHltCandEta_" + myLabel, "Eta of fake HLT Muon Cands, for HLT " + myLabel, theEtaParameters)); fakeHltCandPhi.push_back( bookIt("fakeHltCandPhi_" + myLabel, "Phi of fake HLT Muon Cands, for HLT " + myLabel, thePhiParameters)); @@ -2114,7 +2185,7 @@ void HLTMuonMatchAndPlot::begin() // raw histograms if (useFullDebugInformation) { - rawMatchHltCandPt.push_back( bookIt( "rawPassPt_" + myLabel, "pt Reco Muon, if matched to " + myLabel, theMaxPtParameters) ); + rawMatchHltCandPt.push_back( bookIt( "rawPassPt_" + myLabel, "pt Reco Muon, if matched to " + myLabel, numBinsInPtHisto, ptBins) ); rawMatchHltCandEta.push_back( bookIt( "rawPassEta_" + myLabel, "#eta of Reco Muons matched to " + myLabel, theEtaParameters) ); rawMatchHltCandPhi.push_back( bookIt( "rawPassPhi_" + myLabel, "#phi of Reco Muons matched to " + myLabel, thePhiParameters) ); } @@ -2140,8 +2211,10 @@ MonitorElement* HLTMuonMatchAndPlot::bookIt if (parameters.size() == 3) { TH1F *h = new TH1F( name, title, nBins, min, max ); h->Sumw2(); - return dbe_->book1D( name.Data(), h ); + MonitorElement * returnedME = dbe_->book1D( name.Data(), h ); delete h; + booked1DMonitorElements.push_back(returnedME); + return returnedME; // this is the case for a 2D hist } else if (parameters.size() == 6) { @@ -2152,8 +2225,9 @@ MonitorElement* HLTMuonMatchAndPlot::bookIt TH2F *h = new TH2F (name, title, nBins, min, max, nBins2, min2, max2); h->Sumw2(); - return dbe_->book2D (name.Data(), h); - delete h; + MonitorElement * returnedME = dbe_->book2D (name.Data(), h); + delete h; + return returnedME; } else { LogInfo ("HLTMuonVal") << "Directory" << dbe_->pwd() << " Name " @@ -2171,7 +2245,11 @@ MonitorElement* HLTMuonMatchAndPlot::bookIt TH1F *tempHist = new TH1F(name, title, nbins, xBinLowEdges); tempHist->Sumw2(); - return dbe_->book1D(name.Data(), tempHist); + MonitorElement * returnedME = dbe_->book1D(name.Data(), tempHist); + delete tempHist; + + booked1DMonitorElements.push_back(returnedME); + return returnedME; } @@ -2211,3 +2289,32 @@ TString HLTMuonMatchAndPlot::calcHistoSuffix (string moduleName) { return myLabel; } + +void HLTMuonMatchAndPlot::moveOverflow (MonitorElement * myElement) { + + LogTrace ("HLTMuonVal") << "MOVEOVERFLOW" << endl; + + + // This will handle an arbitrary dimension first/last bin + // but you should think about how you will interpret this for + // 2D/3D histos + // Actually, this can't handle abitrary dimensions. + int maxBin = myElement->getNbinsX(); + + + LogTrace ("HLTMuonVal") << "==MOVEOVERFLOW== " + << "maxBin = " << maxBin + << ", calling underflow" + << endl; + + myElement->setBinContent(1, myElement->getBinContent(0) + myElement->getBinContent(1)); + + LogTrace ("HLTMuonVal") << "reseting underflow to zero" << endl; + myElement->setBinContent(0,0.0); + LogTrace ("HLTMuonVal") << "calling overflow" << endl; + myElement->setBinContent(maxBin,myElement->getBinContent(maxBin) + myElement->getBinContent(maxBin+1)); + LogTrace ("HLTMuonVal") << "seting overflow to zero" << endl; + myElement->setBinContent(maxBin+1,0.0); + + +} diff --git a/trunk/DQMOffline/Trigger/src/TopTrigAnalyzer.cc b/trunk/DQMOffline/Trigger/src/TopTrigAnalyzer.cc index b7cd43df39a54..41ba0b6657033 100755 --- a/trunk/DQMOffline/Trigger/src/TopTrigAnalyzer.cc +++ b/trunk/DQMOffline/Trigger/src/TopTrigAnalyzer.cc @@ -13,7 +13,7 @@ // // Original Author: Muriel Vander Donckt // Created: Tue Jul 24 12:17:12 CEST 2007 -// $Id: DQMOfflineMuonTrigAnalyzer.cc,v 1.6 2009/05/22 09:07:41 slaunwhj Exp $ +// $Id: TopTrigAnalyzer.cc,v 1.1 2009/08/14 13:34:12 slaunwhj Exp $ // // @@ -55,6 +55,7 @@ class TopTrigAnalyzer : public edm::EDAnalyzer { virtual void analyze(const edm::Event&, const edm::EventSetup&); virtual void endJob() ; + virtual void endRun (const edm::Run& r, const edm::EventSetup& c); int theNumberOfTriggers; std::vector theTriggerAnalyzers; @@ -325,6 +326,21 @@ TopTrigAnalyzer::beginJob() //theOverlapAnalyzer ->begin(); } +void +TopTrigAnalyzer::endRun( const edm::Run& theRun, const edm::EventSetup& theEventSetup ) { + vector::iterator thisAnalyzer; + //unsigned iAna = 0; + + LogTrace ("HLTMuonVal") << "Inside end job, looping over analyzers" + << endl; + for ( thisAnalyzer = theTopPlotters.begin(); + thisAnalyzer != theTopPlotters.end(); + ++thisAnalyzer ) + { + (*thisAnalyzer)->endRun(theRun, theEventSetup); + } + //theOverlapAnalyzer ->finish(); +} void