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