CMS 3D CMS Logo

L1TPhase2MuonDQMEfficiency_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # generate the efficiency strings for the DQMGenericClient from the pt and quality cuts
4 def generateEfficiencyStrings(ptQualCuts):
5  numDenDir = "nums_and_dens/"
6  varStrings = ['Pt', 'Eta', 'Phi']
7  etaStrings = ['etaMin0_etaMax0p83', 'etaMin0p83_etaMax1p24', 'etaMin1p24_etaMax2p4', 'etaMin0_etaMax2p4']
8  qualStrings = ['qualOpen', 'qualDouble', 'qualSingle']
9  muonStrings = ['SAMuon','TkMuon']
10 
11  efficiencyStrings = []
12 
13  for muonString in muonStrings:
14  for qualString in qualStrings:
15  for etaString in etaStrings:
16  effNumDenPrefix = numDenDir+"Eff_"+muonString+"_"+etaString+"_"+qualString+"_"
17  effNamePrefix = "efficiencies/eff_"+muonString+"_"+etaString+"_"+qualString+"_"
18 
19  for varString in varStrings:
20  effDenName = effNumDenPrefix+varString+"_Den"
21  effNumName = effNumDenPrefix+varString+"_Num"
22  effName = effNamePrefix+varString
23 
24  efficiencyStrings.append(effName+" '"+effName+";;L1 muon efficiency' "+effNumName+" "+effDenName)
25  return efficiencyStrings
26 
27 from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
29 
30 l1tPhase2MuonEfficiency = DQMEDHarvester("DQMGenericClient",
31  subDirs = cms.untracked.vstring(["L1T/L1TPhase2/Muons/SAMuon","L1T/L1TPhase2/Muons/TkMuon"]),
32  efficiency = cms.vstring(),
33  efficiencyProfile = cms.untracked.vstring(generateEfficiencyStrings(ptQualCuts)),
34  resolution = cms.vstring(),
35  outputFileName = cms.untracked.string(""),
36  verbose = cms.untracked.uint32(4)
37 )