Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-03-05 02:39:10

0001 import FWCore.ParameterSet.Config as cms
0002 from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
0003 from copy import deepcopy
0004 
0005 
0006 ### Single Electron + HT triggers
0007 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0008 DQMOffline_Ele15_HT600 = DQMEDAnalyzer('LepHTMonitor',
0009                                               electronCollection = cms.InputTag('gedGsfElectrons'),
0010                                               electronVID = cms.InputTag("egmGsfElectronIDsForDQM:cutBasedElectronID-Summer16-80X-V1-medium"),
0011                                               muonCollection = cms.InputTag(''),
0012                                               muonIDlevel = cms.untracked.int32(2), ## 1: loose, 2: medium, 3: tight
0013                                               pfMetCollection = cms.InputTag('pfMet'),
0014                                               pfJetCollection = cms.InputTag('ak4PFJets'),
0015                                               jetTagCollection = cms.InputTag(''),
0016 
0017                                               vertexCollection = cms.InputTag('offlinePrimaryVertices'),
0018                                               conversionCollection = cms.InputTag('conversions'),
0019                                               beamSpot = cms.InputTag('offlineBeamSpot'),
0020 
0021                                               folderName = cms.string('HLT_Ele15_IsoVVVL_PFHT600'),
0022                                               requireValidHLTPaths = cms.bool(True),
0023 
0024                                               jetPtCut = cms.untracked.double(30.0),
0025                                               jetEtaCut = cms.untracked.double(2.5),
0026                                               metCut = cms.untracked.double(-1.0),
0027                                               htCut = cms.untracked.double(-1.0), 
0028                                               nels = cms.untracked.double(1),
0029                                               nmus = cms.untracked.double(0),
0030                                               leptonPtPlateau = cms.untracked.double(30.0), #defines plateau region for eta, phi distributions
0031                                               leptonCountingThreshold = cms.untracked.double(10.0), # min lepton pT for lepton counting
0032                                               lepIsoCut = cms.untracked.double(0.1), # max lepton reliso 
0033                                               lepEtaCut = cms.untracked.double(2.5), # max abs(eta)
0034                                               lep_d0_cut_b = cms.untracked.double(0.0118), #barrel
0035                                               lep_dz_cut_b = cms.untracked.double(0.373),
0036                                               lep_d0_cut_e = cms.untracked.double(0.0739), #endcap
0037                                               lep_dz_cut_e = cms.untracked.double(0.602), 
0038                                                                                            
0039                                               ptbins = cms.vdouble(0,5,10,20,30,40,50,75,100,125,160,200,250),
0040                                               htbins = cms.vdouble(0,50,100,150,200,250,300,350,400,450,500,600,750,1000,1500,2000),
0041                                               nbins_eta = cms.untracked.int32(10),
0042                                               nbins_phi = cms.untracked.int32(10),
0043                                               nbins_npv = cms.untracked.int32(35),
0044                                               etabins_min = cms.untracked.double(-2.5), 
0045                                               etabins_max = cms.untracked.double(2.5), 
0046                                               phibins_min = cms.untracked.double(-3.142), 
0047                                               phibins_max = cms.untracked.double(3.142), 
0048                                               npvbins_min = cms.untracked.double(0), 
0049                                               npvbins_max = cms.untracked.double(70), 
0050                                                 
0051                                               numGenericTriggerEventPSet = cms.PSet(
0052                                                 andOr         = cms.bool( False ),
0053                                                 andOrHlt      = cms.bool(True),# True:=OR; False:=AND
0054                                                 hltInputTag   = cms.InputTag( "TriggerResults::HLT" ),
0055                                                 hltPaths      = cms.vstring("HLT_Ele15_IsoVVVL_PFHT600_v*"),
0056                                                 errorReplyHlt = cms.bool( False ),
0057                                                 verbosityLevel = cms.uint32(0)
0058                                                 ),
0059                                               den_lep_GenericTriggerEventPSet = cms.PSet(
0060                                                 andOr         = cms.bool( False ),
0061                                                 andOrHlt      = cms.bool(True),# True:=OR; False:=AND
0062                                                 hltInputTag   = cms.InputTag( "TriggerResults::HLT" ),
0063                                                 hltPaths      = cms.vstring("HLT_PFHT1050_v*"),
0064                                                 errorReplyHlt = cms.bool( False ),
0065                                                 dcsInputTag   = cms.InputTag( "scalersRawToDigi" ),
0066                                                 dcsRecordInputTag = cms.InputTag("onlineMetaDataDigis"),
0067                                                 dcsPartitions = cms.vint32 ( 24, 25, 26, 27, 28, 29 ), # 24-27: strip, 28-29: pixel, we should add all other detectors !
0068                                                 andOrDcs      = cms.bool( False ),
0069                                                 errorReplyDcs = cms.bool( True ),
0070                                                 verbosityLevel = cms.uint32(0)
0071                                                 ),
0072                                               den_HT_GenericTriggerEventPSet = cms.PSet(
0073                                                 andOr         = cms.bool( False ),
0074                                                 andOrHlt      = cms.bool(True),# True:=OR; False:=AND
0075                                                 hltInputTag   = cms.InputTag( "TriggerResults::HLT" ),
0076                                                 hltPaths      = cms.vstring("HLT_Ele38_WPTight_Gsf_v*","HLT_Ele27_WPTight_Gsf_v*","HLT_Ele35_WPTight_Gsf_v*","HLT_Ele40_WPTight_Gsf_v*"),
0077                                                 errorReplyHlt = cms.bool( False ),
0078                                                 dcsInputTag   = cms.InputTag( "scalersRawToDigi" ),
0079                                                 dcsRecordInputTag = cms.InputTag("onlineMetaDataDigis"),
0080                                                 dcsPartitions = cms.vint32 ( 24, 25, 26, 27, 28, 29 ), # 24-27: strip, 28-29: pixel, we should add all other detectors !
0081                                                 andOrDcs      = cms.bool( False ),
0082                                                 errorReplyDcs = cms.bool( True ),
0083                                                 verbosityLevel = cms.uint32(0)
0084                                                 ),
0085                                             )
0086 
0087 DQMOffline_Ele15_HT450 = DQMOffline_Ele15_HT600.clone(
0088     folderName =  'HLT_Ele15_IsoVVVL_PFHT450',
0089     numGenericTriggerEventPSet = dict(hltPaths = ["HLT_Ele15_IsoVVVL_PFHT450_v*"])
0090 )
0091 
0092 DQMOffline_Ele50_HT450 = DQMOffline_Ele15_HT600.clone(
0093     folderName =  'HLT_Ele50_IsoVVVL_PFH450',
0094     leptonPtPlateau = 60.0,
0095     numGenericTriggerEventPSet = dict(hltPaths = ["HLT_Ele50_IsoVVVL_PFHT450_v*"])
0096 )
0097 
0098 ### Single Muon + HT triggers
0099 DQMOffline_Mu15_HT600 = DQMOffline_Ele15_HT600.clone(
0100     electronCollection = '',
0101     conversionCollection = '',
0102     muonCollection = 'muons',
0103     muonIDlevel = 2, ## 1: loose, 2: medium, 3: tight
0104     nels = 0,
0105     nmus = 1,
0106     lepIsoCut = 0.2, 
0107     lepEtaCut = 2.4,
0108     lep_d0_cut_b = 0.2, #endcap parameter not used for muons 
0109     lep_dz_cut_b = 0.5,
0110     folderName =  'HLT_Mu15_IsoVVVL_PFH600',
0111     numGenericTriggerEventPSet = dict(hltPaths = ["HLT_Mu15_IsoVVVL_PFHT600_v*"]),
0112     den_HT_GenericTriggerEventPSet = dict(hltPaths = ["HLT_IsoMu27_v*","HLT_IsoMu24_v*"])
0113 )
0114 
0115 DQMOffline_Mu15_HT450 = DQMOffline_Mu15_HT600.clone(
0116     folderName =  'HLT_Mu15_IsoVVVL_PFHT450',
0117     numGenericTriggerEventPSet = dict(hltPaths = ["HLT_Mu15_IsoVVVL_PFHT450_v*"])
0118 )
0119 
0120 DQMOffline_Mu50_HT450 = DQMOffline_Mu15_HT600.clone(
0121     folderName =  'HLT_Mu50_IsoVVVL_PFH450',
0122     leptonPtPlateau = 60.0,
0123     numGenericTriggerEventPSet = dict(hltPaths = ["HLT_Mu50_IsoVVVL_PFHT450_v*"])
0124 )
0125 
0126 ### Dilepton + HT triggers
0127 DQMOffline_DoubleMu4_Mass8_DZ_PFHT350 = DQMOffline_Mu15_HT600.clone(
0128     nmus = 2,
0129     folderName =  'HLT_DoubleMu4_Mass8_DZ_PFHT350',
0130     leptonPtPlateau = 6.0,
0131     leptonCountingThreshold = 4.0,
0132     numGenericTriggerEventPSet = dict(hltPaths = ["HLT_DoubleMu4_Mass8_DZ_PFHT350_v*"]),
0133     den_lep_GenericTriggerEventPSet = dict(hltPaths = ["HLT_Mu15_IsoVVVL_PFHT450_v*"]),
0134     den_HT_GenericTriggerEventPSet = dict(hltPaths = ["HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_DZ_Mass8_v*"])
0135 )
0136 
0137 
0138 DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350 = DQMOffline_Ele15_HT600.clone(
0139     nels = 2,
0140     folderName =  'HLT_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350',
0141     leptonPtPlateau = 10.0,
0142     leptonCountingThreshold = 8.0,
0143     numGenericTriggerEventPSet = dict(hltPaths = ["HLT_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350_v*"]),
0144     den_lep_GenericTriggerEventPSet = dict(hltPaths = ["HLT_Ele15_IsoVVVL_PFHT450_v*"]),
0145     den_HT_GenericTriggerEventPSet = dict(hltPaths = ["HLT_Ele23_Ele12_CaloIdL_TrackIdL_IsoVL_DZ*"])
0146 )
0147 
0148 
0149 DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ = DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350.clone(
0150     muonCollection = 'muons',
0151     nels = 1,
0152     nmus = 1,
0153     folderName =  'HLT_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ',
0154     numGenericTriggerEventPSet = dict(hltPaths = ["HLT_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ_v*"]),
0155     den_lep_GenericTriggerEventPSet = dict(hltPaths = ["HLT_Ele15_IsoVVVL_PFHT450_v*","HLT_Mu15_IsoVVVL_PFHT450_v*"]),
0156     den_HT_GenericTriggerEventPSet = dict(hltPaths = ["HLT_Mu12_TrkIsoVVL_Ele23_CaloIdL_TrackIdL_IsoVL_v*", "HLT_Mu23_TrkIsoVVL_Ele12_CaloIdL_TrackIdL_IsoVL_v*","HLT_Mu8_TrkIsoVVL_Ele23_CaloIdL_TrackIdL_IsoVL_DZ_v*"])
0157 )
0158 
0159 ### Alternate dilepton + HT without DZ requirement
0160 DQMOffline_DoubleMu4_Mass8_PFHT350 = DQMOffline_DoubleMu4_Mass8_DZ_PFHT350.clone(
0161     folderName =  'HLT_DoubleMu4_Mass8_PFHT350',
0162     numGenericTriggerEventPSet = dict(hltPaths = ["HLT_DoubleMu4_Mass8_PFHT350_v*"])
0163 )
0164 
0165 DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_PFHT350 = DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350.clone(
0166     folderName =  'HLT_DoubleEle8_CaloIdM_TrackIdM_Mass8_PFHT350',
0167     numGenericTriggerEventPSet = dict(hltPaths = ["HLT_DoubleEle8_CaloIdM_TrackIdM_Mass8_PFHT350_v*"])
0168 )
0169 
0170 DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350 = DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ.clone(
0171     folderName =  'HLT_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350',
0172     numGenericTriggerEventPSet = dict(hltPaths = ["HLT_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_v*"]) 
0173 )
0174 
0175 # fastsim has no conversion collection
0176 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0177 fastSim.toModify(DQMOffline_Ele15_HT600,conversionCollection=cms.InputTag(''))
0178 fastSim.toModify(DQMOffline_Ele15_HT450,conversionCollection=cms.InputTag(''))
0179 fastSim.toModify(DQMOffline_Ele50_HT450,conversionCollection=cms.InputTag(''))
0180 fastSim.toModify(DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350,conversionCollection=cms.InputTag(''))
0181 fastSim.toModify(DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ,conversionCollection=cms.InputTag(''))
0182 
0183 DQMOffline_LepHT_POSTPROCESSING = DQMEDHarvester("DQMGenericClient",
0184                                                              subDirs = cms.untracked.vstring('HLT/SUSY/LepHT/*'),
0185                                                              efficiency = cms.vstring(
0186         "lepPtTurnOn_eff ';Offline lepton p_{T} [GeV];#epsilon' lepPtTurnOn_num lepPtTurnOn_den",
0187         "lepEtaTurnOn_eff ';Offline lepton #eta;#epsilon' lepEtaTurnOn_num lepEtaTurnOn_den",
0188         "lepPhiTurnOn_eff ';Offline lepton #phi;#epsilon' lepPhiTurnOn_num lepPhiTurnOn_den",
0189         "lepEtaPhiTurnOn_eff ';Offline lepton #eta;Offline lepton #phi;#epsilon' lepEtaPhiTurnOn_num lepEtaPhiTurnOn_den",
0190         "pfHTTurnOn_eff ';Offline PF H_{T} [GeV];#epsilon' pfHTTurnOn_num pfHTTurnOn_den",
0191         "NPVTurnOn_eff ';Offline N_{PV} ;#epsilon' NPVTurnOn_num NPVTurnOn_den"
0192         ),
0193                                                              resolution = cms.vstring('')
0194                                                              )
0195 
0196 
0197 
0198 from DQMOffline.Trigger.HLTEGTnPMonitor_cfi import egmGsfElectronIDsForDQM
0199 
0200 LepHTMonitor = cms.Sequence( 
0201                               DQMOffline_Ele15_HT600
0202                             + DQMOffline_Ele15_HT450
0203                             + DQMOffline_Ele50_HT450
0204                             + DQMOffline_Mu15_HT600
0205                             + DQMOffline_Mu15_HT450
0206                             + DQMOffline_Mu50_HT450
0207                             + DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_DZ_PFHT350
0208                             + DQMOffline_DoubleMu4_Mass8_DZ_PFHT350
0209                             + DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ
0210                             + DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_PFHT350
0211                             + DQMOffline_DoubleMu4_Mass8_PFHT350
0212                             + DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350
0213                             , cms.Task(egmGsfElectronIDsForDQM) # Use of electron VID requires this module being executed first
0214 )
0215 
0216 LepHTClient = cms.Sequence(  DQMOffline_LepHT_POSTPROCESSING )