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