CMS 3D CMS Logo

TopMonitor.cc
Go to the documentation of this file.
11 
12 
13 // -----------------------------
14 // constructors and destructor
15 // -----------------------------
16 
18  folderName_ ( iConfig.getParameter<std::string>("FolderName") )
19  , metToken_ ( consumes<reco::PFMETCollection> (iConfig.getParameter<edm::InputTag>("met") ) )
20  , jetToken_ ( mayConsume<reco::PFJetCollection> (iConfig.getParameter<edm::InputTag>("jets") ) )
21  , eleToken_ ( mayConsume<edm::View<reco::GsfElectron> >(iConfig.getParameter<edm::InputTag>("electrons") ) )
22  //ATHER
23  , elecIDToken_ ( consumes<edm::ValueMap<bool> > (iConfig.getParameter<edm::InputTag>("elecID") ) )
24  , muoToken_ ( mayConsume<reco::MuonCollection> (iConfig.getParameter<edm::InputTag>("muons") ) )
25  // Menglei
26  , phoToken_ ( mayConsume<reco::PhotonCollection> (iConfig.getParameter<edm::InputTag>("photons") ) )
27  // Marina
28  , jetTagToken_ ( mayConsume<reco::JetTagCollection> (iConfig.getParameter<edm::InputTag>("btagalgo") ))
29  //Suvankar
30  , vtxToken_ ( mayConsume<reco::VertexCollection> (iConfig.getParameter<edm::InputTag>("vertices") ) )
31  , met_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("metPSet") ) )
32  , ls_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("lsPSet") ) )
33  , phi_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("phiPSet") ) )
34  , pt_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("ptPSet") ) )
35  , eta_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("etaPSet") ) )
36  , HT_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("htPSet") ) )
37  , DR_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("DRPSet") ) )
38  // Marina
39  , csv_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("csvPSet")))
40  //george
41  , invMass_mumu_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("invMassPSet")))
42  , MHT_binning_ ( getHistoPSet (iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet> ("MHTPSet") ) )
43 
44  , met_variable_binning_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("metBinning") )
45  , HT_variable_binning_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("HTBinning") )
46  , jetPt_variable_binning_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("jetPtBinning") )
47  , muPt_variable_binning_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("muPtBinning") )
48  , elePt_variable_binning_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("elePtBinning") )
49  , jetEta_variable_binning_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("jetEtaBinning") )
50  , muEta_variable_binning_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("muEtaBinning") )
51  , eleEta_variable_binning_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("eleEtaBinning") )
52 
53  //george
54  , invMass_mumu_variable_binning_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("invMassVariableBinning") )
55  , MHT_variable_binning_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("MHTVariableBinning") )
56  , HT_variable_binning_2D_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("HTBinning2D") )
57  , jetPt_variable_binning_2D_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("jetPtBinning2D") )
58  , muPt_variable_binning_2D_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("muPtBinning2D") )
59  , elePt_variable_binning_2D_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("elePtBinning2D") )
60  , phoPt_variable_binning_2D_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("phoPtBinning2D") )
61  , jetEta_variable_binning_2D_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("jetEtaBinning2D") )
62  , muEta_variable_binning_2D_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("muEtaBinning2D") )
63  , eleEta_variable_binning_2D_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("eleEtaBinning2D") )
64  , phoEta_variable_binning_2D_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("phoEtaBinning2D") )
65  , phi_variable_binning_2D_ ( iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("phiBinning2D") )
66  , num_genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig.getParameter<edm::ParameterSet>("numGenericTriggerEventPSet"),consumesCollector(), *this))
67  , den_genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig.getParameter<edm::ParameterSet>("denGenericTriggerEventPSet"),consumesCollector(), *this))
68  , metSelection_ ( iConfig.getParameter<std::string>("metSelection") )
69  , jetSelection_ ( iConfig.getParameter<std::string>("jetSelection") )
70  , eleSelection_ ( iConfig.getParameter<std::string>("eleSelection") )
71  , muoSelection_ ( iConfig.getParameter<std::string>("muoSelection") )
72  , phoSelection_ ( iConfig.getParameter<std::string>("phoSelection") )
73  , HTdefinition_ ( iConfig.getParameter<std::string>("HTdefinition") )
74  , vtxSelection_ ( iConfig.getParameter<std::string>("vertexSelection") )
75  , bjetSelection_( iConfig.getParameter<std::string>("bjetSelection"))
76  , njets_ ( iConfig.getParameter<unsigned int>("njets" ) )
77  , nelectrons_ ( iConfig.getParameter<unsigned int>("nelectrons" ) )
78  , nmuons_ ( iConfig.getParameter<unsigned int>("nmuons" ) )
79  , nphotons_ ( iConfig.getParameter<unsigned int>("nphotons" ) )
80  , leptJetDeltaRmin_ ( iConfig.getParameter<double>("leptJetDeltaRmin" ) )
81  , bJetMuDeltaRmax_ ( iConfig.getParameter<double>("bJetMuDeltaRmax" ) )
82  , bJetDeltaEtaMax_ ( iConfig.getParameter<double>("bJetDeltaEtaMax" ) )
83  , HTcut_ ( iConfig.getParameter<double>("HTcut" ) )
84  // Marina
85  , nbjets_ ( iConfig.getParameter<unsigned int>("nbjets"))
86  , workingpoint_(iConfig.getParameter<double>("workingpoint"))
87  //Suvankar
88  , usePVcuts_ ( iConfig.getParameter<bool>("applyleptonPVcuts") )
89  //george
90  , invMassUppercut_ (iConfig.getParameter<double>("invMassUppercut"))
91  , invMassLowercut_ (iConfig.getParameter<double>("invMassLowercut"))
92  , opsign_ (iConfig.getParameter<bool>("oppositeSignMuons"))
93  , MHTdefinition_ ( iConfig.getParameter<std::string>("MHTdefinition") )
94  , MHTcut_ ( iConfig.getParameter<double>("MHTcut" ) )
95  , invMassCutInAllMuPairs_ (iConfig.getParameter<bool>("invMassCutInAllMuPairs"))
96  //Menglei
97  , enablePhotonPlot_ ( iConfig.getParameter<bool>("enablePhotonPlot") )
98  //Mateusz
99  , enableMETplot_(iConfig.getParameter<bool>("enableMETplot"))
100 {
101 
102  std::string metcut_str = iConfig.getParameter<std::string>("metSelection");
103  metcut_str.erase(std::remove(metcut_str.begin(), metcut_str.end(), ' '), metcut_str.end());
104  if(metcut_str != "pt>0") applyMETcut_ = true;
105 
106  ObjME empty;
107 
108  muPhi_= std::vector<ObjME> (nmuons_,empty);
109  muEta_= std::vector<ObjME> (nmuons_,empty);
110  muPt_= std::vector<ObjME> (nmuons_,empty);
111  muEta_variableBinning_= std::vector<ObjME> (nmuons_,empty);
112  muPt_variableBinning_= std::vector<ObjME> (nmuons_,empty);
113  muPtEta_= std::vector<ObjME> (nmuons_,empty);
114  muEtaPhi_= std::vector<ObjME> (nmuons_,empty);
115 
116  elePhi_= std::vector<ObjME> (nelectrons_,empty);
117  eleEta_= std::vector<ObjME> (nelectrons_,empty);
118  elePt_= std::vector<ObjME> (nelectrons_,empty);
119  eleEta_variableBinning_= std::vector<ObjME> (nelectrons_,empty);
120  elePt_variableBinning_= std::vector<ObjME> (nelectrons_,empty);
121  elePtEta_= std::vector<ObjME> (nelectrons_,empty);
122  eleEtaPhi_= std::vector<ObjME> (nelectrons_,empty);
123 
124  jetPhi_= std::vector<ObjME> (njets_,empty);
125  jetEta_= std::vector<ObjME> (njets_,empty);
126  jetPt_= std::vector<ObjME> (njets_,empty);
127  jetEta_variableBinning_= std::vector<ObjME> (njets_,empty);
128  jetPt_variableBinning_= std::vector<ObjME> (njets_,empty);
129  jetPtEta_= std::vector<ObjME> (njets_,empty);
130  jetEtaPhi_= std::vector<ObjME> (njets_,empty);
131 
132  //Menglei Sun
133  phoPhi_ = std::vector<ObjME> (nphotons_,empty);
134  phoEta_ = std::vector<ObjME> (nphotons_,empty);
135  phoPt_ = std::vector<ObjME> (nphotons_,empty);
136  phoPtEta_ = std::vector<ObjME> (nphotons_,empty);
137  phoEtaPhi_ = std::vector<ObjME> (nphotons_,empty);
138 
139  // Marina
140  bjetPhi_= std::vector<ObjME> (nbjets_,empty);
141  bjetEta_= std::vector<ObjME> (nbjets_,empty);
142  bjetPt_= std::vector<ObjME> (nbjets_,empty);
143  bjetCSV_= std::vector<ObjME> (nbjets_,empty);
144  bjetEta_variableBinning_= std::vector<ObjME> (nbjets_,empty);
145  bjetPt_variableBinning_= std::vector<ObjME> (nbjets_,empty);
146  bjetPtEta_= std::vector<ObjME> (nbjets_,empty);
147  bjetEtaPhi_= std::vector<ObjME> (nbjets_,empty);
148  bjetCSVHT_= std::vector<ObjME> (nbjets_,empty);
149 
150  //Suvankar
151  lepPVcuts_.dxy = (iConfig.getParameter<edm::ParameterSet>("leptonPVcuts")).getParameter<double>("dxy");
152  lepPVcuts_.dz = (iConfig.getParameter<edm::ParameterSet>("leptonPVcuts")).getParameter<double>("dz");
153 }
154 
156 {
159 }
160 
162  edm::Run const & iRun,
163  edm::EventSetup const & iSetup)
164 {
165  std::string histname, histtitle;
166 
167  std::string currentFolder = folderName_ ;
168  ibooker.setCurrentFolder(currentFolder);
169 
171 
172  histname = "met"; histtitle = "PFMET";
173  bookME(ibooker,metME_,histname,histtitle,met_binning_.nbins,met_binning_.xmin, met_binning_.xmax);
174  setMETitle(metME_,"PF MET [GeV]","events / [GeV]");
175 
176  histname = "metPhi"; histtitle = "PFMET phi";
177  bookME(ibooker,metPhiME_,histname,histtitle, phi_binning_.nbins, phi_binning_.xmin, phi_binning_.xmax);
178  setMETitle(metPhiME_,"PF MET #phi","events / 0.1 rad");
179 
180  histname = "met_variable"; histtitle = "PFMET";
181  bookME(ibooker,metME_variableBinning_,histname,histtitle,met_variable_binning_);
182  setMETitle(metME_variableBinning_,"PF MET [GeV]","events / [GeV]");
183 
184  histname = "metVsLS"; histtitle = "PFMET vs LS";
186  setMETitle(metVsLS_,"LS","PF MET [GeV]");
187  }
188 
189  if (njets_ > 0){
190  histname = "jetVsLS"; histtitle = "jet pt vs LS";
192  setMETitle(jetVsLS_,"LS","jet pt [GeV]");
193 
194  histname = "jetEtaPhi_HEP17"; histtitle = "jet #eta-#phi for HEP17";
195  bookME(ibooker,jetEtaPhi_HEP17_,histname,histtitle,10,-2.5,2.5,18,-3.1415,3.1415); // for HEP17 monitoring
196  setMETitle(jetEtaPhi_HEP17_,"jet #eta","jet #phi");
197 
198  histname = "jetMulti"; histtitle = "jet multiplicity";
199  bookME(ibooker,jetMulti_,histname,histtitle, 11,-.5, 10.5);
200  setMETitle(jetMulti_,"jet multiplicity","events");
201  }
202 
203  if (nmuons_ > 0){
204  histname = "muVsLS"; histtitle = "muon pt vs LS";
206  setMETitle(muVsLS_,"LS","muon pt [GeV]");
207 
208  histname = "muMulti"; histtitle = "muon multiplicity";
209  bookME(ibooker,muMulti_,histname,histtitle, 6,-.5, 5.5);
210  setMETitle(muMulti_,"muon multiplicity","events");
211 
212  if (njets_ > 0){
213  histname = "DeltaR_jet_Mu"; histtitle = "#DeltaR(jet,mu)";
214  bookME(ibooker,DeltaR_jet_Mu_,histname,histtitle, DR_binning_.nbins, DR_binning_.xmin, DR_binning_.xmax );
215  setMETitle(DeltaR_jet_Mu_,"#DeltaR(jet,mu)","events");
216  }
217 
218  }
219 
220  if (nelectrons_ > 0){
221  histname = "eleVsLS"; histtitle = "electron pt vs LS";
223  setMETitle(eleVsLS_,"LS","electron pt [GeV]");
224 
225  histname = "eleMulti"; histtitle = "electron multiplicity";
226  bookME(ibooker,eleMulti_,histname,histtitle, 6,-.5, 5.5);
227  setMETitle(eleMulti_,"electron multiplicity","events");
228 
229  if (njets_>0){
230  histname = "elePt_jetPt"; histtitle = "electron pt vs jet pt";
232  setMETitle(elePt_jetPt_,"leading electron pt","leading jet pt");
233  }
234 
235  if (nmuons_>0){
236  histname = "elePt_muPt"; histtitle = "electron pt vs muon pt";
238  setMETitle(elePt_muPt_,"electron pt [GeV]","muon pt [GeV]");
239 
240  histname = "eleEta_muEta"; histtitle = "electron #eta vs muon #eta";
242  setMETitle(eleEta_muEta_,"electron #eta","muon #eta");
243  }
244 
245  }
246 
247  //Menglei
248  if(enablePhotonPlot_){
249  if (nphotons_ > 0){
250  histname = "photonVsLS"; histtitle = "photon pt vs LS";
252  setMETitle(phoVsLS_, "LS","photon pt [GeV]");
253  }
254  }
255 
256  // Marina
257  if (nbjets_ > 0){
258  histname = "bjetVsLS"; histtitle = "b-jet pt vs LS";
260  setMETitle(bjetVsLS_,"LS","b-jet pt [GeV]");
261 
262  histname = "bjetMulti"; histtitle = "b-jet multiplicity";
263  bookME(ibooker,bjetMulti_,histname,histtitle, 6,-.5, 5.5);
264  setMETitle(bjetMulti_,"b-jet multiplicity","events");
265 
266  }
267 
268  if ( nelectrons_ > 1 ){
269  histname = "ele1Pt_ele2Pt"; histtitle = "electron-1 pt vs electron-2 pt";
271  setMETitle(ele1Pt_ele2Pt_,"electron-1 pt [GeV]","electron-2 pt [GeV]");
272 
273  histname = "ele1Eta_ele2Eta"; histtitle = "electron-1 #eta vs electron-2 #eta";
275  setMETitle(ele1Eta_ele2Eta_,"electron-1 #eta","electron-2 #eta");
276  }
277 
278  if ( nmuons_ > 1 ) {
279  histname = "mu1Pt_mu2Pt"; histtitle = "muon-1 pt vs muon-2 pt";
281  setMETitle(mu1Pt_mu2Pt_,"muon-1 pt [GeV]","muon-2 pt [GeV]");
282 
283  histname = "mu1Eta_mu2Eta"; histtitle = "muon-1 #eta vs muon-2 #eta";
285  setMETitle(mu1Eta_mu2Eta_,"muon-1 #eta","muon-2 #eta");
286  //george
287  histname = "invMass"; histtitle = "M mu1 mu2";
289  setMETitle(invMass_mumu_,"M(mu1,mu2) [GeV]","events");
290  histname = "invMass_variable"; histtitle = "M mu1 mu2 variable";
292  setMETitle(invMass_mumu_variableBinning_,"M(mu1,mu2) [GeV]","events / [GeV]");
293  }
294 
295  if (HTcut_ > 0){
296  histname = "htVsLS"; histtitle = "event HT vs LS";
298  setMETitle(htVsLS_,"LS","event HT [GeV]");
299 
300  histname = "eventHT"; histtitle = "event HT";
301  bookME(ibooker,eventHT_,histname,histtitle, HT_binning_.nbins,HT_binning_.xmin, HT_binning_.xmax);
302  setMETitle(eventHT_," event HT [GeV]","events");
303  histname.append("_variableBinning");
304  bookME(ibooker,eventHT_variableBinning_,histname,histtitle, HT_variable_binning_);
305  setMETitle(eventHT_variableBinning_,"event HT [GeV]","events");
306 
307  if (nelectrons_>0){
308  histname = "elePt_eventHT"; histtitle = "electron pt vs event HT";
310  setMETitle(elePt_eventHT_,"leading electron pt","event HT");
311  }
312 
313  }
314 
315  if (MHTcut_>0){
316  //george
317  histname = "eventMHT"; histtitle = "event MHT";
318  bookME(ibooker,eventMHT_,histname,histtitle, MHT_binning_.nbins,MHT_binning_.xmin, MHT_binning_.xmax);
319  setMETitle(eventMHT_," event MHT [GeV]","events");
320 
321  histname = "eventMHT_variable"; histtitle = "event MHT variable";
322  bookME(ibooker,eventMHT_variableBinning_,histname,histtitle,MHT_variable_binning_);
323  setMETitle(eventMHT_variableBinning_,"event MHT [GeV]","events / [GeV]");
324  }
325 
326  //Menglei
327  if(enablePhotonPlot_){
328  if ( (nmuons_ > 0) && ( nphotons_ > 0)){
329  histname = "muPt_phoPt", histtitle = "muon pt vs photon pt";
331  setMETitle(muPt_phoPt_, "muon pt [GeV]","photon pt [GeV]");
332 
333  histname = "muEta_phoEta", histtitle = "muon #eta vs photon #eta";
335  setMETitle(muEta_phoEta_, "muon #eta","photon #eta");
336  }
337  }
338 
339 
340  for (unsigned int iMu=0; iMu<nmuons_; ++iMu){
341  std::string index = std::to_string(iMu+1);
342 
343  histname = "muPt_"; histtitle = "muon p_{T} - ";
344  histname.append(index); histtitle.append(index);
345  bookME(ibooker,muPt_.at(iMu),histname,histtitle, pt_binning_.nbins, pt_binning_.xmin, pt_binning_.xmax);
346  setMETitle(muPt_.at(iMu),"muon p_{T} [GeV]","events");
347  histname.append("_variableBinning");
348  bookME(ibooker,muPt_variableBinning_.at(iMu),histname,histtitle, muPt_variable_binning_);
349  setMETitle(muPt_variableBinning_.at(iMu),"muon p_{T} [GeV]","events");
350 
351  histname = "muEta_"; histtitle = "muon #eta - ";
352  histname.append(index); histtitle.append(index);
353  bookME(ibooker,muEta_.at(iMu),histname,histtitle, eta_binning_.nbins,eta_binning_.xmin, eta_binning_.xmax);
354  setMETitle(muEta_.at(iMu)," muon #eta","events");
355  histname.append("_variableBinning");
356  bookME(ibooker,muEta_variableBinning_.at(iMu),histname,histtitle, muEta_variable_binning_);
357  setMETitle(muEta_variableBinning_.at(iMu)," muon #eta","events");
358 
359  histname = "muPhi_"; histtitle = "muon #phi - ";
360  histname.append(index); histtitle.append(index);
361  bookME(ibooker,muPhi_.at(iMu),histname,histtitle, phi_binning_.nbins, phi_binning_.xmin, phi_binning_.xmax);
362  setMETitle(muPhi_.at(iMu)," muon #phi","events");
363 
364  histname = "muPtEta_"; histtitle = "muon p_{T} - #eta - ";
365  histname.append(index); histtitle.append(index);
366  bookME(ibooker,muPtEta_.at(iMu),histname,histtitle, muPt_variable_binning_2D_, muEta_variable_binning_2D_);
367  setMETitle(muPtEta_.at(iMu),"muon p_{T} [GeV]","muon #eta");
368 
369  histname = "muEtaPhi_"; histtitle = "muon #eta - #phi - ";
370  histname.append(index); histtitle.append(index);
371  bookME(ibooker,muEtaPhi_.at(iMu),histname,histtitle, muEta_variable_binning_2D_, phi_variable_binning_2D_);
372  setMETitle(muEtaPhi_.at(iMu),"muon #phi","muon #eta");
373 
374  }
375 
376  for (unsigned int iEle=0; iEle<nelectrons_; ++iEle){
377  std::string index = std::to_string(iEle+1);
378 
379  histname = "elePt_"; histtitle = "electron p_{T} - ";
380  histname.append(index); histtitle.append(index);
381  bookME(ibooker,elePt_.at(iEle),histname,histtitle, pt_binning_.nbins, pt_binning_.xmin, pt_binning_.xmax);
382  setMETitle(elePt_.at(iEle),"electron p_{T} [GeV]","events");
383  histname.append("_variableBinning");
384  bookME(ibooker,elePt_variableBinning_.at(iEle),histname,histtitle, elePt_variable_binning_);
385  setMETitle(elePt_variableBinning_.at(iEle),"electron p_{T} [GeV]","events");
386 
387  histname = "eleEta_"; histtitle = "electron #eta - ";
388  histname.append(index); histtitle.append(index);
389  bookME(ibooker,eleEta_.at(iEle),histname,histtitle, eta_binning_.nbins,eta_binning_.xmin, eta_binning_.xmax);
390  setMETitle(eleEta_.at(iEle)," electron #eta","events");
391  histname.append("_variableBinning");
392  bookME(ibooker,eleEta_variableBinning_.at(iEle),histname,histtitle, eleEta_variable_binning_);
393  setMETitle(eleEta_variableBinning_.at(iEle),"electron #eta","events");
394 
395  histname = "elePhi_"; histtitle = "electron #phi - ";
396  histname.append(index); histtitle.append(index);
397  bookME(ibooker,elePhi_.at(iEle),histname,histtitle, phi_binning_.nbins, phi_binning_.xmin, phi_binning_.xmax);
398  setMETitle(elePhi_.at(iEle)," electron #phi","events");
399 
400  histname = "elePtEta_"; histtitle = "electron p_{T} - #eta - ";
401  histname.append(index); histtitle.append(index);
402  bookME(ibooker,elePtEta_.at(iEle),histname,histtitle, elePt_variable_binning_2D_, eleEta_variable_binning_2D_);
403  setMETitle(elePtEta_.at(iEle),"electron p_{T} [GeV]","electron #eta");
404 
405  histname = "eleEtaPhi_"; histtitle = "electron #eta - #phi - ";
406  histname.append(index); histtitle.append(index);
407  bookME(ibooker,eleEtaPhi_.at(iEle),histname,histtitle, eleEta_variable_binning_2D_, phi_variable_binning_2D_);
408  setMETitle(eleEtaPhi_.at(iEle),"electron #phi","electron #eta");
409 
410 
411  }
412 
413  //Menglei
414  if(enablePhotonPlot_){
415  for (unsigned int iPho(0); iPho < nphotons_; iPho++){
416  std::string index = std::to_string(iPho+1);
417 
418  histname = "phoPt_"; histtitle = "photon p_{T} - ";
419  histname.append(index); histtitle.append(index);
420  bookME(ibooker,phoPt_[iPho],histname,histtitle, pt_binning_.nbins, pt_binning_.xmin, pt_binning_.xmax);
421  setMETitle(phoPt_[iPho],"photon p_{T} [GeV]","events");
422 
423  histname = "phoEta_"; histtitle = "photon #eta - ";
424  histname.append(index); histtitle.append(index);
425  bookME(ibooker,phoEta_[iPho],histname,histtitle, eta_binning_.nbins,eta_binning_.xmin, eta_binning_.xmax);
426  setMETitle(phoEta_[iPho],"photon #eta","events");
427 
428  histname = "phoPhi_"; histtitle = "photon #phi - ";
429  histname.append(index); histtitle.append(index);
430  bookME(ibooker,phoPhi_[iPho],histname,histtitle, phi_binning_.nbins, phi_binning_.xmin, phi_binning_.xmax);
431  setMETitle(phoPhi_[iPho],"photon #phi","events");
432 
433  histname = "phoPtEta_"; histtitle = "photon p_{T} - #eta - ";
434  histname.append(index); histtitle.append(index);
435  bookME(ibooker,phoPtEta_[iPho],histname,histtitle, phoPt_variable_binning_2D_, phoEta_variable_binning_2D_);
436  setMETitle(phoPtEta_[iPho],"photon p_{T} [GeV]","photon #eta");
437 
438  histname = "phoEtaPhi_"; histtitle = "photon #eta - #phi - ";
439  histname.append(index); histtitle.append(index);
440  bookME(ibooker,phoEtaPhi_[iPho],histname,histtitle, phoEta_variable_binning_2D_, phi_variable_binning_2D_);
441  setMETitle(phoEtaPhi_[iPho],"photon p_{T} [GeV]","photon #eta");
442 
443  }
444  }
445 
446 
447  for (unsigned int iJet=0; iJet<njets_; ++iJet){
448  std::string index = std::to_string(iJet+1);
449 
450  histname = "jetPt_"; histtitle = "jet p_{T} - ";
451  histname.append(index); histtitle.append(index);
452  bookME(ibooker,jetPt_.at(iJet),histname,histtitle, pt_binning_.nbins, pt_binning_.xmin, pt_binning_.xmax);
453  setMETitle(jetPt_.at(iJet),"jet p_{T} [GeV]","events");
454  histname.append("_variableBinning");
455  bookME(ibooker,jetPt_variableBinning_.at(iJet),histname,histtitle, jetPt_variable_binning_);
456  setMETitle(jetPt_variableBinning_.at(iJet),"jet p_{T} [GeV]","events");
457 
458  histname = "jetEta_"; histtitle = "jet #eta - ";
459  histname.append(index); histtitle.append(index);
460  bookME(ibooker,jetEta_.at(iJet),histname,histtitle, eta_binning_.nbins,eta_binning_.xmin, eta_binning_.xmax);
461  setMETitle(jetEta_.at(iJet)," jet #eta","events");
462  histname.append("_variableBinning");
463  bookME(ibooker,jetEta_variableBinning_.at(iJet),histname,histtitle, jetEta_variable_binning_);
464  setMETitle(jetEta_variableBinning_.at(iJet),"jet #eta","events");
465 
466  histname = "jetPhi_"; histtitle = "jet #phi - ";
467  histname.append(index); histtitle.append(index);
468  bookME(ibooker,jetPhi_.at(iJet),histname,histtitle, phi_binning_.nbins, phi_binning_.xmin, phi_binning_.xmax);
469  setMETitle(jetPhi_.at(iJet)," jet #phi","events");
470 
471  histname = "jetPtEta_"; histtitle = "jet p_{T} - #eta - ";
472  histname.append(index); histtitle.append(index);
473  bookME(ibooker,jetPtEta_.at(iJet),histname,histtitle, jetPt_variable_binning_2D_, jetEta_variable_binning_2D_);
474  setMETitle(jetPtEta_.at(iJet),"jet p_{T} [GeV]","jet #eta");
475 
476  histname = "jetEtaPhi_"; histtitle = "jet #eta - #phi - ";
477  histname.append(index); histtitle.append(index);
478  bookME(ibooker,jetEtaPhi_.at(iJet),histname,histtitle, jetEta_variable_binning_2D_, phi_variable_binning_2D_);
479  setMETitle(jetEtaPhi_.at(iJet),"#phi","jet #eta");
480 
481 
482 
483  }
484 
485  // Marina
486  for (unsigned int iBJet=0; iBJet<nbjets_; ++iBJet){
487  std::string index = std::to_string(iBJet+1);
488 
489  histname = "bjetPt_"; histtitle = "b-jet p_{T} - ";
490  histname.append(index); histtitle.append(index);
491  bookME(ibooker,bjetPt_.at(iBJet),histname,histtitle, pt_binning_.nbins, pt_binning_.xmin, pt_binning_.xmax);
492  setMETitle(bjetPt_.at(iBJet)," b-jet p_{T} [GeV]","events");
493  histname.append("_variableBinning");
494  bookME(ibooker,bjetPt_variableBinning_.at(iBJet),histname,histtitle, jetPt_variable_binning_);
495  setMETitle(bjetPt_variableBinning_.at(iBJet),"b-jet p_{T} [GeV]","events");
496 
497  histname = "bjetEta_"; histtitle = "b-jet #eta - ";
498  histname.append(index); histtitle.append(index);
499  bookME(ibooker,bjetEta_.at(iBJet),histname,histtitle, eta_binning_.nbins,eta_binning_.xmin, eta_binning_.xmax);
500  setMETitle(bjetEta_.at(iBJet)," b-jet #eta","events");
501  histname.append("_variableBinning");
502  bookME(ibooker,bjetEta_variableBinning_.at(iBJet),histname,histtitle, jetEta_variable_binning_);
503  setMETitle(bjetEta_variableBinning_.at(iBJet),"b-jet #eta","events");
504 
505  histname = "bjetPhi_"; histtitle = "b-jet #phi - ";
506  histname.append(index); histtitle.append(index);
507  bookME(ibooker,bjetPhi_.at(iBJet),histname,histtitle, phi_binning_.nbins, phi_binning_.xmin, phi_binning_.xmax);
508  setMETitle(bjetPhi_.at(iBJet)," b-jet #phi","events");
509 
510  histname = "bjetCSV_"; histtitle = "b-jet CSV - ";
511  histname.append(index); histtitle.append(index);
512  bookME(ibooker,bjetCSV_.at(iBJet),histname,histtitle, csv_binning_.nbins, csv_binning_.xmin, csv_binning_.xmax);
513  setMETitle(bjetCSV_.at(iBJet)," b-jet CSV","events");
514 
515  histname = "bjetPtEta_"; histtitle = "b-jet p_{T} - #eta - ";
516  histname.append(index); histtitle.append(index);
517  bookME(ibooker,bjetPtEta_.at(iBJet),histname,histtitle, jetPt_variable_binning_2D_, jetEta_variable_binning_2D_);
518  setMETitle(bjetPtEta_.at(iBJet),"b-jet p_{T} [GeV]","b-jet #eta");
519 
520  histname = "bjetEtaPhi_"; histtitle = "b-jet #eta - #phi - ";
521  histname.append(index); histtitle.append(index);
522  bookME(ibooker,bjetEtaPhi_.at(iBJet),histname,histtitle, jetEta_variable_binning_2D_, phi_variable_binning_2D_);
523  setMETitle(bjetEtaPhi_.at(iBJet),"b-jet #phi","b-jet #eta");
524 
525  histname = "bjetCSVHT_"; histtitle = "HT - b-jet CSV - ";
526  histname.append(index); histtitle.append(index);
528  setMETitle(bjetCSVHT_.at(iBJet),"b-jet CSV", "event HT [GeV]");
529  }
530 
531 
532 
533 
534  // Initialize the GenericTriggerEventFlag
535  if ( num_genTriggerEventFlag_ && num_genTriggerEventFlag_->on() ) num_genTriggerEventFlag_->initRun( iRun, iSetup );
536  if ( den_genTriggerEventFlag_ && den_genTriggerEventFlag_->on() ) den_genTriggerEventFlag_->initRun( iRun, iSetup );
537 
538 }
539 
541  mll=-2;
542  sign=0;
543  // Filter out events if Trigger Filtering is requested
544  if (den_genTriggerEventFlag_->on() && ! den_genTriggerEventFlag_->accept( iEvent, iSetup) ) return;
545 
546  //Suvankar
548  iEvent.getByToken(vtxToken_, primaryVertices);
549  //Primary Vertex selection
550  const reco::Vertex* pv = nullptr;
551  for(auto const& v: *primaryVertices) {
552  if ( !vtxSelection_( v ) ) continue;
553  pv = &v;
554  break;
555  }
556  if(usePVcuts_ && pv == nullptr) return;
557 
559  iEvent.getByToken( metToken_, metHandle );
560  if (!metHandle.isValid() && (applyMETcut_ || enableMETplot_)){
561  edm::LogWarning("TopMonitor") << "MET handle not valid \n";
562  return;
563  }
564 
565  float met = 0;
566  float phi = 0;
567 
569  reco::PFMET pfmet = metHandle->front();
570  if ( ! metSelection_( pfmet ) ) return;
571  met = pfmet.pt();
572  phi = pfmet.phi();
573  }
574 
575 
577  iEvent.getByToken( eleToken_, eleHandle );
578  if (!eleHandle.isValid() && nelectrons_>0){
579  edm::LogWarning("TopMonitor") << "Electron handle not valid \n";
580  return;
581  }
582 
583  //ATHER
584  edm::Handle<edm::ValueMap<bool> > eleIDHandle;
585  iEvent.getByToken(elecIDToken_, eleIDHandle);
586  if (!eleIDHandle.isValid() && nelectrons_>0){
587  edm::LogWarning("TopMonitor") << "Electron ID handle not valid \n";
588  return;
589  }
590 
591 
592  std::vector<reco::GsfElectron> electrons;
593  if (nelectrons_>0){
594  if ( eleHandle->size() < nelectrons_ ) return;
595  for (size_t index = 0; index < eleHandle->size() ; index++) {
596  const auto e = eleHandle->at(index);
597  const auto el = eleHandle->ptrAt(index);
598  bool pass_id = (*eleIDHandle)[el];
599  if (eleSelection_(e) && pass_id) electrons.push_back(e);
600  //Suvankar
601  if ( usePVcuts_ &&
602  (std::fabs(e.gsfTrack()->dxy(pv->position())) >= lepPVcuts_.dxy || std::fabs(e.gsfTrack()->dz(pv->position())) >= lepPVcuts_.dz) ) continue;
603  }
604  if ( electrons.size() < nelectrons_ ) return;
605  }
606 
607 
608 
610  iEvent.getByToken( muoToken_, muoHandle );
611  if (!muoHandle.isValid() && nmuons_>0){
612  edm::LogWarning("TopMonitor") << "Muon handle not valid \n";
613  return;
614  }
615  if ( muoHandle->size() < nmuons_ ) return;
616  std::vector<reco::Muon> muons;
617  if (nmuons_>0){
618  for ( auto const & m : *muoHandle ) {
619  if ( muoSelection_( m ) ) muons.push_back(m);
620  //Suvankar
621  if ( usePVcuts_ &&
622  (std::fabs(m.muonBestTrack()->dxy(pv->position())) >= lepPVcuts_.dxy || std::fabs(m.muonBestTrack()->dz(pv->position())) >= lepPVcuts_.dz) ) continue;
623  }
624  if ( muons.size() < nmuons_ ) return;
625  }
626  //george
627 
628  if (nmuons_>1){
629  mll = (muons[0].p4() + muons[1].p4()).M();
630  sign = muons[0].charge() * muons[1].charge();
631  }
633  if (nmuons_>1 && opsign_ && sign==1) return;
634 
635  //cout<<" mll="<<mll<<" invMasscut_="<<invMasscut_<<endl;
636 
637 
638  //Menglei
640  iEvent.getByToken( phoToken_, phoHandle );
641  if (!phoHandle.isValid()){
642  edm::LogWarning("TopMonitor") << "Photon handle not valid \n";
643  return;
644  }
645  if ( phoHandle->size() < nphotons_ ) return;
646  std::vector<reco::Photon> photons;
647  for ( auto const & p : *phoHandle ) {
648  if ( phoSelection_( p ) ) photons.push_back(p);
649  }
650  if ( photons.size() < nphotons_ ) return;
651 
652  double eventHT = 0.;
653  math::XYZTLorentzVector eventMHT(0., 0., 0., 0.);
654 
656  iEvent.getByToken( jetToken_, jetHandle );
657  if (!jetHandle.isValid() && njets_>0) {
658  edm::LogWarning("TopMonitor") << "Jet handle not valid \n";
659  return;
660  }
661  std::vector<reco::PFJet> jets;
662  if (njets_>0){
663  if (jetHandle->size() < njets_) return;
664  for (auto const & j : *jetHandle) {
665  if (HTdefinition_(j)) {
666  eventHT += j.pt();
667  }
668  if (MHTdefinition_(j)) {
669  eventMHT += j.p4();
670  }
671  if (jetSelection_(j)) {
672  bool isJetOverlappedWithLepton = false;
673  if(nmuons_>0) {
674  for (auto const& m : muons) {
675  if (deltaR(j, m)<leptJetDeltaRmin_) {
676  isJetOverlappedWithLepton=true;
677  break;
678  }
679  }
680  }
681  if (isJetOverlappedWithLepton) continue;
682  if(nelectrons_>0) {
683  for (auto const & e: electrons) {
684  if (deltaR(j, e)<leptJetDeltaRmin_) {
685  isJetOverlappedWithLepton=true;
686  break;
687  }
688  }
689  }
690  if (isJetOverlappedWithLepton) continue;
691  jets.push_back(j);
692  }
693 
694  }
695  if (jets.size() < njets_) return;
696  }
697 
698  if (eventHT < HTcut_) return;
699  if (MHTcut_>0 && eventMHT.pt()<MHTcut_) return;
700 
701  bool allpairs=false;
702  if (nmuons_>2) {
703  float mumu_mass;
704  for (unsigned int idx=0; idx<muons.size(); idx++){
705  for (unsigned int idx2=idx+1; idx2<muons.size(); idx2++){
706  //compute inv mass of two different leptons
707  mumu_mass=(muons[idx2].p4() + muons[idx2].p4()).M();
708  if (mumu_mass<invMassLowercut_ || mumu_mass>invMassUppercut_) allpairs=true;
709  }
710  }
711  }
712  //cut only if enabled and the event has a pair that failed the mll range
713  if (allpairs && invMassCutInAllMuPairs_) return;
714 
715 
716  // Marina
718  iEvent.getByToken( jetTagToken_, bjetHandle );
719  if (!bjetHandle.isValid() && nbjets_>0){
720  edm::LogWarning("TopMonitor") << "B-Jet handle not valid \n";
721  return;
722  }
723 
724  JetTagMap bjets;
725 
726  if (nbjets_>0){
727  const reco::JetTagCollection& bTags = *(bjetHandle.product());
728  if (bTags.size() < nbjets_ ) return;
729  for (unsigned int i=0; i!=bTags.size(); ++i){
730  // Apply Selections
731  if (!bjetSelection_(*dynamic_cast<const reco::Jet*>(bTags[i].first.get())) ) continue;
732  if (bTags[i].second < workingpoint_ ) continue;
733 
734  // Fill JetTag Map
735  bjets.insert(JetTagMap::value_type(bTags[i].first, bTags[i].second));
736  }
737  if (bjets.size() < nbjets_ ) return;
738  }
739 
740  if (nbjets_ > 1){
741  double deltaEta = std::abs(bjets.begin()->first->eta()-(++bjets.begin())->first->eta());
742  if (deltaEta > bJetDeltaEtaMax_) return;
743  }
744 
745  if ((nbjets_>0) && (nmuons_>0)){
746  bool foundMuonInsideJet = false;
747  for (auto const & bjet : bjets){
748  for (auto const & mu : muons){
749  double dR = deltaR(*bjet.first,mu);
750  if (dR < bJetMuDeltaRmax_){
751  foundMuonInsideJet = true;
752  break;
753  }
754  }
755  if(foundMuonInsideJet) break;
756  }
757 
758  if (!foundMuonInsideJet) return;
759  }
760 
761  int ls = iEvent.id().luminosityBlock();
762 
763  // filling histograms (denominator)
765  metME_.denominator -> Fill(met);
767  metPhiME_.denominator -> Fill(phi);
768  metVsLS_.denominator -> Fill(ls, met);
769  }
770  if (HTcut_>0){
771  eventHT_.denominator -> Fill(eventHT);
773  htVsLS_.denominator -> Fill(ls, eventHT);
774  }
775 //george
776  if (MHTcut_>0){
777  eventMHT_.denominator -> Fill(eventMHT.pt());
778  eventMHT_variableBinning_.denominator -> Fill(eventMHT.pt());
779  }
780 
781  if (njets_>0) {
782  jetMulti_.denominator -> Fill(jets.size());
783  jetEtaPhi_HEP17_.denominator -> Fill (jets.at(0).eta(), jets.at(0).phi()); // for HEP17 monitorning
784  jetVsLS_.denominator -> Fill(ls, jets.at(0).pt());
785  }
786 
787  if(enablePhotonPlot_){
788  phoMulti_.denominator -> Fill(photons.size());
789  }
790 
791  // Marina
792  if (nbjets_>0) {
793  bjetMulti_.denominator -> Fill(bjets.size());
794  bjetVsLS_.denominator -> Fill(ls, bjets.begin()->first->pt());
795  }
796 
797  if (nmuons_ > 0){
798  muMulti_.denominator -> Fill(muons.size());
799  muVsLS_.denominator -> Fill(ls, muons.at(0).pt());
800  if (nmuons_>1) {
801  mu1Pt_mu2Pt_.denominator->Fill(muons.at(0).pt(),muons.at(1).pt());
802  mu1Eta_mu2Eta_.denominator->Fill(muons.at(0).eta(),muons.at(1).eta());
805  }
806  if(njets_>0){
807  DeltaR_jet_Mu_.denominator -> Fill (deltaR(jets.at(0),muons.at(0)));
808  }
809  }
810 
811 
812  if (nelectrons_ > 0) {
813  eleMulti_.denominator -> Fill(electrons.size());
814  eleVsLS_.denominator -> Fill(ls, electrons.at(0).pt());
815  if (HTcut_>0) elePt_eventHT_.denominator -> Fill (electrons.at(0).pt(), eventHT);
816  if (njets_>0) elePt_jetPt_.denominator -> Fill (electrons.at(0).pt(), jets.at(0).pt());
817  if (nmuons_>0) {
818  elePt_muPt_.denominator->Fill(electrons.at(0).pt(),muons.at(0).pt());
819  eleEta_muEta_.denominator->Fill(electrons.at(0).eta(),muons.at(0).eta());
820  }
821  if (nelectrons_>1) {
822  ele1Pt_ele2Pt_.denominator->Fill(electrons.at(0).pt(),electrons.at(1).pt());
823  ele1Eta_ele2Eta_.denominator->Fill(electrons.at(0).eta(),electrons.at(1).eta());
824  }
825  }
826 
827  if(enablePhotonPlot_){
828  if (nphotons_ > 0){
829  phoVsLS_.denominator -> Fill(ls, photons.at(0).pt());
830  if (nmuons_>0) {
831  muPt_phoPt_.denominator->Fill(muons.at(0).pt(), photons.at(0).pt());
832  muEta_phoEta_.denominator->Fill(muons.at(0).eta(), photons.at(0).eta());
833  }
834  }
835  }
836 
837 
838  for (unsigned int iMu=0; iMu<muons.size(); ++iMu){
839  if (iMu>=nmuons_) break;
840  muPhi_.at(iMu).denominator -> Fill(muons.at(iMu).phi());
841  muEta_.at(iMu).denominator -> Fill(muons.at(iMu).eta());
842  muPt_.at(iMu).denominator -> Fill(muons.at(iMu).pt() );
843  muEta_variableBinning_.at(iMu).denominator -> Fill(muons.at(iMu).eta());
844  muPt_variableBinning_.at(iMu).denominator -> Fill(muons.at(iMu).pt() );
845  muPtEta_.at(iMu).denominator -> Fill(muons.at(iMu).pt(), muons.at(iMu).eta() );
846  muEtaPhi_.at(iMu).denominator -> Fill(muons.at(iMu).eta(), muons.at(iMu).phi() );
847  }
848  for (unsigned int iEle=0; iEle<electrons.size(); ++iEle){
849  if (iEle>=nelectrons_) break;
850  elePhi_.at(iEle).denominator -> Fill(electrons.at(iEle).phi());
851  eleEta_.at(iEle).denominator -> Fill(electrons.at(iEle).eta());
852  elePt_.at(iEle).denominator -> Fill(electrons.at(iEle).pt() );
853  eleEta_variableBinning_.at(iEle).denominator -> Fill(electrons.at(iEle).eta());
854  elePt_variableBinning_.at(iEle).denominator -> Fill(electrons.at(iEle).pt() );
855  elePtEta_.at(iEle).denominator -> Fill(electrons.at(iEle).pt(), electrons.at(iEle).eta() );
856  eleEtaPhi_.at(iEle).denominator -> Fill(electrons.at(iEle).eta(), electrons.at(iEle).phi() );
857  }
858  //Menglei
859  if(enablePhotonPlot_){
860  for (unsigned int iPho=0; iPho<photons.size(); ++iPho){
861  if (iPho>=nphotons_) break;
862  phoPhi_[iPho].denominator -> Fill(photons[iPho].phi());
863  phoEta_[iPho].denominator -> Fill(photons[iPho].eta());
864  phoPt_[iPho].denominator -> Fill(photons[iPho].pt() );
865  phoPtEta_[iPho].denominator -> Fill(photons[iPho].pt(), photons[iPho].eta() );
866  phoEtaPhi_[iPho].denominator -> Fill(photons[iPho].eta(), photons[iPho].phi() );
867  }
868  }
869 
870  for (unsigned int iJet=0; iJet<jets.size(); ++iJet){
871  if (iJet>=njets_) break;
872  jetPhi_.at(iJet).denominator -> Fill(jets.at(iJet).phi());
873  jetEta_.at(iJet).denominator -> Fill(jets.at(iJet).eta());
874  jetPt_.at(iJet).denominator -> Fill(jets.at(iJet).pt() );
875  jetEta_variableBinning_.at(iJet).denominator -> Fill(jets.at(iJet).eta());
876  jetPt_variableBinning_.at(iJet).denominator -> Fill(jets.at(iJet).pt() );
877  jetPtEta_.at(iJet).denominator -> Fill(jets.at(iJet).pt(), jets.at(iJet).eta() );
878  jetEtaPhi_.at(iJet).denominator -> Fill(jets.at(iJet).eta(), jets.at(iJet).phi() );
879  }
880 
881  // Marina
882  unsigned int iBJet = 0;
883  for (auto & bjet: bjets){
884  if (iBJet >=nbjets_) break;
885 
886  bjetPhi_.at(iBJet).denominator -> Fill(bjet.first->phi());
887  bjetEta_.at(iBJet).denominator -> Fill(bjet.first->eta());
888  bjetPt_.at(iBJet).denominator -> Fill(bjet.first->pt());
889  bjetCSV_.at(iBJet).denominator -> Fill(std::fmax(0.0, bjet.second));
890  bjetEta_variableBinning_.at(iBJet).denominator -> Fill(bjet.first->eta());
891  bjetPt_variableBinning_.at(iBJet).denominator -> Fill(bjet.first->pt());
892  bjetPtEta_.at(iBJet).denominator -> Fill(bjet.first->pt(), bjet.first->eta());
893  bjetEtaPhi_.at(iBJet).denominator -> Fill(bjet.first->eta(), bjet.first->phi());
894  bjetCSVHT_.at(iBJet).denominator -> Fill(std::fmax(0.0, bjet.second), eventHT);
895 
896  iBJet++;
897  }
898 
899 
900 
901 
902  // applying selection for numerator
903  if (num_genTriggerEventFlag_->on() && ! num_genTriggerEventFlag_->accept( iEvent, iSetup) ) return;
904 
905  // filling histograms (num_genTriggerEventFlag_)
906 
907  if (applyMETcut_>0 || enableMETplot_){
908  metME_.numerator -> Fill(met);
910  metPhiME_.numerator -> Fill(phi);
911  metVsLS_.numerator -> Fill(ls, met);
912  }
913 
914  if (HTcut_>0){
915  htVsLS_.numerator -> Fill(ls, eventHT);
916  eventHT_.numerator -> Fill(eventHT);
918  }
919 
920  if (MHTcut_>0){
921  eventMHT_.numerator -> Fill(eventMHT.pt());
922  eventMHT_variableBinning_.numerator -> Fill(eventMHT.pt());
923  }
924 
925  if (nmuons_ > 0){
926  muMulti_.numerator -> Fill(muons.size());
927  muVsLS_.numerator -> Fill(ls, muons.at(0).pt());
928  if (nmuons_>1) {
929  mu1Pt_mu2Pt_.numerator->Fill(muons.at(0).pt(),muons.at(1).pt());
930  mu1Eta_mu2Eta_.numerator->Fill(muons.at(0).eta(),muons.at(1).eta());
933  }
934  if(njets_>0){
935  DeltaR_jet_Mu_.numerator -> Fill (deltaR(jets.at(0),muons.at(0)));
936  }
937 
938  }
939  if (njets_ > 0){
940  jetMulti_.numerator -> Fill(jets.size());
941  jetVsLS_.numerator -> Fill(ls, jets.at(0).pt());
942  jetEtaPhi_HEP17_.numerator -> Fill (jets.at(0).eta(), jets.at(0).phi()); // for HEP17 monitorning
943  }
944 
945  if (nelectrons_ > 0) {
946  eleMulti_.numerator -> Fill(electrons.size());
947  eleVsLS_.numerator -> Fill(ls, electrons.at(0).pt());
948  if (HTcut_>0) elePt_eventHT_.numerator -> Fill (electrons.at(0).pt(), eventHT);
949  if (njets_>0) elePt_jetPt_.numerator -> Fill (electrons.at(0).pt(), jets.at(0).pt());
950  if (nmuons_>0) {
951  elePt_muPt_.numerator->Fill(electrons.at(0).pt(),muons.at(0).pt());
952  eleEta_muEta_.numerator->Fill(electrons.at(0).eta(),muons.at(0).eta());
953  }
954  if (nelectrons_>1) {
955  ele1Pt_ele2Pt_.numerator->Fill(electrons.at(0).pt(),electrons.at(1).pt());
956  ele1Eta_ele2Eta_.numerator->Fill(electrons.at(0).eta(),electrons.at(1).eta());
957  }
958  }
959 
960  //Menglei
961  if(enablePhotonPlot_){
962  if (nphotons_ > 0){
963  phoVsLS_.numerator -> Fill(ls, photons.at(0).pt());
964  if (nmuons_>0) {
965  muPt_phoPt_.numerator->Fill(muons.at(0).pt(), photons.at(0).pt());
966  muEta_phoEta_.numerator->Fill(muons.at(0).eta(), photons.at(0).eta());
967  }
968  }
969  }
970 
971  // Marina
972  if (nbjets_ > 0){
973  bjetMulti_.numerator -> Fill(bjets.size());
974  bjetVsLS_.numerator-> Fill(ls, bjets.begin()->first->pt());
975  }
976 
977  //Menglei
978  if(enablePhotonPlot_){
979  phoMulti_.numerator -> Fill(photons.size());
980  }
981 
982  for (unsigned int iMu=0; iMu<muons.size(); ++iMu){
983  if (iMu>=nmuons_) break;
984 
985  muPhi_.at(iMu).numerator -> Fill(muons.at(iMu).phi());
986  muEta_.at(iMu).numerator -> Fill(muons.at(iMu).eta());
987  muPt_.at(iMu).numerator -> Fill(muons.at(iMu).pt() );
988  muEta_variableBinning_.at(iMu).numerator -> Fill(muons.at(iMu).eta());
989  muPt_variableBinning_.at(iMu).numerator -> Fill(muons.at(iMu).pt() );
990  muPtEta_.at(iMu).numerator -> Fill(muons.at(iMu).pt(), muons.at(iMu).eta() );
991  muEtaPhi_.at(iMu).numerator -> Fill(muons.at(iMu).eta(), muons.at(iMu).phi() );
992  }
993  for (unsigned int iEle=0; iEle<electrons.size(); ++iEle){
994  if (iEle>=nelectrons_) break;
995  elePhi_.at(iEle).numerator -> Fill(electrons.at(iEle).phi());
996  eleEta_.at(iEle).numerator -> Fill(electrons.at(iEle).eta());
997  elePt_.at(iEle).numerator -> Fill(electrons.at(iEle).pt() );
998  eleEta_variableBinning_.at(iEle).numerator -> Fill(electrons.at(iEle).eta());
999  elePt_variableBinning_.at(iEle).numerator -> Fill(electrons.at(iEle).pt() );
1000  elePtEta_.at(iEle).numerator -> Fill(electrons.at(iEle).pt(), electrons.at(iEle).eta() );
1001  eleEtaPhi_.at(iEle).numerator -> Fill(electrons.at(iEle).eta(), electrons.at(iEle).phi() );
1002  }
1003  //Menglei
1004  if(enablePhotonPlot_){
1005  for (unsigned int iPho=0; iPho<photons.size(); ++iPho){
1006  if (iPho>=nphotons_) break;
1007  phoPhi_[iPho].numerator -> Fill(photons[iPho].phi());
1008  phoEta_[iPho].numerator -> Fill(photons[iPho].eta());
1009  phoPt_[iPho].numerator -> Fill(photons[iPho].pt() );
1010  phoPtEta_[iPho].numerator -> Fill(photons[iPho].pt(), photons[iPho].eta() );
1011  phoEtaPhi_[iPho].numerator -> Fill(photons[iPho].eta(), photons[iPho].phi() );
1012  }
1013  }
1014 
1015  for (unsigned int iJet=0; iJet<jets.size(); ++iJet){
1016  if (iJet>=njets_) break;
1017  jetPhi_.at(iJet).numerator -> Fill(jets.at(iJet).phi());
1018  jetEta_.at(iJet).numerator -> Fill(jets.at(iJet).eta());
1019  jetPt_.at(iJet).numerator -> Fill(jets.at(iJet).pt() );
1020  jetEta_variableBinning_.at(iJet).numerator -> Fill(jets.at(iJet).eta());
1021  jetPt_variableBinning_.at(iJet).numerator -> Fill(jets.at(iJet).pt() );
1022  jetPtEta_.at(iJet).numerator -> Fill(jets.at(iJet).pt(), jets.at(iJet).eta() );
1023  jetEtaPhi_.at(iJet).numerator -> Fill(jets.at(iJet).eta(), jets.at(iJet).phi() );
1024  }
1025 
1026  // Marina
1027  unsigned int j = 0;
1028  for (auto & bjet: bjets){
1029  if (j >=nbjets_) break;
1030  bjetPhi_.at(j).numerator -> Fill(bjet.first->pt());
1031  bjetEta_.at(j).numerator -> Fill(bjet.first->eta());
1032  bjetPt_.at(j).numerator -> Fill(bjet.first->pt());
1033  bjetCSV_.at(j).numerator -> Fill(std::fmax(0.0,bjet.second));
1034  bjetEta_variableBinning_.at(j).numerator -> Fill(bjet.first->eta());
1035  bjetPt_variableBinning_.at(j).numerator -> Fill(bjet.first->pt());
1036  bjetPtEta_.at(j).numerator -> Fill(bjet.first->pt(), bjet.first->eta());
1037  bjetEtaPhi_.at(j).numerator -> Fill(bjet.first->eta(), bjet.first->phi());
1038  bjetCSVHT_.at(j).numerator -> Fill(std::fmax(0.0,bjet.second), eventHT);
1039 
1040  j++;
1041  }
1042 
1043 }
1044 
1046 {
1048  desc.add<std::string> ( "FolderName", "HLT/TOP" );
1049 
1050  desc.add<edm::InputTag>( "met", edm::InputTag("pfMet") );
1051  desc.add<edm::InputTag>( "jets", edm::InputTag("ak4PFJetsCHS") );
1052  desc.add<edm::InputTag>( "electrons",edm::InputTag("gedGsfElectrons") );
1053  desc.add<edm::InputTag>( "elecID" ,edm::InputTag("egmGsfElectronIDsForDQM:cutBasedElectronID-Fall17-94X-V1-tight") );
1054  desc.add<edm::InputTag>( "muons", edm::InputTag("muons") );
1055  //Menglei
1056  desc.add<edm::InputTag>( "photons", edm::InputTag("photons") );
1057  //Suvankar
1058  desc.add<edm::InputTag>( "vertices", edm::InputTag("offlinePrimaryVertices") );
1059 
1060  desc.add<edm::InputTag>( "btagalgo", edm::InputTag("pfCombinedSecondaryVertexV2BJetTags") );
1061  desc.add<std::string>("metSelection", "pt > 0");
1062  desc.add<std::string>("jetSelection", "pt > 0");
1063  desc.add<std::string>("eleSelection", "pt > 0");
1064  desc.add<std::string>("muoSelection", "pt > 0");
1065  //Menglei
1066  desc.add<std::string>("phoSelection", "pt > 0");
1067  desc.add<std::string>("HTdefinition", "pt > 0");
1068  //Suvankar
1069  desc.add<std::string>("vertexSelection", "!isFake");
1070  desc.add<std::string>("bjetSelection","pt > 0");
1071  desc.add<unsigned int>("njets", 0);
1072  desc.add<unsigned int>("nelectrons", 0);
1073  desc.add<unsigned int>("nmuons", 0);
1074  desc.add<unsigned int>("nphotons", 0);
1075  desc.add<double>("leptJetDeltaRmin", 0);
1076  desc.add<double>("bJetMuDeltaRmax" , 9999.);
1077  desc.add<double>("bJetDeltaEtaMax" , 9999.);
1078  desc.add<double>("HTcut", 0);
1079 
1080  desc.add<unsigned int>("nbjets", 0);
1081  desc.add<double>("workingpoint", 0.4941); // medium DeepCSV
1082  //Suvankar
1083  desc.add<bool>("applyleptonPVcuts", false);
1084  //george
1085  desc.add<double>("invMassUppercut",-1.0);
1086  desc.add<double>("invMassLowercut",-1.0);
1087  desc.add<bool>("oppositeSignMuons",false);
1088  desc.add<std::string>("MHTdefinition", "pt > 0");
1089  desc.add<double>("MHTcut", -1);
1090  desc.add<bool>("invMassCutInAllMuPairs",false);
1091  //Menglei
1092  desc.add<bool>("enablePhotonPlot", false);
1093  //Mateusz
1094  desc.add<bool>("enableMETplot", false);
1095 
1096  edm::ParameterSetDescription genericTriggerEventPSet;
1097  genericTriggerEventPSet.add<bool>("andOr");
1098  genericTriggerEventPSet.add<edm::InputTag>("dcsInputTag", edm::InputTag("scalersRawToDigi") );
1099  genericTriggerEventPSet.add<std::vector<int> >("dcsPartitions",{});
1100  genericTriggerEventPSet.add<bool>("andOrDcs", false);
1101  genericTriggerEventPSet.add<bool>("errorReplyDcs", true);
1102  genericTriggerEventPSet.add<std::string>("dbLabel","");
1103  genericTriggerEventPSet.add<bool>("andOrHlt", true);
1104  genericTriggerEventPSet.add<edm::InputTag>("hltInputTag", edm::InputTag("TriggerResults::HLT") );
1105  genericTriggerEventPSet.add<std::vector<std::string> >("hltPaths",{});
1106  genericTriggerEventPSet.add<std::string>("hltDBKey","");
1107  genericTriggerEventPSet.add<bool>("errorReplyHlt",false);
1108  genericTriggerEventPSet.add<unsigned int>("verbosityLevel",1);
1109 
1110  desc.add<edm::ParameterSetDescription>("numGenericTriggerEventPSet", genericTriggerEventPSet);
1111  desc.add<edm::ParameterSetDescription>("denGenericTriggerEventPSet", genericTriggerEventPSet);
1112 
1113  edm::ParameterSetDescription histoPSet;
1120  // Marina
1122  //george
1123  edm::ParameterSetDescription invMassPSet;
1125  fillHistoPSetDescription(metPSet);
1126  fillHistoPSetDescription(phiPSet);
1127  fillHistoPSetDescription(ptPSet);
1128  fillHistoPSetDescription(etaPSet);
1129  fillHistoPSetDescription(htPSet);
1130  fillHistoPSetDescription(DRPSet);
1131  // Marina
1132  fillHistoPSetDescription(csvPSet);
1133  //george
1134  fillHistoPSetDescription(MHTPSet);
1135  fillHistoPSetDescription(invMassPSet);
1136  histoPSet.add<edm::ParameterSetDescription>("metPSet", metPSet);
1137  histoPSet.add<edm::ParameterSetDescription>("etaPSet", etaPSet);
1138  histoPSet.add<edm::ParameterSetDescription>("phiPSet", phiPSet);
1139  histoPSet.add<edm::ParameterSetDescription>("ptPSet", ptPSet);
1140  histoPSet.add<edm::ParameterSetDescription>("htPSet", htPSet);
1141  histoPSet.add<edm::ParameterSetDescription>("DRPSet", DRPSet);
1142  // Marina
1143  histoPSet.add<edm::ParameterSetDescription>("csvPSet", csvPSet);
1144  //george
1145  histoPSet.add<edm::ParameterSetDescription>("invMassPSet", invMassPSet);
1146  histoPSet.add<edm::ParameterSetDescription>("MHTPSet", MHTPSet);
1147 
1148  std::vector<double> bins = {0.,20.,40.,60.,80.,90.,100.,110.,120.,130.,140.,150.,160.,170.,180.,190.,200.,220.,240.,260.,280.,300.,350.,400.,450.,1000.};
1149  std::vector<double> eta_bins = {-3.,-2.5,-2.,-1.5,-1.,-.5,0.,.5,1.,1.5,2.,2.5,3.};
1150  histoPSet.add<std::vector<double> >("metBinning", bins);
1151  histoPSet.add<std::vector<double> >("HTBinning", bins);
1152  histoPSet.add<std::vector<double> >("jetPtBinning", bins);
1153  histoPSet.add<std::vector<double> >("elePtBinning", bins);
1154  histoPSet.add<std::vector<double> >("muPtBinning", bins);
1155  histoPSet.add<std::vector<double> >("jetEtaBinning", eta_bins);
1156  histoPSet.add<std::vector<double> >("eleEtaBinning", eta_bins);
1157  histoPSet.add<std::vector<double> >("muEtaBinning", eta_bins);
1158  //george
1159  histoPSet.add<std::vector<double> >("invMassVariableBinning", bins);
1160  histoPSet.add<std::vector<double> >("MHTVariableBinning", bins);
1161 
1162  std::vector<double> bins_2D = {0.,40.,80.,100.,120.,140.,160.,180.,200.,240.,280.,350.,450.,1000.};
1163  std::vector<double> eta_bins_2D = {-3.,-2.,-1.,0.,1.,2.,3.};
1164  std::vector<double> phi_bins_2D = {-3.1415,-2.5132,-1.8849,-1.2566,-0.6283,0,0.6283,1.2566,1.8849,2.5132,3.1415};
1165  histoPSet.add<std::vector<double> >("HTBinning2D", bins_2D);
1166  histoPSet.add<std::vector<double> >("jetPtBinning2D", bins_2D);
1167  histoPSet.add<std::vector<double> >("elePtBinning2D", bins_2D);
1168  histoPSet.add<std::vector<double> >("muPtBinning2D", bins_2D);
1169  histoPSet.add<std::vector<double> >("phoPtBinning2D", bins_2D);
1170  histoPSet.add<std::vector<double> >("jetEtaBinning2D", eta_bins_2D);
1171  histoPSet.add<std::vector<double> >("eleEtaBinning2D", eta_bins_2D);
1172  histoPSet.add<std::vector<double> >("muEtaBinning2D", eta_bins_2D);
1173  histoPSet.add<std::vector<double> >("phoEtaBinning2D", eta_bins_2D);
1174  histoPSet.add<std::vector<double> >("phiBinning2D", phi_bins_2D);
1175 
1178  histoPSet.add<edm::ParameterSetDescription>("lsPSet", lsPSet);
1179 
1180  desc.add<edm::ParameterSetDescription>("histoPSet",histoPSet);
1181  //Suvankar
1182  edm::ParameterSetDescription lPVcutPSet;
1183  lPVcutPSet.add<double>( "dxy", 9999. );
1184  lPVcutPSet.add<double>( "dz", 9999. );
1185  desc.add<edm::ParameterSetDescription>("leptonPVcuts", lPVcutPSet);
1186 
1187  descriptions.add("topMonitoring", desc);
1188 }
1189 
1190 // Define this as a plug-in
1193 
StringCutObjectSelector< reco::Jet, true > bjetSelection_
Definition: TopMonitor.h:249
ObjME mu1Pt_mu2Pt_
Definition: TopMonitor.h:166
std::vector< double > elePt_variable_binning_2D_
Definition: TopMonitor.h:129
std::vector< ObjME > jetEta_variableBinning_
Definition: TopMonitor.h:216
T getParameter(std::string const &) const
ObjME jetVsLS_
Definition: TopMonitor.h:142
MonitorElement * numerator
std::vector< double > jetEta_variable_binning_
Definition: TopMonitor.h:119
StringCutObjectSelector< reco::PFJet, true > jetSelection_
Definition: TopMonitor.h:240
std::vector< ObjME > jetEtaPhi_
Definition: TopMonitor.h:223
std::vector< ObjME > bjetPtEta_
Definition: TopMonitor.h:232
ObjME jetEtaPhi_HEP17_
Definition: TopMonitor.h:151
double bJetMuDeltaRmax_
Definition: TopMonitor.h:256
std::vector< double > muEta_variable_binning_
Definition: TopMonitor.h:120
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
ObjME DeltaR_jet_Mu_
Definition: TopMonitor.h:180
ObjME muEta_phoEta_
Definition: TopMonitor.h:177
std::vector< ObjME > muPt_
Definition: TopMonitor.h:187
std::vector< ObjME > jetPtEta_
Definition: TopMonitor.h:222
MEbinning invMass_mumu_binning_
Definition: TopMonitor.h:110
std::vector< ObjME > bjetCSVHT_
Definition: TopMonitor.h:234
std::vector< ObjME > bjetPt_variableBinning_
Definition: TopMonitor.h:212
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
ObjME muVsLS_
Definition: TopMonitor.h:143
std::vector< ObjME > muEta_
Definition: TopMonitor.h:186
MEbinning HT_binning_
Definition: TopMonitor.h:105
ObjME eleEta_muEta_
Definition: TopMonitor.h:169
ObjME eventMHT_variableBinning_
Definition: TopMonitor.h:174
std::vector< ObjME > elePt_variableBinning_
Definition: TopMonitor.h:209
std::vector< double > jetPt_variable_binning_
Definition: TopMonitor.h:116
ObjME phoVsLS_
Definition: TopMonitor.h:146
ObjME ele1Pt_ele2Pt_
Definition: TopMonitor.h:164
double pt() const final
transverse momentum
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
ObjME ele1Eta_ele2Eta_
Definition: TopMonitor.h:165
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
ObjME elePt_eventHT_
Definition: TopMonitor.h:162
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
Definition: TopMonitor.h:92
JetFloatAssociation::Container JetTagCollection
Definition: JetTag.h:18
std::vector< ObjME > bjetCSV_
Definition: TopMonitor.h:206
std::vector< ObjME > phoEta_
Definition: TopMonitor.h:198
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:40
ObjME muMulti_
Definition: TopMonitor.h:155
std::vector< ObjME > eleEtaPhi_
Definition: TopMonitor.h:225
const Point & position() const
position
Definition: Vertex.h:109
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
std::vector< double > muPt_variable_binning_
Definition: TopMonitor.h:117
ObjME metME_variableBinning_
Definition: TopMonitor.h:138
StringCutObjectSelector< reco::Vertex, true > vtxSelection_
Definition: TopMonitor.h:247
ObjME metME_
Definition: TopMonitor.h:137
static const double deltaEta
Definition: CaloConstants.h:8
MEbinning met_binning_
Definition: TopMonitor.h:100
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
edm::EDGetTokenT< reco::PFMETCollection > metToken_
Definition: TopMonitor.h:83
bool invMassCutInAllMuPairs_
Definition: TopMonitor.h:277
void Fill(long long x)
ObjME eventMHT_
Definition: TopMonitor.h:172
double bJetDeltaEtaMax_
Definition: TopMonitor.h:257
ObjME bjetVsLS_
Definition: TopMonitor.h:148
std::string folderName_
Definition: TopMonitor.h:80
ObjME metVsLS_
Definition: TopMonitor.h:139
TopMonitor(const edm::ParameterSet &)
Definition: TopMonitor.cc:17
edm::EDGetTokenT< reco::MuonCollection > muoToken_
Definition: TopMonitor.h:87
PVcut lepPVcuts_
Definition: TopMonitor.h:264
U second(std::pair< T, U > const &p)
std::vector< ObjME > jetPt_variableBinning_
Definition: TopMonitor.h:210
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
bool enablePhotonPlot_
Definition: TopMonitor.h:280
unsigned int nphotons_
Definition: TopMonitor.h:254
ObjME elePt_jetPt_
Definition: TopMonitor.h:161
std::vector< ObjME > muPhi_
Definition: TopMonitor.h:185
std::vector< double > HT_variable_binning_
Definition: TopMonitor.h:115
edm::EDGetTokenT< reco::JetTagCollection > jetTagToken_
Definition: TopMonitor.h:90
std::vector< ObjME > muPt_variableBinning_
Definition: TopMonitor.h:208
int iEvent
Definition: GenABIO.cc:224
ObjME metPhiME_
Definition: TopMonitor.h:140
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
unsigned int njets_
Definition: TopMonitor.h:251
MonitorElement * denominator
std::vector< ObjME > bjetPt_
Definition: TopMonitor.h:205
bool enableMETplot_
Definition: TopMonitor.h:283
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
ObjME jetMulti_
Definition: TopMonitor.h:153
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
StringCutObjectSelector< reco::PFJet, true > HTdefinition_
Definition: TopMonitor.h:244
std::vector< double > invMass_mumu_variable_binning_
Definition: TopMonitor.h:123
vector< PseudoJet > jets
std::vector< double > MHT_variable_binning_
Definition: TopMonitor.h:124
bool usePVcuts_
Definition: TopMonitor.h:265
ObjME invMass_mumu_variableBinning_
Definition: TopMonitor.h:173
std::vector< ObjME > muEtaPhi_
Definition: TopMonitor.h:227
edm::EDGetTokenT< edm::View< reco::GsfElectron > > eleToken_
Definition: TopMonitor.h:85
std::vector< ObjME > jetEta_
Definition: TopMonitor.h:194
unsigned int nelectrons_
Definition: TopMonitor.h:252
def pv(vc)
Definition: MetAnalyzer.py:7
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< ObjME > phoEtaPhi_
Definition: TopMonitor.h:230
edm::EDGetTokenT< reco::PhotonCollection > phoToken_
Definition: TopMonitor.h:88
unsigned int nmuons_
Definition: TopMonitor.h:253
ObjME bjetMulti_
Definition: TopMonitor.h:159
ObjME eleVsLS_
Definition: TopMonitor.h:144
std::vector< double > met_variable_binning_
Definition: TopMonitor.h:114
std::vector< ObjME > jetPhi_
Definition: TopMonitor.h:193
std::vector< ObjME > eleEta_
Definition: TopMonitor.h:190
std::vector< ObjME > muPtEta_
Definition: TopMonitor.h:226
const int mu
Definition: Constants.h:22
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool isValid() const
Definition: HandleBase.h:74
StringCutObjectSelector< reco::Muon, true > muoSelection_
Definition: TopMonitor.h:242
bool applyMETcut_
Definition: TopMonitor.h:267
std::vector< double > jetPt_variable_binning_2D_
Definition: TopMonitor.h:127
double MHTcut_
Definition: TopMonitor.h:274
std::vector< double > HT_variable_binning_2D_
Definition: TopMonitor.h:126
MEbinning MHT_binning_
Definition: TopMonitor.h:111
std::vector< double > phi_variable_binning_2D_
Definition: TopMonitor.h:135
std::vector< ObjME > jetPt_
Definition: TopMonitor.h:195
double HTcut_
Definition: TopMonitor.h:258
std::vector< ObjME > eleEta_variableBinning_
Definition: TopMonitor.h:215
ObjME elePt_muPt_
Definition: TopMonitor.h:168
std::vector< ObjME > elePhi_
Definition: TopMonitor.h:189
std::vector< double > jetEta_variable_binning_2D_
Definition: TopMonitor.h:131
ObjME invMass_mumu_
Definition: TopMonitor.h:171
std::vector< ObjME > bjetEta_variableBinning_
Definition: TopMonitor.h:218
std::vector< double > muPt_variable_binning_2D_
Definition: TopMonitor.h:128
StringCutObjectSelector< reco::MET, true > metSelection_
Definition: TopMonitor.h:239
StringCutObjectSelector< reco::PFJet, true > MHTdefinition_
Definition: TopMonitor.h:273
def ls(path, rec=False)
Definition: eostools.py:349
StringCutObjectSelector< reco::Photon, true > phoSelection_
Definition: TopMonitor.h:243
unsigned int nbjets_
Definition: TopMonitor.h:260
std::map< edm::RefToBase< reco::Jet >, float, JetRefCompare > JetTagMap
Definition: TopMonitor.h:74
ObjME phoMulti_
Definition: TopMonitor.h:157
T const * product() const
Definition: Handle.h:74
primaryVertices
Definition: jets_cff.py:26
met
===> hadronic RAZOR
std::vector< ObjME > elePt_
Definition: TopMonitor.h:191
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: TopMonitor.cc:161
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
Definition: TopMonitor.h:241
std::vector< ObjME > bjetEtaPhi_
Definition: TopMonitor.h:233
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
ObjME htVsLS_
Definition: TopMonitor.h:149
std::vector< ObjME > phoPt_
Definition: TopMonitor.h:199
std::vector< double > elePt_variable_binning_
Definition: TopMonitor.h:118
void add(std::string const &label, ParameterSetDescription const &psetDescription)
def remove(d, key, TELL=False)
Definition: MatrixUtil.py:212
MEbinning csv_binning_
Definition: TopMonitor.h:108
double workingpoint_
Definition: TopMonitor.h:261
ObjME mu1Eta_mu2Eta_
Definition: TopMonitor.h:167
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: TopMonitor.cc:1045
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: TopMonitor.h:237
double invMassUppercut_
Definition: TopMonitor.h:270
std::vector< ObjME > bjetEta_
Definition: TopMonitor.h:204
edm::EventID id() const
Definition: EventBase.h:59
std::vector< PFJet > PFJetCollection
collection of PFJet objects
fixed size matrix
HLT enums.
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
Definition: TopMonitor.cc:540
MEbinning DR_binning_
Definition: TopMonitor.h:106
std::vector< ObjME > phoPtEta_
Definition: TopMonitor.h:229
ObjME muPt_phoPt_
Definition: TopMonitor.h:176
std::vector< ObjME > elePtEta_
Definition: TopMonitor.h:224
bool opsign_
Definition: TopMonitor.h:272
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
Definition: TopMonitor.h:84
MEbinning phi_binning_
Definition: TopMonitor.h:102
MEbinning eta_binning_
Definition: TopMonitor.h:104
edm::EDGetTokenT< edm::ValueMap< bool > > elecIDToken_
Definition: TopMonitor.h:86
ObjME eleMulti_
Definition: TopMonitor.h:154
std::vector< double > phoEta_variable_binning_2D_
Definition: TopMonitor.h:134
double mll
Definition: TopMonitor.h:275
double leptJetDeltaRmin_
Definition: TopMonitor.h:255
std::vector< double > muEta_variable_binning_2D_
Definition: TopMonitor.h:132
MEbinning ls_binning_
Definition: TopMonitor.h:101
double phi() const final
momentum azimuthal angle
std::vector< double > eleEta_variable_binning_2D_
Definition: TopMonitor.h:133
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: TopMonitor.h:236
std::vector< ObjME > phoPhi_
Definition: TopMonitor.h:197
double invMassLowercut_
Definition: TopMonitor.h:271
~TopMonitor() override
Definition: TopMonitor.cc:155
MEbinning pt_binning_
Definition: TopMonitor.h:103
void bookME(DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, unsigned nbins, double xmin, double xmax)
Definition: Run.h:45
size_type size() const
std::vector< double > phoPt_variable_binning_2D_
Definition: TopMonitor.h:130
ObjME eventHT_variableBinning_
Definition: TopMonitor.h:183
std::vector< ObjME > muEta_variableBinning_
Definition: TopMonitor.h:214
std::vector< ObjME > bjetPhi_
Definition: TopMonitor.h:203
std::vector< double > eleEta_variable_binning_
Definition: TopMonitor.h:121
ObjME eventHT_
Definition: TopMonitor.h:182
Collection of PF MET.