CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
B2GTnPMonitor_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 #this is the config to define t&p based DQM offline monitoring for B2G (copied from cmssw/DQMOffline/Trigger/python/HLTEGTnPMonitor_cfi.py
4 
5 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)
6 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)
7 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)
8 
9 etRangeCut= cms.PSet(
10  rangeVar=cms.string("et"),
11  allowedRanges=cms.vstring("0:10000"),
12  )
13 ecalBarrelEtaCut=cms.PSet(
14  rangeVar=cms.string("scEta"),
15  allowedRanges=cms.vstring("-1.4442:1.4442")
16  )
17 ecalEndcapEtaCut=cms.PSet(
18  rangeVar=cms.string("scEta"),
19  allowedRanges=cms.vstring("-2.5:-1.556","1.556:2.5")
20  )
21 ecalBarrelAndEndcapEtaCut = cms.PSet(
22  rangeVar=cms.string("scEta"),
23  allowedRanges=cms.vstring("-1.4442:1.4442","-2.5:-1.556","1.556:2.5"),
24  )
25 hcalPosEtaCut= cms.PSet(
26  rangeVar=cms.string("scEta"),
27  allowedRanges=cms.vstring("1.3:1.4442","1.556:2.5"),
28  )
29 hcalNegEtaCut= cms.PSet(
30  rangeVar=cms.string("scEta"),
31  allowedRanges=cms.vstring("-2.5:-1.556","-1.4442:-1.3"),
32  )
33 hcalPhi17Cut = cms.PSet(
34  rangeVar=cms.string("phi"),
35  allowedRanges=cms.vstring("-0.87:-0.52"),
36  )
37 
38 tagAndProbeConfigEle50CaloIdVTGsfTrkIdT = cms.PSet(
39  trigEvent = cms.InputTag("hltTriggerSummaryAOD","","HLT"),
40 
41  tagVIDCuts = cms.InputTag("egmGsfElectronIDsForDQM:cutBasedElectronID-Summer16-80X-V1-tight"),
42  probeVIDCuts = cms.InputTag("egmGsfElectronIDsForDQM:cutBasedElectronID-Summer16-80X-V1-tight"),
43  sampleTrigRequirements = cms.PSet(
44  hltInputTag = cms.InputTag("TriggerResults","","HLT"),
45  hltPaths = cms.vstring("HLT_Ele50_CaloIdVT_GsfTrkIdT_PFJet165_v*")
46  ),
47  #it is intended that these are the filters of the triggers listed for sampleTrigRequirements
48  tagFilters = cms.vstring("hltEle50CaloIdVTGsfTrkIdTCentralPFJet165EleCleaned"),
49  tagFiltersORed = cms.bool(True),
50  tagRangeCuts = cms.VPSet(ecalBarrelAndEndcapEtaCut),
51  probeFilters = cms.vstring(),
52  probeFiltersORed = cms.bool(False),
53  probeRangeCuts = cms.VPSet(ecalBarrelAndEndcapEtaCut),
54  minMass = cms.double(70.0),
55  maxMass = cms.double(110.0),
56  requireOpSign = cms.bool(False),
57  )
58 
59 egammaStdHistConfigs = cms.VPSet(
60  cms.PSet(
61  histType=cms.string("1D"),
62  vsVar=cms.string("et"),
63  nameSuffex=cms.string("_EBvsEt"),
64  rangeCuts=cms.VPSet(ecalBarrelEtaCut),
65  binLowEdges=etBinsStd,
66  ),
67  cms.PSet(
68  histType=cms.string("1D"),
69  vsVar=cms.string("et"),
70  nameSuffex=cms.string("_EEvsEt"),
71  rangeCuts=cms.VPSet(ecalEndcapEtaCut),
72  binLowEdges=etBinsStd,
73  ),
74  cms.PSet(
75  histType=cms.string("1D"),
76  vsVar=cms.string("scEta"),
77  nameSuffex=cms.string("_vsSCEta"),
78  rangeCuts=cms.VPSet(),
79  binLowEdges=scEtaBinsStd,
80  ),
81  cms.PSet(
82  histType=cms.string("1D"),
83  vsVar=cms.string("phi"),
84  nameSuffex=cms.string("_EBvsPhi"),
85  rangeCuts=cms.VPSet(ecalBarrelEtaCut),
86  binLowEdges=phiBinsStd,
87  ),
88  cms.PSet(
89  histType=cms.string("1D"),
90  vsVar=cms.string("phi"),
91  nameSuffex=cms.string("_EEvsPhi"),
92  rangeCuts=cms.VPSet(ecalEndcapEtaCut),
93  binLowEdges=phiBinsStd,
94  ),
95  cms.PSet(
96  histType=cms.string("2D"),
97  xVar=cms.string("scEta"),
98  yVar=cms.string("phi"),
99  nameSuffex=cms.string("_vsSCEtaPhi"),
100  rangeCuts=cms.VPSet(),
101  xBinLowEdges=scEtaBinsStd,
102  yBinLowEdges=phiBinsStd,
103  ),
104 
105  )
106 
107 egammaStdFiltersToMonitor= cms.VPSet(
108  cms.PSet(
109  folderName = cms.string("HLT/B2G/HLT_Ele50_CaloIdVT_GsfTrkIdT_PFJet165"),
110  rangeCuts = cms.VPSet(etRangeCut.clone(allowedRanges=cms.vstring("55:99999")),),
111  filterName = cms.string("hltEle50CaloIdVTGsfTrkIdTCentralPFJet165EleCleaned"),
112  histTitle = cms.string(""),
113  tagExtraFilter = cms.string(""),
114  ),
115 
116 
117  )
118 
119 
120 
121 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
122 B2GegHLTDQMOfflineTnPSource = DQMEDAnalyzer("HLTEleTagAndProbeOfflineSource",
123  tagAndProbeCollections = cms.VPSet(
124  cms.PSet(
125  tagAndProbeConfigEle50CaloIdVTGsfTrkIdT,
126  histConfigs = egammaStdHistConfigs,
127  baseHistName = cms.string("eleWPTightTag_"),
128  filterConfigs = egammaStdFiltersToMonitor,
129  ),
130 
131 
132  )
133  )
134 
135 from RecoEgamma.ElectronIdentification.egmGsfElectronIDs_cff import egmGsfElectronIDs
136 
137 B2GegmGsfElectronIDsForDQM = egmGsfElectronIDs.clone()
138 B2GegmGsfElectronIDsForDQM.physicsObjectsIDs = cms.VPSet()
139 B2GegmGsfElectronIDsForDQM.physicsObjectSrc == cms.InputTag('gedGsfElectrons')
140 #note: be careful here to when selecting new ids that the vid tools doesnt do extra setup for them
141 #for example the HEEP cuts need an extra producer which vid tools automatically handles
142 from PhysicsTools.SelectorUtils.tools.vid_id_tools import setupVIDSelection
143 my_id_modules = ['RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Summer16_80X_V1_cff']
144 for id_module_name in my_id_modules:
145  idmod= __import__(id_module_name, globals(), locals(), ['idName','cutFlow'])
146  for name in dir(idmod):
147  item = getattr(idmod,name)
148  if hasattr(item,'idName') and hasattr(item,'cutFlow'):
149  setupVIDSelection(B2GegmGsfElectronIDsForDQM,item)
def setupVIDSelection
Definition: vid_id_tools.py:11