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