CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SingleTopTChannelLeptonDQM.cc
Go to the documentation of this file.
1 
11 #include <iostream>
12 using namespace std;
13 namespace SingleTopTChannelLepton {
14 
15  // maximal number of leading jets
16  // to be used for top mass estimate
17  static const unsigned int MAXJETS = 4;
18  // nominal mass of the W boson to
19  // be used for the top mass estimate
20  static const double WMASS = 80.4;
21 
22  MonitorEnsemble::MonitorEnsemble(const char* label, const edm::ParameterSet& cfg, const edm::VParameterSet& vcfg) :
23  label_(label), pvSelect_(0), jetIDSelect_(0), includeBTag_(false), lowerEdge_(-1.), upperEdge_(-1.), logged_(0)
24 
25  {
26  // sources have to be given; this PSet is not optional
27  edm::ParameterSet sources=cfg.getParameter<edm::ParameterSet>("sources");
28  muons_ = sources.getParameter<edm::InputTag>("muons");
29  elecs_gsf_ = sources.getParameter<edm::InputTag>("elecs_gsf");
30  elecs_ = sources.getParameter<edm::InputTag>("elecs");
31  jets_ = sources.getParameter<edm::InputTag>("jets" );
32  mets_ = sources.getParameter<std::vector<edm::InputTag> >("mets" );
33  pvs_ = sources.getParameter<edm::InputTag>("pvs" );
34  // electronExtras are optional; they may be omitted or
35  // empty
36  if( cfg.existsAs<edm::ParameterSet>("elecExtras") ){
37  edm::ParameterSet elecExtras=cfg.getParameter<edm::ParameterSet>("elecExtras");
38  // select is optional; in case it's not found no
39  // selection will be applied
40  if( elecExtras.existsAs<std::string>("select") ){
41  // elecSelect_= new StringCutObjectSelector<reco::GsfElectron>(elecExtras.getParameter<std::string>("select"));
42  elecSelect_ = vcfg[1].getParameter<std::string>("select");
43  }
44  // isolation is optional; in case it's not found no
45  // isolation will be applied
46  if( elecExtras.existsAs<std::string>("isolation") ){
47  //elecIso_= new StringCutObjectSelector<reco::GsfElectron>(elecExtras.getParameter<std::string>("isolation"));
48  elecIso_= elecExtras.getParameter<std::string>("isolation");
49  }
50  // electronId is optional; in case it's not found the
51  // InputTag will remain empty
52  edm::ParameterSet elecId=vcfg[1].getParameter<edm::ParameterSet>("electronId");
53  electronId_= elecId.getParameter<edm::InputTag>("src");
54  eidPattern_= elecId.getParameter<int>("pattern");
55 
56  }
57  // pvExtras are opetional; they may be omitted or empty
58  if(cfg.existsAs<edm::ParameterSet>("pvExtras")){
59  edm::ParameterSet pvExtras=cfg.getParameter<edm::ParameterSet>("pvExtras");
60  // select is optional; in case it's not found no
61  // selection will be applied
62  if( pvExtras.existsAs<std::string>("select") ){
64  }
65  }
66  // muonExtras are optional; they may be omitted or empty
67  if( cfg.existsAs<edm::ParameterSet>("muonExtras")){ // && vcfg.existsAs<std::vector<edm::ParameterSet> >("selection")){
68  edm::ParameterSet muonExtras=cfg.getParameter<edm::ParameterSet>("muonExtras");
69 
70  // select is optional; in case it's not found no
71  // selection will be applied
72  if( muonExtras.existsAs<std::string>("select") ){
73  // muonSelect_= new StringCutObjectSelector<reco::Muon>(muonExtras.getParameter<std::string>("select"));
74  // muonSelect_= muonExtras.getParameter<std::string>("select");
75  muonSelect_ = vcfg[1].getParameter<std::string>("select");
76  }
77  // isolation is optional; in case it's not found no
78  // isolation will be applied
79  if( muonExtras.existsAs<std::string>("isolation") ){
80  // muonIso_= new StringCutObjectSelector<reco::Muon>(muonExtras.getParameter<std::string>("isolation"));
81  muonIso_= muonExtras.getParameter<std::string>("isolation");
82  }
83  }
84 
85  // jetExtras are optional; they may be omitted or
86  // empty
87  if( cfg.existsAs<edm::ParameterSet>("jetExtras") ){
88  edm::ParameterSet jetExtras=cfg.getParameter<edm::ParameterSet>("jetExtras");
89  // jetCorrector is optional; in case it's not found
90  // the InputTag will remain empty
91  if( jetExtras.existsAs<std::string>("jetCorrector") ){
92  jetCorrector_= jetExtras.getParameter<std::string>("jetCorrector");
93  }
94  // read jetID information if it exists
95  if(jetExtras.existsAs<edm::ParameterSet>("jetID")){
97  jetIDLabel_ =jetID.getParameter<edm::InputTag>("label");
99  }
100  // select is optional; in case it's not found no
101  // selection will be applied (only implemented for
102  // CaloJets at the moment)
103  if( jetExtras.existsAs<std::string>("select") ){
104 
105  jetSelect_= jetExtras.getParameter<std::string>("select");
106  jetSelect_ = vcfg[2].getParameter<std::string>("select");
107  }
108  // jetBDiscriminators are optional; in case they are
109  // not found the InputTag will remain empty; they
110  // consist of pairs of edm::JetFlavorAssociation's &
111  // corresponding working points
112  includeBTag_=jetExtras.existsAs<edm::ParameterSet>("jetBTaggers");
113  if( includeBTag_ ){
114  edm::ParameterSet btagEff=jetExtras.getParameter<edm::ParameterSet>("jetBTaggers").getParameter<edm::ParameterSet>("trackCountingEff");
115  btagEff_= btagEff.getParameter<edm::InputTag>("label"); btagEffWP_= btagEff.getParameter<double>("workingPoint");
116  edm::ParameterSet btagPur=jetExtras.getParameter<edm::ParameterSet>("jetBTaggers").getParameter<edm::ParameterSet>("trackCountingPur");
117  btagPur_= btagPur.getParameter<edm::InputTag>("label"); btagPurWP_= btagPur.getParameter<double>("workingPoint");
118  edm::ParameterSet btagVtx=jetExtras.getParameter<edm::ParameterSet>("jetBTaggers").getParameter<edm::ParameterSet>("secondaryVertex" );
119  btagVtx_= btagVtx.getParameter<edm::InputTag>("label"); btagVtxWP_= btagVtx.getParameter<double>("workingPoint");
120  edm::ParameterSet btagCombVtx=jetExtras.getParameter<edm::ParameterSet>("jetBTaggers").getParameter<edm::ParameterSet>("combinedSecondaryVertex" );
121  btagCombVtx_= btagCombVtx.getParameter<edm::InputTag>("label"); btagCombVtxWP_= btagCombVtx.getParameter<double>("workingPoint");
122  }
123  }
124 
125  // triggerExtras are optional; they may be omitted or empty
126  if( cfg.existsAs<edm::ParameterSet>("triggerExtras") ){
127  edm::ParameterSet triggerExtras=cfg.getParameter<edm::ParameterSet>("triggerExtras");
128  triggerTable_=triggerExtras.getParameter<edm::InputTag>("src");
129  triggerPaths_=triggerExtras.getParameter<std::vector<std::string> >("paths");
130  }
131 
132  // massExtras is optional; in case it's not found no mass
133  // window cuts are applied for the same flavor monitor
134  // histograms
135  if( cfg.existsAs<edm::ParameterSet>("massExtras") ){
136  edm::ParameterSet massExtras=cfg.getParameter<edm::ParameterSet>("massExtras");
137  lowerEdge_= massExtras.getParameter<double>("lowerEdge");
138  upperEdge_= massExtras.getParameter<double>("upperEdge");
139  }
140 
141  // setup the verbosity level for booking histograms;
142  // per default the verbosity level will be set to
143  // STANDARD. This will also be the chosen level in
144  // the case when the monitoring PSet is not found
146  if( cfg.existsAs<edm::ParameterSet>("monitoring") ){
147  edm::ParameterSet monitoring=cfg.getParameter<edm::ParameterSet>("monitoring");
148  if(monitoring.getParameter<std::string>("verbosity") == "DEBUG" )
149  verbosity_= DEBUG;
150  if(monitoring.getParameter<std::string>("verbosity") == "VERBOSE" )
152  if(monitoring.getParameter<std::string>("verbosity") == "STANDARD")
154  }
155  // and don't forget to do the histogram booking
156  book(cfg.getParameter<std::string>("directory"));
157  }
158 
159  void
161  {
162  //set up the current directory path
163  std::string current(directory); current+=label_;
165  store_->setCurrentFolder(current);
166 
167  // determine number of bins for trigger monitoring
168  unsigned int nPaths=triggerPaths_.size();
169 
170  // --- [STANDARD] --- //
171  // number of selected primary vertices
172  hists_["pvMult_" ] = store_->book1D("PvMult" , "N_{pvs}" , 100, 0., 100.);
173  // pt of the leading muon
174  hists_["muonPt_" ] = store_->book1D("MuonPt" , "pt(#mu)" , 50, 0., 250.);
175  // muon multiplicity before std isolation
176  hists_["muonMult_" ] = store_->book1D("MuonMult" , "N_{20}(#mu)" , 10, 0., 10.);
177  // muon multiplicity after std isolation
178  hists_["muonMultIso_"] = store_->book1D("MuonMultIso", "N_{Iso}(#mu)" , 10, 0., 10.);
179  // pt of the leading electron
180  hists_["elecPt_" ] = store_->book1D("ElecPt" , "pt(e)" , 50, 0., 250.);
181  // electron multiplicity before std isolation
182  hists_["elecMult_" ] = store_->book1D("ElecMult" , "N_{30}(e)" , 10, 0., 10.);
183  // electron multiplicity after std isolation
184  hists_["elecMultIso_"] = store_->book1D("ElecMultIso", "N_{Iso}(e)" , 10, 0., 10.);
185  // multiplicity of jets with pt>20 (corrected to L2+L3)
186  hists_["jetMult_" ] = store_->book1D("JetMult" , "N_{30}(jet)" , 10, 0., 10.);
187  // trigger efficiency estimates for single lepton triggers
188  hists_["triggerEff_" ] = store_->book1D("TriggerEff" , "Eff(trigger)" , nPaths, 0., nPaths);
189  // monitored trigger occupancy for single lepton triggers
190  hists_["triggerMon_" ] = store_->book1D("TriggerMon" , "Mon(trigger)" , nPaths, 0., nPaths);
191  // MET (calo)
192  hists_["metCalo_" ] = store_->book1D("METCalo" , "MET_{Calo}" , 50, 0., 200.);
193  // W mass estimate
194  hists_["massW_" ] = store_->book1D("MassW" , "M(W)" , 60, 0., 300.);
195  // Top mass estimate
196  hists_["massTop_" ] = store_->book1D("MassTop" , "M(Top)" , 50, 0., 500.);
197  // W mass transverse estimate mu
198  hists_["MTWm_" ] = store_->book1D("MTWm" , "M_{T}^{W}(#mu)" , 60, 0., 300.);
199  // Top mass transverse estimate mu
200  hists_["mMTT_" ] = store_->book1D("mMTT" , "M_{T}^{t}(#mu)" , 50, 0., 500.);
201 
202  // W mass transverse estimate e
203  hists_["MTWe_" ] = store_->book1D("MTWe" , "M_{T}^{W}(e)" , 60, 0., 300.);
204  // Top mass transverse estimate e
205  hists_["eMTT_" ] = store_->book1D("eMTT" , "M_{T}^{t}(e)" , 50, 0., 500.);
206 
207  // set bin labels for trigger monitoring
209 
210  if( verbosity_==STANDARD) return;
211 
212  // --- [VERBOSE] --- //
213 
214  // eta of the leading muon
215  hists_["muonEta_" ] = store_->book1D("MuonEta" , "#eta(#mu)" , 30, -3., 3.);
216  // std isolation variable of the leading muon
217  hists_["muonPFRelIso_" ] = store_->book1D("MuonPFRelIso","PFIso_{Rel}(#mu)", 50, 0., 1.);
218  hists_["muonRelIso_" ] = store_->book1D("MuonRelIso" , "Iso_{Rel}(#mu)" , 50, 0., 1.);
219 
220  // eta of the leading electron
221  hists_["elecEta_" ] = store_->book1D("ElecEta" , "#eta(e)" , 30, -3., 3.);
222  // std isolation variable of the leading electron
223  hists_["elecRelIso_" ] = store_->book1D("ElecRelIso" , "Iso_{Rel}(e)" , 50, 0., 1.);
224  hists_["elecPFRelIso_" ] = store_->book1D("ElecPFRelIso" , "PFIso_{Rel}(e)", 50, 0., 1.);
225 
226  // multiplicity of btagged jets (for track counting high efficiency) with pt(L2L3)>30
227  hists_["jetMultBEff_"] = store_->book1D("JetMultBEff", "N_{30}(b/eff)" , 10, 0., 10.);
228  // btag discriminator for track counting high efficiency for jets with pt(L2L3)>30
229  hists_["jetBDiscEff_"] = store_->book1D("JetBDiscEff", "Disc_{b/eff}(jet)", 100, 0., 10.);
230 
231 
232  // eta of the 1. leading jet
233  hists_["jet1Eta_" ] = store_->book1D("Jet1Eta" , "#eta (jet1)" , 50, -5., 5.);
234  // eta of the 2. leading jet
235  hists_["jet2Eta_" ] = store_->book1D("Jet2Eta" , "#eta (jet2)" , 50, -5., 5.);
236 
237  // pt of the 1. leading jet (corrected to L2+L3)
238  hists_["jet1Pt_" ] = store_->book1D("Jet1Pt" , "pt_{L2L3}(jet1)" , 60, 0., 300.);
239  // pt of the 2. leading jet (corrected to L2+L3)
240  hists_["jet2Pt_" ] = store_->book1D("Jet2Pt" , "pt_{L2L3}(jet2)" , 60, 0., 300.);
241 
242 
243  // eta and pt of the b-tagged jet (filled only when nJets==2)
244  hists_["TaggedJetEta_" ] = store_->book1D("TaggedJetEta" , "#eta (Tagged jet)" , 50, -5., 5.);
245  hists_["TaggedJetPt_" ] = store_->book1D("TaggedJetPt" , "pt_{L2L3}(Tagged jet)" , 60, 0., 300.);
246 
247  // eta and pt of the jet not passing b-tag (filled only when nJets==2)
248  hists_["UnTaggedJetEta_" ] = store_->book1D("UnTaggedJetEta" , "#eta (UnTagged jet)" , 50, -5., 5.);
249  hists_["UnTaggedJetPt_" ] = store_->book1D("UnTaggedJetPt" , "pt_{L2L3}(UnTagged jet)" , 60, 0., 300.);
250 
251  // eta and pt of the most forward jet in the event with nJets==2
252  hists_["FwdJetEta_" ] = store_->book1D("FwdJetEta" , "#eta (Fwd jet)" , 50, -5., 5.);
253  hists_["FwdJetPt_" ] = store_->book1D("FwdJetPt" , "pt_{L2L3}(Fwd jet)" , 60, 0., 300.);
254 
255 
256  // 2D histogram (pt,eta) of the b-tagged jet (filled only when nJets==2)
257  hists_["TaggedJetPtEta_" ] = store_->book2D("TaggedJetPt_Eta" , "(pt vs #eta)_{L2L3}(Tagged jet)" , 60, 0., 300., 50, -5., 5.);
258 
259  // 2D histogram (pt,eta) of the not-b tagged jet (filled only when nJets==2)
260  hists_["UnTaggedJetPtEta_" ] = store_->book2D("UnTaggedJetPt_Eta" , "(pt vs #eta)_{L2L3}(UnTagged jet)" , 60, 0., 300., 50, -5., 5.);
261 
262 
263 
264  // MET (tc)
265  hists_["metTC_" ] = store_->book1D("METTC" , "MET_{TC}" , 50, 0., 200.);
266  // MET (pflow)
267  hists_["metPflow_" ] = store_->book1D("METPflow" , "MET_{Pflow}" , 50, 0., 200.);
268 
269  // dz for muons (to suppress cosmis)
270  hists_["muonDelZ_" ] = store_->book1D("MuonDelZ" , "d_{z}(#mu)" , 50, -25., 25.);
271  // dxy for muons (to suppress cosmics)
272  hists_["muonDelXY_" ] = store_->book2D("MuonDelXY" , "d_{xy}(#mu)" , 50, -0.1, 0.1, 50, -0.1, 0.1);
273 
274  // set axes titles for dxy for muons
275  hists_["muonDelXY_" ]->setAxisTitle( "x [cm]", 1); hists_["muonDelXY_" ]->setAxisTitle( "y [cm]", 2);
276 
277  if( verbosity_==VERBOSE) return;
278 
279  // --- [DEBUG] --- //
280 
281  // relative muon isolation from charged hadrons for the leading muon
282  hists_["muonChHadIso_" ] = store_->book1D("MuonChHadIso" , "Iso_{ChHad}(#mu)" , 100, 0., 1.);
283  // relative muon isolation from neutral hadrons for the leading muon
284  hists_["muonNeuHadIso_" ] = store_->book1D("MuonNeuHadIso" , "Iso_{NeuHad}(#mu)" , 100, 0., 1.);
285  // relative muon isolation from photons for the leading muon
286  hists_["muonPhIso_" ] = store_->book1D("MuonPhIso" , "Iso_{Ph}(#mu)" , 100, 0., 1.);
287 
288  // relative electron isolation from charged hadrons for the leading electron
289  hists_["elecChHadIso_" ] = store_->book1D("ElecChHadIso" , "Iso_{ChHad}(e)" , 100, 0., 1.);
290  // relative electron isolation from neutral hadrons for the leading electron
291  hists_["elecNeuHadIso_" ] = store_->book1D("ElecNeuHadIso" , "Iso_{NeuHad}(e)" , 100, 0., 1.);
292  // relative electron isolation from photons for the leading electron
293  hists_["elecPhIso_" ] = store_->book1D("ElecPhIso" , "Iso_{Ph}(e)" , 100, 0., 1.);
294 
295  // multiplicity of btagged jets (for track counting high purity) with pt(L2L3)>30
296  hists_["jetMultBPur_"] = store_->book1D("JetMultBPur", "N_{30}(b/pur)" , 10, 0., 10.);
297  // btag discriminator for track counting high purity
298  hists_["jetBDiscPur_"] = store_->book1D("JetBDiscPur", "Disc_{b/pur}(Jet)", 200, -10., 10.);
299  // btag discriminator for track counting high purity for 1. leading jet
300  hists_["jet1BDiscPur_"] = store_->book1D("Jet1BDiscPur", "Disc_{b/pur}(Jet1)", 200, -10., 10.);
301  // btag discriminator for track counting high purity for 2. leading jet
302  hists_["jet2BDiscPur_"] = store_->book1D("Jet2BDiscPur", "Disc_{b/pur}(Jet2)", 200, -10., 10.);
303 
304 
305  // multiplicity of btagged jets (for simple secondary vertex) with pt(L2L3)>30
306  hists_["jetMultBVtx_"] = store_->book1D("JetMultBVtx", "N_{30}(b/vtx)" , 10, 0., 10.);
307  // btag discriminator for simple secondary vertex
308  hists_["jetBDiscVtx_"] = store_->book1D("JetBDiscVtx", "Disc_{b/vtx}(Jet)", 35, -1., 6.);
309 
310 
311  // multiplicity of btagged jets (for combined secondary vertex) with pt(L2L3)>30
312  hists_["jetMultBCombVtx_"] = store_->book1D("JetMultBCombVtx", "N_{30}(b/CSV)" , 10, 0., 10.);
313  // btag discriminator for combined secondary vertex
314  hists_["jetBDiscCombVtx_"] = store_->book1D("JetBDiscCombVtx", "Disc_{b/CSV}(Jet)", 60, -1., 2.);
315  // btag discriminator for combined secondary vertex for 1. leading jet
316  hists_["jet1BDiscCombVtx_"] = store_->book1D("Jet1BDiscCombVtx", "Disc_{b/CSV}(Jet1)", 60, -1., 2.);
317  // btag discriminator for combined secondary vertex for 2. leading jet
318  hists_["jet2BDiscCombVtx_"] = store_->book1D("Jet2BDiscCombVtx", "Disc_{b/CSV}(Jet2)", 60, -1., 2.);
319 
320 
321  // pt of the 1. leading jet (uncorrected)
322  hists_["jet1PtRaw_" ] = store_->book1D("Jet1PtRaw" , "pt_{Raw}(jet1)" , 60, 0., 300.);
323  // pt of the 2. leading jet (uncorrected)
324  hists_["jet2PtRaw_" ] = store_->book1D("Jet2PtRaw" , "pt_{Raw}(jet2)" , 60, 0., 300.);
325 
326  // selected events
327  hists_["eventLogger_"] = store_->book2D("EventLogger", "Logged Events" , 9, 0., 9., 10, 0., 10.);
328 
329  // set axes titles for selected events
330  hists_["eventLogger_"]->getTH1()->SetOption("TEXT");
331  hists_["eventLogger_"]->setBinLabel( 1 , "Run" , 1);
332  hists_["eventLogger_"]->setBinLabel( 2 , "Block" , 1);
333  hists_["eventLogger_"]->setBinLabel( 3 , "Event" , 1);
334  hists_["eventLogger_"]->setBinLabel( 4 , "pt_{L2L3}(jet1)" , 1);
335  hists_["eventLogger_"]->setBinLabel( 5 , "pt_{L2L3}(jet2)" , 1);
336  hists_["eventLogger_"]->setBinLabel( 6 , "pt_{L2L3}(jet3)" , 1);
337  hists_["eventLogger_"]->setBinLabel( 7 , "pt_{L2L3}(jet4)" , 1);
338  hists_["eventLogger_"]->setBinLabel( 8 , "M_{W}" , 1);
339  hists_["eventLogger_"]->setBinLabel( 9 , "M_{Top}" , 1);
340  hists_["eventLogger_"]->setAxisTitle("logged evts" , 2);
341  return;
342  }
343 
344  void
346  {
347  // fetch trigger event if configured such
349  if(!triggerTable_.label().empty()) {
350  if( !event.getByLabel(triggerTable_, triggerTable) ) return;
351  }
352 
353  /*
354  ------------------------------------------------------------
355 
356  Primary Vertex Monitoring
357 
358  ------------------------------------------------------------
359  */
360 
361  // fill monitoring plots for primary vertices
363  if( !event.getByLabel(pvs_, pvs) ) return;
364  unsigned int pvMult = 0;
365  for(edm::View<reco::Vertex>::const_iterator pv=pvs->begin(); pv!=pvs->end(); ++pv){
366  if(!pvSelect_ || (*pvSelect_)(*pv))
367  pvMult++;
368  }
369 
370  fill("pvMult_", pvMult );
371 
372  /*
373  ------------------------------------------------------------
374 
375  Electron Monitoring
376 
377  ------------------------------------------------------------
378  */
379 
381  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
382  if( !event.getByLabel("offlineBeamSpot",recoBeamSpotHandle)) return;
383  beamSpot = *recoBeamSpotHandle;
384 
385 
386  // fill monitoring plots for electrons
388 
394 
395 
396  if( !event.getByLabel(elecs_, elecs) ) return;
397  if( !event.getByLabel(elecs_gsf_, elecs_gsf) ) return;
398 
399  // check availability of electron id
400  edm::Handle<edm::ValueMap<float> > electronId;
401  if(!electronId_.label().empty())
402  if( !event.getByLabel(electronId_, electronId) ) return;
403 
404  // loop electron collection
405  unsigned int eMult=0, eMultIso=0;
406  std::vector<const reco::GsfElectron*> isoElecs;
408 
409 
410  unsigned int idx_gsf = 0;
411  for(elec_it=elecs->begin(); elec_it!=elecs->end(); ++elec_it){
412 
413  if(elec_it->gsfElectronRef().isNull()) continue ;
414 
415  reco::GsfElectronRef elec = elec_it->gsfElectronRef();
416  if(elec->gsfTrack().isNull()) continue ;
417 
418  // restrict to electrons with good electronId
419  int eID = 0;
420  if (!electronId_.label().empty())
421  eID = (int)(*electronId)[elecs_gsf->refAt(idx_gsf)];
422 
423  if( electronId_.label().empty() ? true : ( (eID & eidPattern_) && (eID >=5)) ){ // NEED TO CHECK
424 
425  if(!elecSelect || (*elecSelect)(*elec_it)){
426  double isolationRel = (elec->dr03TkSumPt()+elec->dr03EcalRecHitSumEt()+elec->dr03HcalTowerSumEt())/elec->pt();
427 
428  double isolationChHad = elec->pt()/(elec->pt()+elec->pfIsolationVariables().sumChargedHadronPt);
429  double isolationNeuHad = elec->pt()/(elec->pt()+elec->pfIsolationVariables().sumNeutralHadronEt);
430  double isolationPhoton = elec->pt()/(elec->pt()+elec->pfIsolationVariables().sumPhotonEt);
431  double PFisolationRel = (elec->pfIsolationVariables().sumChargedHadronPt+elec->pfIsolationVariables().sumNeutralHadronEt+elec->pfIsolationVariables().sumPhotonEt)/elec->pt();
432 
433  if( eMult==0 ){
434  // restrict to the leading electron
435  fill("elecPt_" , elec->pt() );
436  fill("elecEta_", elec->eta());
437  fill("elecRelIso_" , isolationRel );
438  fill("elecPFRelIso_",PFisolationRel );
439  fill("elecChHadIso_" , isolationChHad );
440  fill("elecNeuHadIso_" , isolationNeuHad );
441  fill("elecPhIso_" , isolationPhoton );
442 
443  }
444  // in addition to the multiplicity counter buffer the iso
445  // electron candidates for later overlap check with jets
446  ++eMult; if( !elecIso || (*elecIso)(*elec_it)){ if(eMultIso == 0) e = *elec; isoElecs.push_back(&(*elec)); ++eMultIso; }
447  }
448  }
449  idx_gsf++;
450  }
451 
452  fill("elecMult_", eMult );
453  fill("elecMultIso_", eMultIso);
454 
455  /*
456  ------------------------------------------------------------
457 
458  Muon Monitoring
459 
460  ------------------------------------------------------------
461  */
462 
463  // fill monitoring plots for muons
464  unsigned int mMult=0, mMultIso=0;
465 
466 
472  reco::Muon mu;
473 
474  /*
475  if (muons_.label() == "muons"){
476  edm::Handle<edm::View<reco::Muon> > muons;
477  edm::View<reco::Muon>::const_iterator muon;
478  StringCutObjectSelector<reco::Muon> *muonSelect = new StringCutObjectSelector<reco::Muon>(muonSelect_);
479  StringCutObjectSelector<reco::Muon> *muonIso = new StringCutObjectSelector<reco::Muon>(muonIso_);
480  }
481  */
482 
483  if( !event.getByLabel(muons_, muons )) return;
484 
485 
486  for(muonit = muons->begin(); muonit != muons->end(); ++muonit){ // for now, to use Reco::Muon need to substitute muonit with muon
487  // and comment the MuonRef and PFCandidate parts
488 
489  // if (muonit->particleId() != reco::PFCandidate::mu) continue;
490  if(muonit->muonRef().isNull()) continue ;
491  reco::MuonRef muon = muonit->muonRef();
492 
493  if(muon->innerTrack().isNull()) continue ;
494 
495  // double impact_parameter = muon->innerTrack()->dxy(beamSpot.position());
496  // if (abs(impact_parameter) > 0.02) continue;
497 
498 
499  // restrict to globalMuons
500  if( muon->isGlobalMuon() ){
501  fill("muonDelZ_" , muon->globalTrack()->vz());
502  fill("muonDelXY_", muon->globalTrack()->vx(), muon->globalTrack()->vy());
503 
504  // apply selection
505  if( !muonSelect || (*muonSelect)(*muonit)) {
506 
507  // if ((muon->pt() == 0. )&&( muon->eta() == 0.)) continue;
508 
509  double isolationRel = (muon->isolationR03().sumPt+muon->isolationR03().emEt+muon->isolationR03().hadEt)/muon->pt();
510  double isolationChHad = muon->pt()/(muon->pt()+muon->pfIsolationR04().sumChargedHadronPt);
511  double isolationNeuHad = muon->pt()/(muon->pt()+muon->pfIsolationR04().sumNeutralHadronEt);
512  double isolationPhoton = muon->pt()/(muon->pt()+muon->pfIsolationR04().sumPhotonEt);
513  double PFisolationRel = (muon->pfIsolationR04().sumChargedHadronPt + muon->pfIsolationR04().sumNeutralHadronEt + muon->pfIsolationR04().sumPhotonEt)/muon->pt();
514 
515 
516 
517  if( mMult==0 ){
518  // cout << "BEFORE Muon - PFRelIso: " << (muon->pfIsolationR04().sumChargedHadronPt +
519  // muon->pfIsolationR04().sumNeutralHadronEt + muon->pfIsolationR04().sumPhotonEt)/muon->pt()
520  // << " pt: " << muon->pt() << endl;
521  // restrict to leading muon
522  fill("muonPt_" , muon->pt() );
523  fill("muonEta_" , muon->eta());
524  fill("muonRelIso_" , isolationRel );
525  fill("muonChHadIso_" , isolationChHad );
526  fill("muonNeuHadIso_" , isolationNeuHad );
527  fill("muonPhIso_" , isolationPhoton );
528  fill("muonPFRelIso_" , PFisolationRel );
529 
530  }
531  ++mMult;
532 
533  if( !muonIso || (*muonIso)(*muonit)) {if(mMultIso == 0) mu = *muon; ++mMultIso;}
534  }
535  }
536  }
537 
538  fill("muonMult_", mMult );
539  fill("muonMultIso_", mMultIso);
540 
541 
542  /*
543  ------------------------------------------------------------
544 
545  Jet Monitoring
546 
547  ------------------------------------------------------------
548  */
549 
550  // check availability of the btaggers
551  edm::Handle<reco::JetTagCollection> btagEff, btagPur, btagVtx, btagCombVtx;
552  if( includeBTag_ ){
553  if( !event.getByLabel(btagEff_, btagEff) ) return;
554  if( !event.getByLabel(btagPur_, btagPur) ) return;
555  if( !event.getByLabel(btagVtx_, btagVtx) ) return;
556  if( !event.getByLabel(btagCombVtx_, btagCombVtx) ) return;
557  }
558  // load jet corrector if configured such
559  const JetCorrector* corrector=0;
560  if(!jetCorrector_.empty()){
561  // check whether a jet correcto is in the event setup or not
562  if(setup.find( edm::eventsetup::EventSetupRecordKey::makeKey<JetCorrectionsRecord>() )){
563  corrector = JetCorrector::getJetCorrector(jetCorrector_, setup);
564  }
565  else{
566  edm::LogVerbatim( "SingleTopTChannelLeptonDQM" )
567  << "\n"
568  << "------------------------------------------------------------------------------------- \n"
569  << " No JetCorrectionsRecord available from EventSetup: \n"
570  << " - Jets will not be corrected. \n"
571  << " - If you want to change this add the following lines to your cfg file: \n"
572  << " \n"
573  << " ## load jet corrections \n"
574  << " process.load(\"JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff\") \n"
575  << " process.prefer(\"ak5CaloL2L3\") \n"
576  << " \n"
577  << "------------------------------------------------------------------------------------- \n";
578  }
579  }
580 
581  // loop jet collection
582  std::vector<reco::Jet> correctedJets;
583  unsigned int mult=0, multBEff=0, multBPur=0, multNoBPur=0, multBVtx=0, multBCombVtx=0;
584 
586  if( !event.getByLabel(jets_, jets) ) return;
587 
589  if(jetIDSelect_){
590  if( !event.getByLabel(jetIDLabel_, jetID) ) return;
591  }
592 
593  vector<double> bJetDiscVal;
594  vector<double> NobJetDiscVal;
595  reco::Jet TaggedJetCand;
596  reco::Jet UnTaggedJetCand;
597  reco::Jet FwdJetCand;
598  for(edm::View<reco::Jet>::const_iterator jet=jets->begin(); jet!=jets->end(); ++jet){
599  // check jetID for calo jets
600  unsigned int idx = jet-jets->begin();
601  if(dynamic_cast<const reco::CaloJet*>(&*jet)){
602  if( jetIDSelect_ && dynamic_cast<const reco::CaloJet*>(jets->refAt(idx).get())){
603  if(!(*jetIDSelect_)((*jetID)[jets->refAt(idx)])) continue;
604  }
605  }
606 
607  // check additional jet selection for calo, pf and bare reco jets
608  if(dynamic_cast<const reco::CaloJet*>(&*jet)){
609  reco::CaloJet sel = dynamic_cast<const reco::CaloJet&>(*jet); sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
611  if(!jetSelect(sel)){ continue;}
612  }
613  else if(dynamic_cast<const reco::PFJet*>(&*jet)){
614  reco::PFJet sel= dynamic_cast<const reco::PFJet&>(*jet); sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
616  if(!jetSelect(sel)) continue;
617  }
618  else{
619  reco::Jet sel = *jet; sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
621  if(!jetSelect(sel)) continue;
622  }
623 
624  // check for overlaps -- comment this to be synchronous with the selection
625  //bool overlap=false;
626  //for(std::vector<const reco::GsfElectron*>::const_iterator elec=isoElecs.begin(); elec!=isoElecs.end(); ++elec){
627  // if(reco::deltaR((*elec)->eta(), (*elec)->phi(), jet->eta(), jet->phi())<0.4){overlap=true; break;}
628  //} if(overlap){continue;}
629 
630 
631 
632  // prepare jet to fill monitor histograms
633  reco::Jet monitorJet = *jet; monitorJet.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
634  correctedJets.push_back(monitorJet);
635 
636 
637  ++mult; // determine jet multiplicity
638 
639  if( includeBTag_ ){
640  // fill b-discriminators
641  edm::RefToBase<reco::Jet> jetRef = jets->refAt(idx);
642  if( (*btagVtx)[jetRef]>btagVtxWP_ ) ++multBVtx;
643  if( (*btagCombVtx)[jetRef]>btagCombVtxWP_ ) ++multBCombVtx;
644  // cout << "btag: " << (*btagPur)[jetRef] << " jet eta: " << monitorJet.eta() << endl;
645  if( (*btagPur)[jetRef]>btagPurWP_ ){
646  if (multBPur == 0){
647  TaggedJetCand = monitorJet;
648  // TaggedJetCand = *jet;
649  bJetDiscVal.push_back((*btagPur)[jetRef]);
650 
651  }
652  else if (multBPur == 1){
653  bJetDiscVal.push_back((*btagPur)[jetRef]);
654  if (bJetDiscVal[1]>bJetDiscVal[0])
655  TaggedJetCand = monitorJet;
656  //TaggedJetCand = *jet;
657  }
658  ++multBPur;
659  }
660 
661  else{
662  if (multNoBPur == 0){
663  UnTaggedJetCand = monitorJet;
664  NobJetDiscVal.push_back((*btagPur)[jetRef]);
665 
666  }
667  else if (multNoBPur == 1){
668  NobJetDiscVal.push_back((*btagPur)[jetRef]);
669  if (NobJetDiscVal[1]<NobJetDiscVal[0])
670  UnTaggedJetCand = monitorJet;
671  }
672 
673  ++multNoBPur;
674  }
675 
676  if( (*btagEff)[jetRef]>btagEffWP_ ) ++multBEff;
677 
678 
679  if(mult==1) {
680  fill("jet1BDiscPur_", (*btagPur)[jetRef]);
681  fill("jet1BDiscCombVtx_", (*btagCombVtx)[jetRef]);
682  }
683 
684  else if(mult==2) {
685  fill("jet2BDiscPur_", (*btagPur)[jetRef]);
686  fill("jet2BDiscCombVtx_", (*btagCombVtx)[jetRef]);
687  }
688 
689  fill("jetBDiscEff_", (*btagEff)[jetRef]);
690  fill("jetBDiscPur_", (*btagPur)[jetRef]);
691  fill("jetBDiscVtx_", (*btagVtx)[jetRef]);
692  fill("jetBDiscCombVtx_", (*btagCombVtx)[jetRef]);
693 
694  }
695  // fill pt (raw or L2L3) for the leading jets
696  if(mult==1) {
697  fill("jet1Pt_" , monitorJet.pt());
698  fill("jet1Eta_", monitorJet.eta());
699  fill("jet1PtRaw_", jet->pt() );
700  FwdJetCand = monitorJet;
701 
702  }
703 
704  if(mult==2) {
705  fill("jet2Pt_" , monitorJet.pt());
706  fill("jet2Eta_", monitorJet.eta());
707  fill("jet2PtRaw_", jet->pt() );
708 
709  if ( abs(monitorJet.eta()) > abs(FwdJetCand.eta()) ){
710  FwdJetCand = monitorJet;
711  }
712 
713  fill("FwdJetPt_" , FwdJetCand.pt());
714  fill("FwdJetEta_", FwdJetCand.eta());
715 
716  }
717 
718 
719 
720  }
721 
722  if (multNoBPur == 1 && multBPur == 1){
723 
724  fill("TaggedJetPtEta_" , TaggedJetCand.pt(), TaggedJetCand.eta());
725  fill("UnTaggedJetPtEta_" , UnTaggedJetCand.pt(), UnTaggedJetCand.eta());
726 
727 
728  fill("TaggedJetPt_" , TaggedJetCand.pt());
729  fill("TaggedJetEta_", TaggedJetCand.eta());
730  fill("UnTaggedJetPt_" , UnTaggedJetCand.pt());
731  fill("UnTaggedJetEta_", UnTaggedJetCand.eta());
732  }
733 
734  fill("jetMult_" , mult );
735  fill("jetMultBEff_", multBEff);
736  fill("jetMultBPur_", multBPur);
737  fill("jetMultBVtx_", multBVtx);
738  fill("jetMultBCombVtx_", multBCombVtx);
739 
740  /*
741  ------------------------------------------------------------
742 
743  MET Monitoring
744 
745  ------------------------------------------------------------
746  */
747 
748  // fill monitoring histograms for met
749  reco::MET mET;
750  for(std::vector<edm::InputTag>::const_iterator met_=mets_.begin(); met_!=mets_.end(); ++met_){
752  if( !event.getByLabel(*met_, met) ) continue;
753  if(met->begin()!=met->end()){
754  unsigned int idx=met_-mets_.begin();
755  if(idx==0) { fill("metCalo_" , met->begin()->et()); }
756  if(idx==1) { fill("metTC_" , met->begin()->et()); }
757  if(idx==2) { fill("metPflow_", met->begin()->et()); mET = *(met->begin()); }
758  }
759  }
760 
761 
762 
763  /*
764  ------------------------------------------------------------
765 
766  Event Monitoring
767 
768  ------------------------------------------------------------
769  */
770 
771  // fill W boson and top mass estimates
772  Calculate eventKinematics(MAXJETS, WMASS);
773  double wMass = eventKinematics.massWBoson (correctedJets);
774  double topMass = eventKinematics.massTopQuark(correctedJets);
775  if(wMass>=0 && topMass>=0) {fill("massW_" , wMass ); fill("massTop_" , topMass);}
776  // fill plots for trigger monitoring
777  if((lowerEdge_==-1. && upperEdge_==-1.) || (lowerEdge_<wMass && wMass<upperEdge_) ){
778  if(!triggerTable_.label().empty()) fill(event, *triggerTable, "trigger", triggerPaths_);
779  if(logged_<=hists_.find("eventLogger_")->second->getNbinsY()){
780  // log runnumber, lumi block, event number & some
781  // more pysics infomation for interesting events
782  fill("eventLogger_", 0.5, logged_+0.5, event.eventAuxiliary().run());
783  fill("eventLogger_", 1.5, logged_+0.5, event.eventAuxiliary().luminosityBlock());
784  fill("eventLogger_", 2.5, logged_+0.5, event.eventAuxiliary().event());
785  if(correctedJets.size()>0) fill("eventLogger_", 3.5, logged_+0.5, correctedJets[0].pt());
786  if(correctedJets.size()>1) fill("eventLogger_", 4.5, logged_+0.5, correctedJets[1].pt());
787  if(correctedJets.size()>2) fill("eventLogger_", 5.5, logged_+0.5, correctedJets[2].pt());
788  if(correctedJets.size()>3) fill("eventLogger_", 6.5, logged_+0.5, correctedJets[3].pt());
789  fill("eventLogger_", 7.5, logged_+0.5, wMass );
790  fill("eventLogger_", 8.5, logged_+0.5, topMass);
791  ++logged_;
792  }
793  }
794 
795  if(multBPur != 0 && mMultIso == 1 ){
796 
797  double mtW = eventKinematics.tmassWBoson(&mu,mET,TaggedJetCand); fill("MTWm_",mtW);
798  double MTT = eventKinematics.tmassTopQuark(&mu,mET,TaggedJetCand); fill("mMTT_", MTT);
799 
800  }
801 
802  if(multBPur != 0 && eMultIso == 1 ){
803  double mtW = eventKinematics.tmassWBoson(&e,mET,TaggedJetCand); fill("MTWe_",mtW);
804  double MTT = eventKinematics.tmassTopQuark(&e,mET,TaggedJetCand); fill("eMTT_", MTT);
805  }
806 
807  }
808 
809 }
810 
811 
812 SingleTopTChannelLeptonDQM::SingleTopTChannelLeptonDQM(const edm::ParameterSet& cfg): triggerTable_(""), vertex_(""), vertexSelect_(0), beamspot_(""), beamspotSelect_(0)
813 {
814  // configure preselection
815  edm::ParameterSet presel=cfg.getParameter<edm::ParameterSet>("preselection");
816  if( presel.existsAs<edm::ParameterSet>("trigger") ){
817  edm::ParameterSet trigger=presel.getParameter<edm::ParameterSet>("trigger");
818  triggerTable_=trigger.getParameter<edm::InputTag>("src");
819  triggerPaths_=trigger.getParameter<std::vector<std::string> >("select");
820  }
821  if( presel.existsAs<edm::ParameterSet>("vertex" ) ){
822  edm::ParameterSet vertex=presel.getParameter<edm::ParameterSet>("vertex");
823  vertex_= vertex.getParameter<edm::InputTag>("src");
825  }
826  if( presel.existsAs<edm::ParameterSet>("beamspot" ) ){
827  edm::ParameterSet beamspot=presel.getParameter<edm::ParameterSet>("beamspot");
828  beamspot_= beamspot.getParameter<edm::InputTag>("src");
830  }
831  // conifgure the selection
832  std::vector<edm::ParameterSet> sel=cfg.getParameter<std::vector<edm::ParameterSet> >("selection");
833  for(unsigned int i=0; i<sel.size(); ++i){
834  selectionOrder_.push_back(sel.at(i).getParameter<std::string>("label"));
835  selection_[selectionStep(selectionOrder_.back())] = std::make_pair(sel.at(i), new SingleTopTChannelLepton::MonitorEnsemble(selectionStep(selectionOrder_.back()).c_str(), cfg.getParameter<edm::ParameterSet>("setup"), cfg.getParameter<std::vector<edm::ParameterSet> >("selection")));
836  }
837 }
838 
839 void
841 {
842  if(!triggerTable_.label().empty()){
844  if( !event.getByLabel(triggerTable_, triggerTable) ) return;
845  if(!accept(event, *triggerTable, triggerPaths_)) return;
846  }
847  //cout<<"trig passed"<<endl;
848  if(!beamspot_.label().empty()){
850  if( !event.getByLabel(beamspot_, beamspot) ) return;
851  if(!(*beamspotSelect_)(*beamspot)) return;
852  }
853 
854  if(!vertex_.label().empty()){
856  if( !event.getByLabel(vertex_, vertex) ) return;
857  edm::View<reco::Vertex>::const_iterator pv = vertex->begin();
858  //if ((pv->isFake()) || (pv->ndof() < 4) || (abs(pv->z())>24.) || (pv->position().Rho() > 2.0))
859  // cout << " pvs rho: " << pv->position().Rho() << " abs(z): " << abs(pv->z()) << " ndof: " << pv->ndof() << endl;
860  if(!(*vertexSelect_)(*pv)) return;
861  }
862 
863 
864  // apply selection steps
865  unsigned int passed=0;
866  for(std::vector<std::string>::const_iterator selIt=selectionOrder_.begin(); selIt!=selectionOrder_.end(); ++selIt){
867  std::string key = selectionStep(*selIt), type = objectType(*selIt);
868  if(selection_.find(key)!=selection_.end()){
869  if(type=="empty"){
870  selection_[key].second->fill(event, setup);
871  }
872  if(type=="presel" ){
873  // cout << "PRESELECTION" << endl;
874  selection_[key].second->fill(event, setup);
875  }
876  if(type=="elecs"){
878  if(step.select(event)){ ++passed;
879  selection_[key].second->fill(event, setup);
880  } else break;
881  }
882  if(type=="elecs/pf"){
884  if(step.select(event, "electron")){ ++passed;
885  selection_[key].second->fill(event, setup);
886  } else break;
887  }
888  if(type=="muons"){
890  if(step.select(event)){ ++passed;
891  selection_[key].second->fill(event, setup);
892  } else break;
893  }
894  if(type=="muons/pf"){
895  // cout << "MUON SELECTION" << endl;
897  if(step.select(event, "muon")){++passed;
898  selection_[key].second->fill(event, setup);
899 
900  } else break;
901  }
902  if(type=="jets" ){
904  if(step.select(event, setup)){ ++passed;
905  selection_[key].second->fill(event, setup);
906  } else break;
907  }
908  if(type=="jets/pf" ){
909  // cout << "JET SELECTION" << endl;
911 
912  std::string key2 = selectionStep(*(++selIt));
914 
915  if(step.select(event, setup)){ ++passed;
916  selection_[key].second->fill(event, setup);
917  }
918  else if (step2.select(event, setup)){ ++passed;
919  selection_[key2].second->fill(event, setup);
920  }
921  else break;
922  }
923  if(type=="jets/calo" ){
925  if(step.select(event, setup)){ ++passed;
926  selection_[key].second->fill(event, setup);
927  } else break;
928  }
929  if(type=="met" ){
931  if(step.select(event)){ ++passed;
932  selection_[key].second->fill(event, setup);
933  } else break;
934  }
935  }
936  }
937 }
938 
939 
std::vector< std::string > selectionOrder_
type
Definition: HCALResponse.h:21
std::string objectType(const std::string &label)
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
tuple met
____________________________________________________________________________||
Definition: CaloMET_cfi.py:7
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:184
Jets made from CaloTowers.
Definition: CaloJet.h:29
bool select(const edm::Event &event)
apply selection
std::vector< std::string > triggerPaths_
trigger paths
Level verbosity_
verbosity level for booking
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:33
Base class for all types of Jets.
Definition: Jet.h:20
int logged_
number of logged interesting events
edm::InputTag elecs_
input sources for monitoring
double massTopQuark(const std::vector< reco::Jet > &jets)
calculate t-quark mass estimate
RunNumber_t run() const
virtual void scaleEnergy(double fScale)
scale energy of the jet
Definition: Jet.cc:444
std::string muonIso_
extra isolation criterion on muon
edm::InputTag jetIDLabel_
jetID as an extra selection type
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:26
std::string muonSelect_
extra selection on muons
std::map< std::string, std::pair< edm::ParameterSet, SingleTopTChannelLepton::MonitorEnsemble * > > selection_
Jets made from PFObjects.
Definition: PFJet.h:21
double massWBoson(const std::vector< reco::Jet > &jets)
calculate W boson mass estimate
SingleTopTChannelLeptonDQM(const edm::ParameterSet &cfg)
default constructor
#define MAXJETS
Definition: myFastSimVal.cc:30
LuminosityBlockNumber_t luminosityBlock() const
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
Definition: EventSetup.cc:90
StringCutObjectSelector< reco::Vertex > * pvSelect_
extra selection on primary vertices; meant to investigate the pile-up effect
edm::InputTag vertex_
primary vertex
edm::InputTag btagEff_
btag discriminator labels
StringCutObjectSelector< reco::Vertex > * vertexSelect_
string cut selector
Helper class for the calculation of a top and a W boson mass estime.
Definition: TopDQMHelpers.h:69
std::string elecSelect_
extra selection on electrons
double lowerEdge_
mass window upper and lower edge
void triggerBinLabels(std::string channel, const std::vector< std::string > labels)
set configurable labels for trigger monitoring histograms
bool isNull() const
Checks for null.
Definition: Ref.h:247
Definition: MET.h:32
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
vector< PseudoJet > jets
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const int mu
Definition: Constants.h:22
double tmassTopQuark(reco::RecoCandidate *lep, const reco::MET &met, const reco::Jet &b)
calculate top quark transverse mass estimate
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
bool first
Definition: L1TdeRCT.cc:79
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
std::map< std::string, MonitorElement * > hists_
histogram container
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
EventAuxiliary const & eventAuxiliary() const
Definition: Event.h:72
std::string selectionStep(const std::string &label)
double tmassWBoson(reco::RecoCandidate *lep, const reco::MET &met, const reco::Jet &b)
calculate W boson transverse mass estimate
edm::InputTag triggerTable_
trigger table
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
Definition: JetCorrector.cc:50
static const unsigned int MAXJETS
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
std::string const & label() const
Definition: InputTag.h:42
virtual void analyze(const edm::Event &event, const edm::EventSetup &setup)
do this during the event loop
list key
Definition: combine.py:13
tuple muons
Definition: patZpeak.py:38
StringCutObjectSelector< reco::BeamSpot > * beamspotSelect_
string cut selector
StringCutObjectSelector< reco::JetID > * jetIDSelect_
extra jetID selection on calo jets
volatile std::atomic< bool > shutdown_flag false
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1000
virtual float pt() const GCC11_FINAL
transverse momentum
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
EventNumber_t event() const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
void book(std::string directory)
book histograms in subdirectory directory
std::vector< edm::InputTag > mets_
considers a vector of METs
std::string elecIso_
extra isolation criterion on electron