CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TopHLTDiMuonDQM.cc
Go to the documentation of this file.
1 /*
2  * $Date: 2010/08/13 09:11:38 $
3  * $Revision: 1.8 $
4  * \author M. Marienfeld - DESY Hamburg
5  */
6 
9 
10 using namespace std;
11 using namespace edm;
12 using namespace trigger;
13 
14 
16 
17  monitorName_ = ps.getParameter<string>("monitorName");
18 
19  triggerResults_ = ps.getParameter<edm::InputTag>("TriggerResults");
20  triggerEvent_ = ps.getParameter<edm::InputTag>("TriggerEvent");
21  triggerFilter_ = ps.getParameter<edm::InputTag>("TriggerFilter");
22 
23  hltPaths_L1_ = ps.getParameter<vector<string> >("hltPaths_L1");
24  hltPaths_L3_ = ps.getParameter<vector<string> >("hltPaths_L3");
25  hltPaths_sig_ = ps.getParameter<vector<string> >("hltPaths_sig");
26  hltPaths_trig_ = ps.getParameter<vector<string> >("hltPaths_trig");
27 
28  vertex_ = ps.getParameter<edm::InputTag>("vertexCollection");
29  vertex_X_cut_ = ps.getParameter<double>("vertex_X_cut");
30  vertex_Y_cut_ = ps.getParameter<double>("vertex_Y_cut");
31  vertex_Z_cut_ = ps.getParameter<double>("vertex_Z_cut");
32 
33  muons_ = ps.getParameter<edm::InputTag>("muonCollection");
34  muon_pT_cut_ = ps.getParameter<double>("muon_pT_cut");
35  muon_eta_cut_ = ps.getParameter<double>("muon_eta_cut");
36  muon_iso_cut_ = ps.getParameter<double>("muon_iso_cut");
37 
38  MassWindow_up_ = ps.getParameter<double>("MassWindow_up");
39  MassWindow_down_ = ps.getParameter<double>("MassWindow_down");
40 
41 }
42 
43 
45 
46 }
47 
48 
50 
52 
53  if( dbe_ ) {
54 
55  dbe_->setCurrentFolder(monitorName_);
56 
57  Trigs = dbe_->book1D("Trigs", "Fired triggers", 15, 0., 15.);
58 
59  TriggerEfficiencies = dbe_->book1D("TriggerEfficiencies", "HL Trigger Efficiencies", 10, 0., 10.);
60 
61  TriggerEfficiencies->setTitle("HL Trigger Efficiencies #epsilon_{signal} = #frac{[signal] && [control]}{[control]}");
62 
63  TriggerEfficiencies_sig = dbe_->book1D("TriggerEfficiencies_sig", "HL Trigger Signal && Control Counts", 10, 0., 10.);
64  TriggerEfficiencies_trig = dbe_->book1D("TriggerEfficiencies_trig", "HL Trigger Control Counts", 10, 0., 10.);
65 
66  const int nbins_Pt = 5;
67 
68  float bins_Pt[nbins_Pt+1] = { 0., 5., 10., 20., 50., 100. };
69 
70  MuonEfficiency_pT = dbe_->book1D("MuonEfficiency_pT", "Muon Efficiency P_{T}", nbins_Pt, &bins_Pt[0]);
71  MuonEfficiency_pT_sig = dbe_->book1D("MuonEfficiency_pT_sig", "P^{#mu}_{T} (signal triggered)", nbins_Pt, &bins_Pt[0]);
72  MuonEfficiency_pT_trig = dbe_->book1D("MuonEfficiency_pT_trig", "P^{#mu}_{T} (control triggered)", nbins_Pt, &bins_Pt[0]);
73 
74  const int nbins_eta = 7;
75 
76  float bins_eta[nbins_eta+1] = { -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5 };
77 
78  MuonEfficiency_eta = dbe_->book1D("MuonEfficiency_eta", "Muon Efficiency #eta", nbins_eta, &bins_eta[0]);
79  MuonEfficiency_eta_sig = dbe_->book1D("MuonEfficiency_eta_sig", "#eta_{muon} (signal triggered)", nbins_eta, &bins_eta[0]);
80  MuonEfficiency_eta_trig = dbe_->book1D("MuonEfficiency_eta_trig", "#eta_{muon} (control triggered)", nbins_eta, &bins_eta[0]);
81 
82  const int nbins_phi = 9;
83 
84  float bins_phi[nbins_phi+1] = { -3.5, -3.2, -2.6, -1.56, -0.52, 0.52, 1.56, 2.6, 3.2, 3.5 };
85 
86  MuonEfficiency_phi = dbe_->book1D("MuonEfficiency_phi", "Muon Efficiency #phi", nbins_phi, &bins_phi[0]);
87  MuonEfficiency_phi_sig = dbe_->book1D("MuonEfficiency_phi_sig", "#phi_{muon} (signal triggered)", nbins_phi, &bins_phi[0]);
88  MuonEfficiency_phi_trig = dbe_->book1D("MuonEfficiency_phi_trig", "#phi_{muon} (control triggered)", nbins_phi, &bins_phi[0]);
89 
90  const int N_TriggerPaths = hltPaths_L3_.size();
91  const int N_SignalPaths = hltPaths_sig_.size();
92 
93  for( int i = 0; i < N_TriggerPaths; i++ ) {
94 
95  const string &label = hltPaths_L3_[i];
96  Trigs->setBinLabel( i+1,label.c_str() );
97 
98  }
99 
100  for( int j = 0; j < N_SignalPaths; ++j ) {
101 
102  const string &label_eff = "#frac{["+hltPaths_sig_[j]+"]}{vs. ["+hltPaths_trig_[j]+"]}";
103  const string &label_sig = hltPaths_sig_[j]+"\n && "+hltPaths_trig_[j];
104  TriggerEfficiencies->setBinLabel( j+1, label_eff.c_str() );
105  TriggerEfficiencies_sig->setBinLabel( j+1, label_sig.c_str() );
106 
107  }
108 
109  NMuons = dbe_->book1D("Nmuons", "Number of muons", 20, 0., 10.);
110  NMuons_iso = dbe_->book1D("Nmuons_Iso", "Number of isolated muons", 20, 0., 10.);
111  NMuons_charge = dbe_->book1D("Nmuons_Charge", "N_{muons} * Q(#mu)", 19, -10., 10.);
112  NTracks = dbe_->book1D("Ntracks", "Number of tracks", 50, 0., 50.);
113  VxVy_muons = dbe_->book2D("VxVy_muons", "Vertex x-y-positon (global)", 40, -1., 1., 40 , -1., 1.);
114  Vz_muons = dbe_->book1D("Vz_muons", "Vertex z-positon (global)", 40, -20., 20.);
115  PtMuons = dbe_->book1D("PtMuon", "P^{#mu}_{T}", 50, 0., 100.);
116  EtaMuons = dbe_->book1D("EtaMuon", "#eta_{muon}", 50, -5., 5.);
117  PhiMuons = dbe_->book1D("PhiMuon", "#phi_{muon}", 40, -4., 4.);
118 
119  DeltaEtaMuonsRC = dbe_->book1D("DeltaEtaMuonsRC", "#Delta #eta of muon pair (RC)", 50, -5., 5.);
120  DeltaPhiMuonsRC = dbe_->book1D("DeltaPhiMuonsRC", "#Delta #phi of muon pair (RC)", 50, -5., 5.);
121  DeltaEtaMuonsWC = dbe_->book1D("DeltaEtaMuonsWC", "#Delta #eta of muon pair (WC)", 50, -5., 5.);
122  DeltaPhiMuonsWC = dbe_->book1D("DeltaPhiMuonsWC", "#Delta #phi of muon pair (WC)", 50, -5., 5.);
123  CombRelIso03 = dbe_->book1D("MuIso_CombRelIso03", "Muon CombRelIso dR=03", 50, 0., 1.);
124  PixelHits_muons = dbe_->book1D("NPixelHits_muons", "Number of pixel hits", 50, 0., 50.);
125  TrackerHits_muons = dbe_->book1D("NTrackerHits_muons", "Number of hits in the tracker", 50, 0., 50.);
126 
127  DeltaR_Trig = dbe_->book1D("DeltaRTrigger", "#Delta R of trigger muon pair", 50, 0., 5.);
128  DeltaR_Reco = dbe_->book1D("DeltaRReco", "#Delta R of RECO muon pair", 50, 0., 5.);
129  DeltaR_Match = dbe_->book1D("DeltaRMatch", "#Delta R of matched muon pair", 50, 0., 5.);
130  Trigger_Match = dbe_->book1D("TriggerMatch", "Number of Trigger-RECO assignements", 6, 0., 6.);
131 
132  const int nbins_Pt_Log = 15;
133 
134  double logmin = 0.;
135  double logmax = 3.; // 10^(3.)=1000
136 
137  float bins_Pt_Log[nbins_Pt_Log+1];
138 
139  for (int i = 0; i <= nbins_Pt_Log; i++) {
140  double log = logmin + (logmax-logmin)*i/nbins_Pt_Log;
141  bins_Pt_Log[i] = std::pow(10.0, log);
142  }
143 
144  PtMuons_LOGX = dbe_->book1D("Pt_muon_LOGX", "P^{#mu}_{T}", nbins_Pt_Log, &bins_Pt_Log[0]);
145 
146  MuonEfficiency_pT_LOGX = dbe_->book1D("MuonEfficiency_pT_LOGX", "Muon Efficiency P_{T}", nbins_Pt_Log, &bins_Pt_Log[0]);
147  MuonEfficiency_pT_LOGX_sig = dbe_->book1D("MuonEfficiency_pT_LOGX_sig", "P^{#mu}_{T} (signal triggered)", nbins_Pt_Log, &bins_Pt_Log[0]);
148  MuonEfficiency_pT_LOGX_trig = dbe_->book1D("MuonEfficiency_pT_LOGX_trig", "P^{#mu}_{T} (control triggered)", nbins_Pt_Log, &bins_Pt_Log[0]);
149 
150  const int nbins_mass = 200;
151 
152  float bins_mass[nbins_mass+1];
153 
154  for (int i = 0; i <= nbins_mass; i++) {
155  double log = logmin + (logmax-logmin)*i/nbins_mass;
156  bins_mass[i] = std::pow(10.0, log);
157  }
158 
159  DiMuonMassRC = dbe_->book1D("DiMuonMassRC", "Invariant Dimuon Mass (Right Charge)", 50, 0., 200.);
160  DiMuonMassWC = dbe_->book1D("DiMuonMassWC", "Invariant Dimuon Mass (Wrong Charge)", 50, 0., 200.);
161 
162  DiMuonMassRC_LOGX = dbe_->book1D("DiMuonMassRC_LOGX", "Invariant Dimuon Mass (Right Charge)", nbins_mass, &bins_mass[0]);
163  DiMuonMassWC_LOGX = dbe_->book1D("DiMuonMassWC_LOGX", "Invariant Dimuon Mass (Wrong Charge)", nbins_mass, &bins_mass[0]);
164 
165  }
166 
167 }
168 
169 
170 void TopHLTDiMuonDQM::beginRun(const edm::Run& r, const edm::EventSetup& context) {
171 
172 }
173 
174 
176 
177 }
178 
179 
181 
182  // ------------------------
183  // Global Event Variables
184  // ------------------------
185 
186  vector<string> hltPaths = hltPaths_L3_;
187 
188  vector<reco::Particle> Triggered_muons;
189  reco::MuonCollection Isolated_muons;
190  reco::MuonCollection Matched_muons;
191 
192  const int N_TriggerPaths = hltPaths.size();
193  const int N_SignalPaths = hltPaths_sig_.size();
194  const int N_ControlPaths = hltPaths_trig_.size();
195 
196  bool Fired_Signal_Trigger[ 10] = {false};
197  bool Fired_Control_Trigger[10] = {false};
198 
199  double DilepMass = 0.;
200 
201  double deltaR_Trig = 1000.;
202  double deltaR_Reco = 0.;
203  double deltaR_Match = 0.;
204 
205  int N_iso_mu = 0;
206 
207  double vertex_X = 100.;
208  double vertex_Y = 100.;
209  double vertex_Z = 100.;
210 
211  // -------------------------
212  // Analyze Trigger Results
213  // -------------------------
214 
215  edm::Handle<TriggerResults> trigResults;
216  iEvent.getByLabel(triggerResults_, trigResults);
217 
218  if( trigResults.failedToGet() ) {
219 
220  // cout << endl << "-----------------------------" << endl;
221  // cout << "--- NO TRIGGER RESULTS !! ---" << endl;
222  // cout << "-----------------------------" << endl << endl;
223 
224  }
225 
226  if( !trigResults.failedToGet() ) {
227 
228  const edm::TriggerNames & trigName = iEvent.triggerNames(*trigResults);
229 
230  for( unsigned int i_Trig = 0; i_Trig < trigResults->size(); ++i_Trig ) {
231 
232  if(trigResults->accept(i_Trig)) {
233 
234  // Check for all trigger paths
235 
236  for( int i = 0; i < N_TriggerPaths; i++ ) {
237 
238  if( trigName.triggerName(i_Trig) == hltPaths[i] ) Trigs->Fill(i);
239 
240  }
241 
242  // Check for signal & control trigger paths
243 
244  for( int j = 0; j < N_SignalPaths; ++j ) {
245 
246  if( trigName.triggerName(i_Trig) == hltPaths_sig_[j] ) Fired_Signal_Trigger[j] = true;
247 
248  }
249 
250  for( int k = 0; k < N_ControlPaths; ++k ) {
251 
252  if( trigName.triggerName(i_Trig) == hltPaths_trig_[k] ) Fired_Control_Trigger[k] = true;
253 
254  }
255 
256  }
257 
258  }
259 
260  }
261 
262  // -----------------------
263  // Analyze Trigger Event
264  // -----------------------
265 
266  edm::Handle<TriggerEvent> triggerEvent;
267  iEvent.getByLabel(triggerEvent_, triggerEvent);
268 
269  if( triggerEvent.failedToGet() ) {
270 
271  // cout << endl << "---------------------------" << endl;
272  // cout << "--- NO TRIGGER EVENT !! ---" << endl;
273  // cout << "---------------------------" << endl << endl;
274 
275  }
276 
277  if( !triggerEvent.failedToGet() ) {
278 
279  size_t filterIndex = triggerEvent->filterIndex( triggerFilter_ );
280  TriggerObjectCollection triggerObjects = triggerEvent->getObjects();
281 
282  if( filterIndex >= triggerEvent->sizeFilters() ) {
283 
284  // cout << endl << "------------------------------" << endl;
285  // cout << "--- NO FILTERED OBJECTS !! ---" << endl;
286  // cout << "------------------------------" << endl << endl;
287 
288  }
289 
290  if( filterIndex < triggerEvent->sizeFilters() ) {
291 
292  const Keys & keys = triggerEvent->filterKeys( filterIndex );
293 
294  int N_mu = 0;
295 
296  for( size_t j = 0; j < keys.size(); j++ ) {
297 
298  TriggerObject foundObject = triggerObjects[keys[j]];
299 
300  if( foundObject.pt() < muon_pT_cut_ ) continue;
301  if( abs( foundObject.eta()) > muon_eta_cut_ ) continue;
302  if( abs( foundObject.particle().pdgId() ) != 13 ) continue;
303 
304  ++N_mu;
305  Triggered_muons.push_back( foundObject.particle() );
306 
307  }
308 
309  if( Triggered_muons.size() == 2 ) {
310 
311  reco::Particle mu1 = Triggered_muons.at(0);
312  reco::Particle mu2 = Triggered_muons.at(1);
313 
314  deltaR_Trig = deltaR( mu1.eta(), mu1.phi(), mu2.eta(), mu2.phi() );
315  DeltaR_Trig->Fill(deltaR_Trig);
316 
317  }
318 
319  }
320 
321  }
322 
323  // ------------------------
324  // Analyze Primary Vertex
325  // ------------------------
326 
328  iEvent.getByLabel(vertex_, vertexs);
329 
330  if( vertexs.failedToGet() ) {
331 
332  // cout << endl << "----------------------------" << endl;
333  // cout << "--- NO PRIMARY VERTEX !! ---" << endl;
334  // cout << "----------------------------" << endl << endl;
335 
336  }
337 
338  if( !vertexs.failedToGet() ) {
339 
340  reco::Vertex primaryVertex = vertexs->front();
341 
342  int numberTracks = primaryVertex.tracksSize();
343  // double ndof = primaryVertex.ndof();
344  bool fake = primaryVertex.isFake();
345 
346  NTracks->Fill(numberTracks);
347 
348  if( !fake && numberTracks > 3 ) {
349 
350  vertex_X = primaryVertex.x();
351  vertex_Y = primaryVertex.y();
352  vertex_Z = primaryVertex.z();
353 
354  }
355 
356  }
357 
358  // --------------------
359  // Analyze RECO Muons
360  // --------------------
361 
363  iEvent.getByLabel(muons_, muons);
364 
365  reco::MuonCollection::const_iterator muon;
366 
367  if( muons.failedToGet() ) {
368 
369  // cout << endl << "------------------------" << endl;
370  // cout << "--- NO RECO MUONS !! ---" << endl;
371  // cout << "------------------------" << endl << endl;
372 
373  }
374 
375  if( !muons.failedToGet() ) {
376 
377  NMuons->Fill( muons->size() );
378 
379  // cout << "N_muons : " << muons->size() << endl;
380 
381  for(muon = muons->begin(); muon!= muons->end(); ++muon) {
382 
383  float N_muons = muons->size();
384  float Q_muon = muon->charge();
385 
386  NMuons_charge->Fill(N_muons*Q_muon);
387 
388  double track_X = 100.;
389  double track_Y = 100.;
390  double track_Z = 100.;
391 
392  double N_PixelHits = 0.;
393  double N_TrackerHits = 0.;
394 
395  if( muon->isGlobalMuon() && muon->isTrackerMuon() ) {
396 
397  reco::TrackRef track = muon->globalTrack();
398 
399  track_X = track->vx();
400  track_Y = track->vy();
401  track_Z = track->vz();
402  N_PixelHits = track->hitPattern().numberOfValidPixelHits();
403  N_TrackerHits = track->hitPattern().numberOfValidTrackerHits();
404 
405  VxVy_muons->Fill(track_X, track_Y);
406  Vz_muons->Fill(track_Z);
407  PixelHits_muons->Fill(N_PixelHits);
408  TrackerHits_muons->Fill(N_TrackerHits);
409 
410  }
411 
412  // Vertex and kinematic cuts
413 
414  if( track_X > vertex_X_cut_ ) continue;
415  if( track_Y > vertex_Y_cut_ ) continue;
416  if( track_Z > vertex_Z_cut_ ) continue;
417  if( N_PixelHits < 1. ) continue;
418  if( N_TrackerHits < 11. ) continue;
419  if( muon->pt() < muon_pT_cut_ ) continue;
420  if( abs(muon->eta()) > muon_eta_cut_ ) continue;
421 
422  reco::MuonIsolation muIso03 = muon->isolationR03();
423 
424  double muonCombRelIso = 1.;
425 
426  if ( muon->pt() != 0. )
427  muonCombRelIso = ( muIso03.emEt + muIso03.hadEt + muIso03.hoEt + muIso03.sumPt ) / muon->pt();
428 
429  CombRelIso03->Fill( muonCombRelIso );
430 
431  if( muonCombRelIso < muon_iso_cut_ ) {
432 
433  ++N_iso_mu;
434  Isolated_muons.push_back(*muon);
435 
436  }
437 
438  }
439 
440  NMuons_iso->Fill(N_iso_mu);
441 
442  // if( Isolated_muons.size() > 1 && Fired_Control_Trigger[0] ) {
443  if( Isolated_muons.size() > 1 ) {
444 
445  // Vertex cut
446 
447  if( vertex_X < vertex_X_cut_ && vertex_Y < vertex_Y_cut_ && vertex_Z < vertex_Z_cut_ ) {
448 
449  for( int i = 0; i < (static_cast<int>(Isolated_muons.size()) - 1); ++i ) {
450 
451  for( int j = i+1; j < static_cast<int>(Isolated_muons.size()); ++j ) {
452 
453  reco::MuonCollection::const_reference mu1 = Isolated_muons.at(i);
454  reco::MuonCollection::const_reference mu2 = Isolated_muons.at(j);
455 
456  DilepMass = sqrt( (mu1.energy()+mu2.energy())*(mu1.energy()+mu2.energy())
457  - (mu1.px()+mu2.px())*(mu1.px()+mu2.px())
458  - (mu1.py()+mu2.py())*(mu1.py()+mu2.py())
459  - (mu1.pz()+mu2.pz())*(mu1.pz()+mu2.pz())
460  );
461 
462  if( DilepMass < 1. ) {
463 
464  if( i > 0 ) {
465 
466  Isolated_muons.erase(Isolated_muons.begin()+i);
467  --i;
468 
469  }
470 
471  continue;
472 
473  }
474 
475  // Opposite muon charges -> Right Charge (RC)
476 
477  if( mu1.charge()*mu2.charge() < 0. ) {
478 
479  DiMuonMassRC->Fill( DilepMass );
480  DiMuonMassRC_LOGX->Fill( DilepMass );
481 
482  if( DilepMass > MassWindow_down_ && DilepMass < MassWindow_up_ ) {
483 
484  PtMuons->Fill( mu1.pt() );
485  PtMuons->Fill( mu2.pt() );
486  PtMuons_LOGX->Fill( mu1.pt() );
487  PtMuons_LOGX->Fill( mu2.pt() );
488  EtaMuons->Fill( mu1.eta() );
489  EtaMuons->Fill( mu2.eta() );
490  PhiMuons->Fill( mu1.phi() );
491  PhiMuons->Fill( mu2.phi() );
492 
493  DeltaEtaMuonsRC->Fill(mu1.eta()-mu2.eta());
494  DeltaPhiMuonsRC->Fill( deltaPhi(mu1.phi(),mu2.phi()) );
495 
496  // Determinating relative trigger efficiencies
497 
498  for( int k = 0; k < N_SignalPaths; ++k ) {
499 
500  if( Fired_Signal_Trigger[k] && Fired_Control_Trigger[k] ) TriggerEfficiencies_sig->Fill(k);
501 
502  if( Fired_Control_Trigger[k] ) TriggerEfficiencies_trig->Fill(k);
503 
504  }
505 
506  // Trigger object matching
507 
508  int N_Match = 0;
509  double DR = 0.1;
510 
511  if( Isolated_muons.size() == 2 && Triggered_muons.size() > 0 ) {
512 
513  deltaR_Reco = deltaR( mu1.eta(), mu1.phi(), mu2.eta(), mu2.phi() );
514  DeltaR_Reco->Fill(deltaR_Reco);
515 
516  if( deltaR_Reco > 2.*DR && deltaR_Trig > 2.*DR ) {
517 
518  for( int i = 0; i < static_cast<int>(Isolated_muons.size()); ++i ) {
519 
520  for( int j = 0; j < static_cast<int>(Triggered_muons.size()); ++j ) {
521 
522  reco::Particle & Trigger_mu = Triggered_muons.at(j);
523  reco::Muon & Reco_mu = Isolated_muons.at(i);
524 
525  deltaR_Match = deltaR( Trigger_mu.eta(), Trigger_mu.phi(), Reco_mu.eta(), Reco_mu.phi() );
526  DeltaR_Match->Fill(deltaR_Match);
527 
528  if( deltaR_Match < DR) {
529 
530  ++N_Match;
531  Matched_muons.push_back(Reco_mu);
532 
533  }
534 
535  }
536 
537  }
538 
539  Trigger_Match->Fill(N_Match);
540 
541  }
542 
543  }
544 
545 
546  // Muon Tag & Probe Efficiency
547 
548  if( Matched_muons.size() == 1 ) {
549 
550  reco::MuonCollection::const_reference matched_mu1 = Matched_muons.at(0);
551 
552  MuonEfficiency_pT_trig->Fill( matched_mu1.pt() );
553  MuonEfficiency_pT_LOGX_trig->Fill( matched_mu1.pt() );
554  MuonEfficiency_eta_trig->Fill(matched_mu1.eta());
555  MuonEfficiency_phi_trig->Fill(matched_mu1.phi());
556 
557  }
558 
559  if( Matched_muons.size() == 2 ) {
560 
561  reco::MuonCollection::const_reference matched_mu1 = Matched_muons.at(0);
562  reco::MuonCollection::const_reference matched_mu2 = Matched_muons.at(1);
563 
564  MuonEfficiency_pT_trig->Fill( matched_mu1.pt() );
565  MuonEfficiency_pT_trig->Fill( matched_mu2.pt() );
566  MuonEfficiency_pT_LOGX_trig->Fill( matched_mu1.pt() );
567  MuonEfficiency_pT_LOGX_trig->Fill( matched_mu2.pt() );
568  MuonEfficiency_eta_trig->Fill(matched_mu1.eta());
569  MuonEfficiency_eta_trig->Fill(matched_mu2.eta());
570  MuonEfficiency_phi_trig->Fill(matched_mu1.phi());
571  MuonEfficiency_phi_trig->Fill(matched_mu2.phi());
572 
573  MuonEfficiency_pT_sig->Fill( matched_mu1.pt() );
574  MuonEfficiency_pT_sig->Fill( matched_mu2.pt() );
575  MuonEfficiency_pT_LOGX_sig->Fill( matched_mu1.pt() );
576  MuonEfficiency_pT_LOGX_sig->Fill( matched_mu2.pt() );
577  MuonEfficiency_eta_sig->Fill(matched_mu1.eta());
578  MuonEfficiency_eta_sig->Fill(matched_mu2.eta());
579  MuonEfficiency_phi_sig->Fill(matched_mu1.phi());
580  MuonEfficiency_phi_sig->Fill(matched_mu2.phi());
581 
582  }
583 
584  }
585 
586  }
587 
588  // Same muon charges -> Wrong Charge (WC)
589 
590  if( mu1.charge()*mu2.charge() > 0. ) {
591 
592  DiMuonMassWC->Fill( DilepMass );
593  DiMuonMassWC_LOGX->Fill( DilepMass );
594 
595  if( DilepMass > MassWindow_down_ && DilepMass < MassWindow_up_ ) {
596 
597  DeltaEtaMuonsWC->Fill( mu1.eta()-mu2.eta() );
598  DeltaPhiMuonsWC->Fill( deltaPhi(mu1.phi(),mu2.phi()) );
599 
600  }
601 
602  }
603 
604  }
605 
606  }
607 
608  }
609 
610  }
611 
612  }
613 
614 }
615 
616 
618 
619 }
620 
621 
622 void TopHLTDiMuonDQM::endRun(const edm::Run& r, const edm::EventSetup& context) {
623 
624 }
625 
626 
628 
629 }
float hadEt
hcal sum-Et
Definition: MuonIsolation.h:9
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
TopHLTDiMuonDQM(const edm::ParameterSet &)
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:207
float sumPt
sum-pt of tracks
Definition: MuonIsolation.h:7
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
tuple NTracks
Definition: listHistos.py:91
double y() const
y coordinate
Definition: Vertex.h:97
reco::Particle particle(reco::Particle::Charge q=0, const reco::Particle::Point &vertex=reco::Particle::Point(0, 0, 0), int status=0, bool integerCharge=true) const
Definition: TriggerObject.h:71
#define abs(x)
Definition: mlp_lapack.h:159
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
float eta() const
Definition: TriggerObject.h:59
int pdgId() const
PDG identifier.
Definition: Particle.h:150
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:24
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
int iEvent
Definition: GenABIO.cc:243
void analyze(const edm::Event &, const edm::EventSetup &)
double phi() const
momentum azimuthal angle
Definition: Particle.h:95
T sqrt(T t)
Definition: SSEVec.h:48
float emEt
ecal sum-Et
Definition: MuonIsolation.h:8
int j
Definition: DBlmapReader.cc:9
double z() const
y coordinate
Definition: Vertex.h:99
float hoEt
ho sum-Et
Definition: MuonIsolation.h:10
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
DQMStore * dbe_
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
int k[5][pyjets_maxn]
void setTitle(const std::string &title)
set (ie. change) histogram/profile title
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:83
bool failedToGet() const
Definition: HandleBase.h:80
double x() const
x coordinate
Definition: Vertex.h:95
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
bool isFake() const
Definition: Vertex.h:65
void endRun(const edm::Run &, const edm::EventSetup &)
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:27
std::vector< size_type > Keys
tuple muons
Definition: patZpeak.py:38
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:850
double eta() const
momentum pseudorapidity
Definition: Particle.h:99
void beginRun(const edm::Run &, const edm::EventSetup &)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
size_t tracksSize() const
number of tracks
Definition: Vertex.cc:35
Definition: Run.h:36