Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 #this is the config to define t&p based DQM offline monitoring for B2G (copied from  cmssw/DQMOffline/Trigger/python/HLTEGTnPMonitor_cfi.py
0004 
0005 etBinsStd=cms.vdouble(5,10,12.5,15,17.5,20,22.5,25,30,35,40,45,50,60,80,100,150,200,250,300,350,400)
0006 scEtaBinsStd = cms.vdouble(-2.5,-2.4,-2.3,-2.2,-2.1,-2.0,-1.9,-1.8,-1.7,-1.566,-1.4442,-1.3,-1.2,-1.1,-1.0,-0.9,-0.8,-0.7,-0.6,-0.5,-0.4,-0.3,-0.2,-0.1,0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.1,1.2,1.3,1.4442,1.566,1.7,1.8,1.9,2.0,2.1,2.2,2.3,2.4,2.5)
0007 phiBinsStd = cms.vdouble(-3.32,-2.97,-2.62,-2.27,-1.92,-1.57,-1.22,-0.87,-0.52,-0.18,0.18,0.52,0.87,1.22,1.57,1.92,2.27,2.62,2.97,3.32)
0008 
0009 etRangeCut= cms.PSet(
0010     rangeVar=cms.string("et"),
0011     allowedRanges=cms.vstring("0:10000"),
0012     )
0013 ecalBarrelEtaCut=cms.PSet(
0014     rangeVar=cms.string("scEta"),
0015     allowedRanges=cms.vstring("-1.4442:1.4442")
0016     )
0017 ecalEndcapEtaCut=cms.PSet(
0018     rangeVar=cms.string("scEta"),
0019     allowedRanges=cms.vstring("-2.5:-1.556","1.556:2.5")
0020     )
0021 ecalBarrelAndEndcapEtaCut = cms.PSet(
0022     rangeVar=cms.string("scEta"),
0023     allowedRanges=cms.vstring("-1.4442:1.4442","-2.5:-1.556","1.556:2.5"),
0024     )
0025 hcalPosEtaCut= cms.PSet(
0026     rangeVar=cms.string("scEta"),
0027     allowedRanges=cms.vstring("1.3:1.4442","1.556:2.5"),
0028     )
0029 hcalNegEtaCut= cms.PSet(
0030     rangeVar=cms.string("scEta"),
0031     allowedRanges=cms.vstring("-2.5:-1.556","-1.4442:-1.3"),
0032     )
0033 hcalPhi17Cut = cms.PSet(
0034     rangeVar=cms.string("phi"),
0035     allowedRanges=cms.vstring("-0.87:-0.52"),
0036     )
0037 
0038 tagAndProbeConfigEle50CaloIdVTGsfTrkIdT = cms.PSet(
0039     trigEvent = cms.InputTag("hltTriggerSummaryAOD","","HLT"),
0040 
0041     tagVIDCuts = cms.InputTag("egmGsfElectronIDsForDQM:cutBasedElectronID-Summer16-80X-V1-tight"),
0042     probeVIDCuts = cms.InputTag("egmGsfElectronIDsForDQM:cutBasedElectronID-Summer16-80X-V1-tight"),
0043     sampleTrigRequirements = cms.PSet(
0044         hltInputTag = cms.InputTag("TriggerResults","","HLT"),
0045         hltPaths = cms.vstring("HLT_Ele50_CaloIdVT_GsfTrkIdT_PFJet165_v*")
0046         ),
0047     #it is intended that these are the filters of the triggers listed for sampleTrigRequirements
0048     tagFilters = cms.vstring("hltEle50CaloIdVTGsfTrkIdTCentralPFJet165EleCleaned"),
0049     tagFiltersORed = cms.bool(True),
0050     tagRangeCuts = cms.VPSet(ecalBarrelAndEndcapEtaCut),
0051     probeFilters = cms.vstring(),
0052     probeFiltersORed = cms.bool(False),
0053     probeRangeCuts = cms.VPSet(ecalBarrelAndEndcapEtaCut),
0054     minMass = cms.double(70.0),
0055     maxMass = cms.double(110.0),
0056     requireOpSign = cms.bool(False),
0057     )
0058     
0059 egammaStdHistConfigs = cms.VPSet(
0060     cms.PSet(
0061         histType=cms.string("1D"),
0062         vsVar=cms.string("et"),
0063         nameSuffex=cms.string("_EBvsEt"),
0064         rangeCuts=cms.VPSet(ecalBarrelEtaCut),
0065         binLowEdges=etBinsStd,
0066         ),
0067     cms.PSet(
0068         histType=cms.string("1D"),
0069         vsVar=cms.string("et"),
0070         nameSuffex=cms.string("_EEvsEt"),
0071         rangeCuts=cms.VPSet(ecalEndcapEtaCut),
0072         binLowEdges=etBinsStd,
0073         ),
0074     cms.PSet(
0075         histType=cms.string("1D"),
0076         vsVar=cms.string("scEta"),
0077         nameSuffex=cms.string("_vsSCEta"),
0078         rangeCuts=cms.VPSet(),
0079         binLowEdges=scEtaBinsStd,
0080         ),
0081     cms.PSet(
0082         histType=cms.string("1D"),
0083         vsVar=cms.string("phi"),
0084         nameSuffex=cms.string("_EBvsPhi"),
0085         rangeCuts=cms.VPSet(ecalBarrelEtaCut),
0086         binLowEdges=phiBinsStd,
0087         ),
0088     cms.PSet(
0089         histType=cms.string("1D"),
0090         vsVar=cms.string("phi"),
0091         nameSuffex=cms.string("_EEvsPhi"),
0092         rangeCuts=cms.VPSet(ecalEndcapEtaCut),
0093         binLowEdges=phiBinsStd,
0094         ),
0095     cms.PSet(
0096         histType=cms.string("2D"),
0097         xVar=cms.string("scEta"),
0098         yVar=cms.string("phi"),
0099         nameSuffex=cms.string("_vsSCEtaPhi"), 
0100         rangeCuts=cms.VPSet(),
0101         xBinLowEdges=scEtaBinsStd,
0102         yBinLowEdges=phiBinsStd,
0103         ),
0104     
0105     )
0106 
0107 egammaStdFiltersToMonitor= cms.VPSet(
0108     cms.PSet(
0109         folderName = cms.string("HLT/B2G/HLT_Ele50_CaloIdVT_GsfTrkIdT_PFJet165"),
0110         rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges= ["55:99999"]),),
0111         filterName = cms.string("hltEle50CaloIdVTGsfTrkIdTCentralPFJet165EleCleaned"),
0112         histTitle = cms.string(""),
0113         tagExtraFilter = cms.string(""),
0114         ),
0115        
0116    
0117      )
0118   
0119  
0120 
0121 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0122 B2GegHLTDQMOfflineTnPSource = DQMEDAnalyzer("HLTEleTagAndProbeOfflineSource",
0123                                           tagAndProbeCollections = cms.VPSet(
0124         cms.PSet( 
0125             tagAndProbeConfigEle50CaloIdVTGsfTrkIdT,
0126             histConfigs = egammaStdHistConfigs,
0127             baseHistName = cms.string("eleWPTightTag_"),
0128             filterConfigs = egammaStdFiltersToMonitor,
0129         ),
0130 
0131            
0132         )
0133                                          )
0134 
0135 from RecoEgamma.ElectronIdentification.egmGsfElectronIDs_cff import egmGsfElectronIDs
0136 
0137 B2GegmGsfElectronIDsForDQM = egmGsfElectronIDs.clone(
0138     physicsObjectsIDs = cms.VPSet(),
0139     physicsObjectSrc = 'gedGsfElectrons'
0140 )
0141 #note: be careful here to when selecting new ids that the vid tools doesnt do extra setup for them
0142 #for example the HEEP cuts need an extra producer which vid tools automatically handles
0143 from PhysicsTools.SelectorUtils.tools.vid_id_tools import setupVIDSelection
0144 my_id_modules = ['RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Summer16_80X_V1_cff']
0145 for id_module_name in my_id_modules: 
0146     idmod= __import__(id_module_name, globals(), locals(), ['idName','cutFlow'])
0147     for name in dir(idmod):
0148         item = getattr(idmod,name)
0149         if hasattr(item,'idName') and hasattr(item,'cutFlow'):
0150             setupVIDSelection(B2GegmGsfElectronIDsForDQM,item)