CMS 3D CMS Logo

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