Skip to content

Commit

Permalink
Merge pull request cms-sw#1827 from joaopela/CMSSW_7_0_X_L1TDQM
Browse files Browse the repository at this point in the history
DQM -- Update of L1T DQMOffline code and Validation
  • Loading branch information
ktf committed Dec 19, 2013
2 parents 9a55682 + c759490 commit 3c5511b
Show file tree
Hide file tree
Showing 39 changed files with 1,378 additions and 287 deletions.
Empty file.
2 changes: 1 addition & 1 deletion DQMOffline/L1Trigger/interface/L1TBeamConfiguration.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef DQMOffline_L1Trigger_L1TBeamConfiguration_h
#define DQMOffline_L1Trigger_L1TBeamConfiguration_h

/*
/**
* \class L1TBeamConfiguration
*
*
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/L1Trigger/interface/L1TEfficiencyEG_Offline.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef DQMOFFLINE_L1TRIGGER_L1TEFFICIENCYEG_OFFLINE_H
#define DQMOFFLINE_L1TRIGGER_L1TEFFICIENCYEG_OFFLINE_H

/*
/**
* \file L1TEfficiencyEG.h
*
* \author J. Pela
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/L1Trigger/interface/L1TEfficiencyJets_Offline.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef DQMOFFLINE_L1TRIGGER_L1TEFFICIENCYJETS_OFFLINE_H
#define DQMOFFLINE_L1TRIGGER_L1TEFFICIENCYJETS_OFFLINE_H

/*
/**
* \file L1TEfficiencyJets.h
*
* \author J. Pela
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef DQMOFFLINE_L1TRIGGER_L1TEFFICIENCYMUON_OFFLINE_H
#define DQMOFFLINE_L1TRIGGER_L1TEFFICIENCYMUON_OFFLINE_H

/*
/**
* \file L1TEfficiencyMuons.h
*
* \author J. Pela, C. Battilana
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/L1Trigger/interface/L1TEfficiency_Harvesting.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef DQMOFFLINE_L1TRIGGER_L1TEFFICIENCYHARVESTING_H
#define DQMOFFLINE_L1TRIGGER_L1TEFFICIENCYHARVESTING_H

/*
/**
* \file L1TEfficiencyHarvesting.h
*
* \author J. Pela, C. Battilana
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/L1Trigger/interface/L1TLSBlock.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef DQMOffline_L1Trigger_L1TLSBlock_h
#define DQMOffline_L1Trigger_L1TLSBlock_h

/*
/**
* \class L1TLSBlock
*
*
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/L1Trigger/interface/L1TMenuHelper.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef DQMOFFLINE_L1TRIGGER_L1TMENUHELPER_H
#define DQMOFFLINE_L1TRIGGER_L1TMENUHELPER_H

/*
/**
* \file L1TMenuHelper.h
*
* \author J. Pela
Expand Down
22 changes: 12 additions & 10 deletions DQMOffline/L1Trigger/interface/L1TRate_Harvest.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
#ifndef DQMOFFLINE_L1TRIGGER_L1TRATE_HARVEST_H
#define DQMOFFLINE_L1TRIGGER_L1TRATE_HARVEST_H

/*
* \file L1TRate_Harvest.h
*
* \author J. Pela
*
*/

// system include files
#include <memory>
#include <unistd.h>
Expand Down Expand Up @@ -53,7 +46,8 @@ class L1TRate_Harvest : public edm::EDAnalyzer {

protected:

void analyze (const edm::Event& e, const edm::EventSetup& c); // Analyze
void analyze (const edm::Event& e, const edm::EventSetup& c) {
}; // Analyze
void beginJob(); // BeginJob
void endJob (); // EndJob
void beginRun(const edm::Run& run, const edm::EventSetup& iSetup);
Expand All @@ -65,7 +59,7 @@ class L1TRate_Harvest : public edm::EDAnalyzer {
// Private methods
private:

bool getXSexFitsOMDS (const edm::ParameterSet& ps);
// bool getXSexFitsOMDS (const edm::ParameterSet& ps);
bool getXSexFitsPython(const edm::ParameterSet& ps);

// Private variables
Expand All @@ -90,12 +84,20 @@ class L1TRate_Harvest : public edm::EDAnalyzer {
std::map<int,double> m_lsLuminosity; // Map of luminosity recorded for each LS
std::map<int,std::map<TString,double> > m_lsRates; // Map of rates (by bit) recorded for each LS
std::map<TString,int> m_algoBit; // Map of bit associated with a L1 Algo alias
std::map<TString,TF1*> m_algoFit; // Map of bit associated with a L1 Algo alias
std::map<std::string,bool> m_inputCategories; // Map of categories to monitor
std::map<std::string,std::string> m_selectedTriggers; // Map of what trigger to monitor for each category
std::map<TString,MonitorElement*> m_xSecObservedToExpected; // Monitor Elements for Observed to Expected Algo XSec
std::map<TString,MonitorElement*> m_xSecVsInstLumi; // Monitor Elements for Algo XSec vs Instant Luminosity

std::map<TString,MonitorElement*> m_CountsVsLS; // Monitor Elements for
std::map<TString,MonitorElement*> m_InstLumiVsLS; // Monitor Elements for
std::map<TString,MonitorElement*> m_PrescIndexVsLS; // Monitor Elements for

std::map<TString,TF1*> m_templateFunctions; // For each trigger template f(InstLumi)=XSec


std::map<int,std::map<TString,double> > m_lsCounts; // Map of counts (by bit) recorded for each LS

// Input tags
edm::InputTag m_scalersSource; // Where to get L1 Scalers
edm::InputTag m_l1GtDataDaqInputTag; // Where to get L1 GT Data DAQ
Expand Down
29 changes: 16 additions & 13 deletions DQMOffline/L1Trigger/interface/L1TRate_Offline.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
#ifndef DQMOFFLINE_L1TRIGGER_L1TRATE_OFFLINE_H
#define DQMOFFLINE_L1TRIGGER_L1TRATE_OFFLINE_H

/*
* \file L1TRate_Offline.h
*
* \author J. Pela
*
*/

// system include files
#include <memory>
#include <unistd.h>
Expand Down Expand Up @@ -73,7 +66,7 @@ class L1TRate_Offline : public edm::EDAnalyzer {
virtual void endLuminosityBlock (edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c);

// Private methods
private:
//private:

// bool getXSexFitsOMDS (const edm::ParameterSet& ps);
bool getXSexFitsPython(const edm::ParameterSet& ps);
Expand All @@ -96,6 +89,7 @@ class L1TRate_Offline : public edm::EDAnalyzer {
const std::vector< std::vector<int> >* m_listsPrescaleFactors; // Collection os all sets of prescales

// Maps
std::map<int,double> m_lsDeadTime; // Map of dead time for each LS
std::map<int,int> m_lsPrescaleIndex; // Map of precale index for each LS
std::map<int,double> m_lsLuminosity; // Map of luminosity recorded for each LS
std::map<int,std::map<TString,double> > m_lsRates; // Map of rates (by bit) recorded for each LS
Expand All @@ -105,19 +99,28 @@ class L1TRate_Offline : public edm::EDAnalyzer {
std::map<std::string,std::string> m_selectedTriggers; // Map of what trigger to monitor for each category
std::map<TString,MonitorElement*> m_xSecObservedToExpected; // Monitor Elements for Observed to Expected Algo XSec
std::map<TString,MonitorElement*> m_xSecVsInstLumi; // Monitor Elements for Algo XSec vs Instant Luminosity

std::map<TString,MonitorElement*> m_xSecObservedVsDelivLumi;
std::map<TString,MonitorElement*> m_xSecObservedVsRecorLumi;


std::map<TString,MonitorElement*> m_CountsVsLS; // Monitor Elements for counts
std::map<TString,MonitorElement*> m_InstLumiVsLS; // Monitor Elements for Instant Lumi
std::map<TString,MonitorElement*> m_PrescIndexVsLS; // Monitor Elements for Prescale Index
// std::map<TString,MonitorElement*> m_DeadTimeVsLS; // Monitor Elements (Check Purpose)

std::map<TString,MonitorElement*> m_CountsVsLS; // Monitor Elements for
std::map<TString,MonitorElement*> m_InstLumiVsLS; // Monitor Elements for
std::map<TString,MonitorElement*> m_PrescIndexVsLS; // Monitor Elements for
std::map<TString,MonitorElement*> m_xSecObservedVsLS;
std::map<TString,MonitorElement*> m_DelivLumiVsLS;
std::map<TString,MonitorElement*> m_RecorLumiVsLS;

std::map<TString,TF1*> m_templateFunctions; // For each trigger template f(InstLumi)=XSec

std::map<int,std::map<TString,double> > m_lsCounts; // Map of counts (by bit) recorded for each LS

// Input tags
edm::EDGetTokenT<LumiScalersCollection> m_scalersSource_LSCollection; // Where to get L1 Scalers
edm::EDGetTokenT<LumiScalersCollection> m_scalersSource_LSCollection; // Where to get L1 Scalers
edm::EDGetTokenT<Level1TriggerScalersCollection> m_scalersSource_L1TSCollection; // Where to get L1 Scalers
edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> m_l1GtDataDaqInputTag; // Where to get L1 GT Data DAQ
edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> m_l1GtDataDaqInputTag; // Where to get L1 GT Data DAQ

// ParameterSet
edm::ParameterSet m_parameters;
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/L1Trigger/interface/L1TSync_Harvest.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef DQMOffline_L1Trigger_L1TSync_Harvest_h
#define DQMOffline_L1Trigger_L1TSync_Harvest_h

/*
/**
* \class L1TSync_Harvest
*
*
Expand Down
62 changes: 56 additions & 6 deletions DQMOffline/L1Trigger/python/L1TRateOfflineParams_cff.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,53 @@
import FWCore.ParameterSet.Config as cms

RateParams_2012 = cms.VPSet(
cms.PSet(
AlgoName = cms.string ('L1_SingleEG22'),
TemplateFunction = cms.string ('[0]/x+[1]+[2]*x+[3]*x*x'),
Parameters = cms.vdouble(-250.646,1.78975,-5.5801e-05,5.90724e-09),
ParErrors = cms.vdouble(4.6133,0.00124988,2.17871e-07,2.56616e-11),
),
cms.PSet(
AlgoName = cms.string ('L1_ETM50'),
TemplateFunction = cms.string ('[0]/x+[1]+[2]*x+[3]*x*x'),
Parameters = cms.vdouble(-781.253,0.589212,-8.09682e-05,6.11958e-09),
ParErrors = cms.vdouble(1.57155,0.000427218,7.48549e-08,8.83838e-12),
),
cms.PSet(
AlgoName = cms.string ('L1_ETT80'),
TemplateFunction = cms.string ('[0]/x+[1]+[2]*x+[3]*x*x'),
Parameters = cms.vdouble(6.41489e+06,-3748.94,0.656481,-2.14204e-05),
ParErrors = cms.vdouble(34685.1,9.68504,0.00177067,2.12745e-07),
),
cms.PSet(
AlgoName = cms.string ('L1_HTT100'),
TemplateFunction = cms.string ('[0]/x+[1]+[2]*x+[3]*x*x'),
Parameters = cms.vdouble(-461.806,0.635347,-1.80574e-05,1.61805e-08),
ParErrors = cms.vdouble(2026.82,0.549814,9.61286e-05,1.1393e-08),
),
cms.PSet(
AlgoName = cms.string ('L1_SingleIsoEG20er'),
TemplateFunction = cms.string ('[0]/x+[1]+[2]*x+[3]*x*x'),
Parameters = cms.vdouble(152.06,1.02088,5.33485e-06,9.91573e-10),
ParErrors = cms.vdouble(3.81866,0.00103454,1.80314e-07,2.12361e-11),
),
cms.PSet(
AlgoName = cms.string ('L1_SingleJet128'),
TemplateFunction = cms.string ('[0]/x+[1]+[2]*x+[3]*x*x'),
Parameters = cms.vdouble(-217.021,0.326,-1.41957e-05,1.4588e-09),
ParErrors = cms.vdouble(1.82347,0.000494797,8.64361e-08,1.01899e-11),
),
cms.PSet(
AlgoName = cms.string ('L1_SingleMu16'),
TemplateFunction = cms.string ('[0]/x+[1]+[2]*x+[3]*x*x'),
Parameters = cms.vdouble(-5435.68,6.38796,-0.000563198,3.4096e-08),
ParErrors = cms.vdouble(7.08545,0.00194953,3.5046e-07,4.37085e-11),
),

)



RateParams_2011 = cms.VPSet(
cms.PSet(
AlgoName = cms.string ('L1_BeamHalo'),
Expand Down Expand Up @@ -332,11 +380,11 @@
ParErrors = cms.vdouble(0.283,0.00273,1.62e-05,5.72e-08),
),
cms.PSet(
AlgoName = cms.string ('L1_SingleJet32_NotBptxOR_NotMuBeamHalo'),
TemplateFunction = cms.string ('[0]/x+[1]+[2]*x+[3]*x*x'),
Parameters = cms.vdouble(-37.43,2.527,-0.005776,1.052e-05),
ParErrors = cms.vdouble(1.01,0.00972,5.75e-05,2.04e-07),
),
AlgoName = cms.string ('L1_SingleJet32_NotBptxOR_NotMuBeamHalo'),
TemplateFunction = cms.string ('[0]/x+[1]+[2]*x+[3]*x*x'),
Parameters = cms.vdouble(-37.43,2.527,-0.005776,1.052e-05),
ParErrors = cms.vdouble(1.01,0.00972,5.75e-05,2.04e-07),
),
cms.PSet(
AlgoName = cms.string ('L1_DoubleJet44_Central'),
TemplateFunction = cms.string ('[0]/x+[1]+[2]*x+[3]*x*x'),
Expand Down Expand Up @@ -724,6 +772,8 @@

)



RateParams_2010 = cms.VPSet(
cms.PSet(
AlgoName = cms.string ('L1_SingleTauJet50U'),
Expand Down Expand Up @@ -1262,4 +1312,4 @@

)

RateParams = RateParams_2011
RateParams = RateParams_2012
4 changes: 2 additions & 2 deletions DQMOffline/L1Trigger/python/L1TRate_Harvest_cfi.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import FWCore.ParameterSet.Config as cms

from DQMOffline.L1Trigger.L1TRateParams_cff import RateParams
from DQMOffline.L1Trigger.L1TRateOfflineParams_cff import RateParams

l1tRate_Harvest = cms.EDAnalyzer("L1TRate_Harvest",

Expand Down Expand Up @@ -53,7 +53,7 @@
# Algo XSec Fits
# srcAlgoXSecFit = 0 -> From WbM via OMDS
# srcAlgoXSecFit = 1 -> From python
srcAlgoXSecFit = cms.int32(0),
srcAlgoXSecFit = cms.int32(1),

# if srcAlgoXSecFit = 0 we need to define
## Online
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/L1Trigger/python/L1TRate_Offline_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# set to 0 again.
lsShiftGTRates = cms.untracked.int32(-1),

verbose = cms.untracked.bool(False),
verbose = cms.untracked.bool(False), # This must be off when running on official release
dqmStore = cms.untracked.bool(True),
disableROOToutput = cms.untracked.bool(True),
inputTagScalersResults = cms.InputTag("scalersRawToDigi"),
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/L1Trigger/src/L1TBeamConfiguration.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/**
* \class L1TBeamConfiguration
*
*
Expand Down
4 changes: 2 additions & 2 deletions DQMOffline/L1Trigger/src/L1TEfficiencyEG_Offline.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
/**
* \file L1TEfficiencyEG_Offline.cc
*
* \author J. Pela, P. Musella
* \author J. Pela
*
*/

Expand Down
4 changes: 2 additions & 2 deletions DQMOffline/L1Trigger/src/L1TEfficiencyJets_Offline.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
/**
* \file L1TEfficiencyJets_Offline.cc
*
* \author J. Pela, P. Musella
* \author J. Pela
*
*/

Expand Down
44 changes: 22 additions & 22 deletions DQMOffline/L1Trigger/src/L1TEfficiencyMuons_Offline.cc
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
/*
* \file L1TEfficiencyMuons_Offline.cc
*
* \author J. Pela, C. Battilana
*
*/
/**
* \file L1TEfficiencyMuons_Offline.cc
*
* \author J. Pela, C. Battilana
*
*/

#include "DQMOffline/L1Trigger/interface/L1TEfficiencyMuons_Offline.h"

#include "DQMOffline/L1Trigger/interface/L1TEfficiencyMuons_Offline.h"

#include "DQMServices/Core/interface/DQMStore.h"

#include "DataFormats/Histograms/interface/MEtoEDMFormat.h"
#include "DQMServices/Core/interface/DQMStore.h"

#include "DataFormats/MuonReco/interface/MuonSelectors.h"

#include "DataFormats/GeometrySurface/interface/Cylinder.h"
#include "DataFormats/GeometrySurface/interface/Plane.h"
#include "DataFormats/Histograms/interface/MEtoEDMFormat.h"

#include "DataFormats/MuonReco/interface/MuonSelectors.h"

#include "DataFormats/GeometrySurface/interface/Cylinder.h"
#include "DataFormats/GeometrySurface/interface/Plane.h"

#include "TMath.h"

using namespace reco;
using namespace trigger;
using namespace edm;
using namespace std;

#include "TMath.h"

using namespace reco;
using namespace trigger;
using namespace edm;
using namespace std;


//__________RECO-GMT Muon Pair Helper Class____________________________

Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/L1Trigger/src/L1TEfficiency_Harvesting.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/**
* \file L1TEfficiency_Harvesting.cc
*
* \author J. Pela, C. Battilana
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/L1Trigger/src/L1TLSBlock.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/**
* \class L1TLSBlock
*
*
Expand Down
3 changes: 1 addition & 2 deletions DQMOffline/L1Trigger/src/L1TMenuHelper.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

/*
/**
* \file L1TMenuHelper.cc
*
* \author J. Pela, P. Musella
Expand Down
Loading

0 comments on commit 3c5511b

Please sign in to comment.