CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
MuonRecoAnalyzer Class Reference

#include <MuonRecoAnalyzer.h>

Inheritance diagram for MuonRecoAnalyzer:
MuonAnalyzerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &, const reco::Muon &recoMu)
 Get the analysis. More...
 
void beginJob (DQMStore *dbe)
 Inizialize parameters for histo binning. More...
 
void GetRes (reco::TrackRef t1, reco::TrackRef t2, std::string par, float &res, float &pull)
 
 MuonRecoAnalyzer (const edm::ParameterSet &, MuonServiceProxy *theService)
 Constructor. More...
 
virtual ~MuonRecoAnalyzer ()
 Destructor. More...
 
- Public Member Functions inherited from MuonAnalyzerBase
void analyze (const edm::Event &, const edm::EventSetup &, reco::Muon &recoMuon)
 Get the analysis of the muon properties. More...
 
void analyze (const edm::Event &, const edm::EventSetup &, reco::Track &recoTrack)
 Get the analysis of the muon track properties. More...
 
 MuonAnalyzerBase (MuonServiceProxy *theServ)
 Constructor. More...
 
MuonServiceProxyservice ()
 
virtual ~MuonAnalyzerBase ()
 Destructor. More...
 

Private Attributes

int chi2Bin
 
double chi2Max
 
double chi2Min
 
std::vector< MonitorElement * > chi2OvDFGlbTrack
 
MonitorElementchi2OvDFStaTrack
 
MonitorElementchi2OvDFTrack
 
int etaBin
 
std::vector< MonitorElement * > etaEfficiency
 
std::vector< MonitorElement * > etaGlbTrack
 
double etaMax
 
double etaMin
 
MonitorElementetaPull
 
std::vector< MonitorElement * > etaResolution
 
MonitorElementetaStaTrack
 
MonitorElementetaTrack
 
std::string metname
 
MonitorElementmuReco
 
std::vector< MonitorElement * > muVStkSytemRotation
 
MonitorElementoneOverpPull
 
std::vector< MonitorElement * > oneOverpResolution
 
MonitorElementoneOverptPull
 
std::vector< MonitorElement * > oneOverptResolution
 
edm::ParameterSet parameters
 
int pBin
 
std::vector< MonitorElement * > pGlbTrack
 
int phiBin
 
std::vector< MonitorElement * > phiEfficiency
 
std::vector< MonitorElement * > phiGlbTrack
 
double phiMax
 
double phiMin
 
MonitorElementphiPull
 
std::vector< MonitorElement * > phiResolution
 
MonitorElementphiStaTrack
 
MonitorElementphiTrack
 
double pMax
 
double pMin
 
int pResBin
 
double pResMax
 
double pResMin
 
std::vector< MonitorElement * > probchi2GlbTrack
 
MonitorElementprobchi2StaTrack
 
MonitorElementprobchi2Track
 
MonitorElementpStaTrack
 
int ptBin
 
std::vector< MonitorElement * > ptGlbTrack
 
double ptMax
 
double ptMin
 
MonitorElementpTrack
 
MonitorElementptStaTrack
 
MonitorElementptTrack
 
std::vector< MonitorElement * > qGlbTrack
 
MonitorElementqOverpPull
 
std::vector< MonitorElement * > qOverpResolution
 
MonitorElementqOverptPull
 
std::vector< MonitorElement * > qOverptResolution
 
MonitorElementqStaTrack
 
MonitorElementqTrack
 
std::vector< MonitorElement * > rhAnalysis
 
int rhBin
 
double rhMax
 
double rhMin
 
edm::InputTag theSTACollectionLabel
 
int thetaBin
 
std::vector< MonitorElement * > thetaGlbTrack
 
double thetaMax
 
double thetaMin
 
MonitorElementthetaPull
 
std::vector< MonitorElement * > thetaResolution
 
MonitorElementthetaStaTrack
 
MonitorElementthetaTrack
 
int tunePBin
 
double tunePMax
 
double tunePMin
 
MonitorElementtunePResolution
 

Detailed Description

Definition at line 28 of file MuonRecoAnalyzer.h.

Constructor & Destructor Documentation

MuonRecoAnalyzer::MuonRecoAnalyzer ( const edm::ParameterSet pSet,
MuonServiceProxy theService 
)

Constructor.

Definition at line 30 of file MuonRecoAnalyzer.cc.

References parameters.

31  parameters = pSet;
32 }
MuonServiceProxy * theService
MuonAnalyzerBase(MuonServiceProxy *theServ)
Constructor.
edm::ParameterSet parameters
MuonRecoAnalyzer::~MuonRecoAnalyzer ( )
virtual

Destructor.

Definition at line 35 of file MuonRecoAnalyzer.cc.

35 { }

Member Function Documentation

void MuonRecoAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const reco::Muon recoMu 
)

Get the analysis.

Definition at line 336 of file MuonRecoAnalyzer.cc.

References chi2OvDFGlbTrack, chi2OvDFStaTrack, chi2OvDFTrack, reco::Muon::combinedMuon(), etaEfficiency, etaGlbTrack, etaPull, etaResolution, etaStaTrack, etaTrack, MonitorElement::Fill(), HcalObjRepresent::Fill(), GetRes(), reco::Muon::isCaloMuon(), reco::Muon::isGlobalMuon(), reco::Muon::isStandAloneMuon(), reco::Muon::isTrackerMuon(), LogTrace, metname, DetId::Muon, reco::Muon::muonBestTrack(), muReco, muVStkSytemRotation, oneOverpPull, oneOverpResolution, oneOverptPull, oneOverptResolution, pGlbTrack, phiEfficiency, phiGlbTrack, phiPull, phiResolution, phiStaTrack, phiTrack, probchi2GlbTrack, probchi2StaTrack, probchi2Track, pStaTrack, ptGlbTrack, pTrack, ptStaTrack, ptTrack, qGlbTrack, qOverpPull, qOverpResolution, qOverptPull, qOverptResolution, qStaTrack, qTrack, rhAnalysis, reco::Muon::standAloneMuon(), thetaGlbTrack, thetaPull, thetaResolution, thetaStaTrack, thetaTrack, reco::Muon::track(), DetId::Tracker, reco::Muon::tunePMuonBestTrack(), and tunePResolution.

336  {
337 
338  LogTrace(metname)<<"[MuonRecoAnalyzer] Analyze the mu";
339 
340  float res=0, pull=0;
341 
342  if(recoMu.isGlobalMuon()) {
343 
344  LogTrace(metname)<<"[MuonRecoAnalyzer] The mu is global - filling the histos";
345  if(recoMu.isTrackerMuon() && recoMu.isStandAloneMuon())
346  muReco->Fill(1);
347  if(!(recoMu.isTrackerMuon()) && recoMu.isStandAloneMuon())
348  muReco->Fill(2);
349  if(!recoMu.isStandAloneMuon())
350  LogTrace(metname)<<"[MuonRecoAnalyzer] ERROR: the mu is global but not standalone!";
351 
352  // get the track combinig the information from both the Tracker and the Spectrometer
353  reco::TrackRef recoCombinedGlbTrack = recoMu.combinedMuon();
354  // get the track using only the tracker data
355  reco::TrackRef recoTkGlbTrack = recoMu.track();
356  // get the track using only the mu spectrometer data
357  reco::TrackRef recoStaGlbTrack = recoMu.standAloneMuon();
358 
359 
360  etaGlbTrack[0]->Fill(recoCombinedGlbTrack->eta());
361  etaGlbTrack[1]->Fill(recoTkGlbTrack->eta());
362  etaGlbTrack[2]->Fill(recoStaGlbTrack->eta());
363 
364  GetRes(recoTkGlbTrack, recoCombinedGlbTrack, "eta", res, pull);
365  etaResolution[0]->Fill(res);
366  GetRes(recoCombinedGlbTrack, recoStaGlbTrack, "eta", res, pull);
367  etaResolution[1]->Fill(res);
368  GetRes(recoTkGlbTrack, recoStaGlbTrack, "eta", res, pull);
369  etaResolution[2]->Fill(res);
370  etaPull->Fill(pull);
371 
372  etaResolution[3]->Fill(recoCombinedGlbTrack->eta(), recoTkGlbTrack->eta()-recoCombinedGlbTrack->eta());
373  etaResolution[4]->Fill(recoCombinedGlbTrack->eta(), -recoStaGlbTrack->eta()+recoCombinedGlbTrack->eta());
374  etaResolution[5]->Fill(recoCombinedGlbTrack->eta(), recoTkGlbTrack->eta()-recoStaGlbTrack->eta());
375 
376 
377  thetaGlbTrack[0]->Fill(recoCombinedGlbTrack->theta());
378  thetaGlbTrack[1]->Fill(recoTkGlbTrack->theta());
379  thetaGlbTrack[2]->Fill(recoStaGlbTrack->theta());
380  GetRes(recoTkGlbTrack, recoCombinedGlbTrack, "theta", res, pull);
381  thetaResolution[0]->Fill(res);
382 
383  GetRes(recoCombinedGlbTrack, recoStaGlbTrack, "theta", res, pull);
384  thetaResolution[1]->Fill(res);
385 
386  GetRes(recoTkGlbTrack, recoStaGlbTrack, "theta", res, pull);
387  thetaResolution[2]->Fill(res);
388  thetaPull->Fill(pull);
389 
390  thetaResolution[3]->Fill(recoCombinedGlbTrack->theta(), recoTkGlbTrack->theta()-recoCombinedGlbTrack->theta());
391  thetaResolution[4]->Fill(recoCombinedGlbTrack->theta(), -recoStaGlbTrack->theta()+recoCombinedGlbTrack->theta());
392  thetaResolution[5]->Fill(recoCombinedGlbTrack->theta(), recoTkGlbTrack->theta()-recoStaGlbTrack->theta());
393 
394 
395 
396  phiGlbTrack[0]->Fill(recoCombinedGlbTrack->phi());
397  phiGlbTrack[1]->Fill(recoTkGlbTrack->phi());
398  phiGlbTrack[2]->Fill(recoStaGlbTrack->phi());
399  GetRes(recoTkGlbTrack, recoCombinedGlbTrack, "phi", res, pull);
400  phiResolution[0]->Fill(res);
401  GetRes(recoCombinedGlbTrack, recoStaGlbTrack, "phi", res, pull);
402  phiResolution[1]->Fill(res);
403  GetRes(recoTkGlbTrack, recoStaGlbTrack, "phi", res, pull);
404  phiResolution[2]->Fill(res);
405  phiPull->Fill(pull);
406  phiResolution[3]->Fill(recoCombinedGlbTrack->phi(), recoTkGlbTrack->phi()-recoCombinedGlbTrack->phi());
407  phiResolution[4]->Fill(recoCombinedGlbTrack->phi(), -recoStaGlbTrack->phi()+recoCombinedGlbTrack->phi());
408  phiResolution[5]->Fill(recoCombinedGlbTrack->phi(), recoTkGlbTrack->phi()-recoStaGlbTrack->phi());
409 
410  chi2OvDFGlbTrack[0]->Fill(recoCombinedGlbTrack->normalizedChi2());
411  chi2OvDFGlbTrack[1]->Fill(recoTkGlbTrack->normalizedChi2());
412  chi2OvDFGlbTrack[2]->Fill(recoStaGlbTrack->normalizedChi2());
413 //-------------------------
414 // double probchi = TMath::Prob(recoCombinedGlbTrack->normalizedChi2(),recoCombinedGlbTrack->ndof());
415 // cout << "rellenando histos."<<endl;
416  probchi2GlbTrack[0]->Fill(TMath::Prob(recoCombinedGlbTrack->chi2(),recoCombinedGlbTrack->ndof()));
417  probchi2GlbTrack[1]->Fill(TMath::Prob(recoTkGlbTrack->chi2(),recoTkGlbTrack->ndof()));
418  probchi2GlbTrack[2]->Fill(TMath::Prob(recoStaGlbTrack->chi2(),recoStaGlbTrack->ndof()));
419  // cout << "rellenados histos."<<endl;
420 //-------------------------
421 
422  pGlbTrack[0]->Fill(recoCombinedGlbTrack->p());
423  pGlbTrack[1]->Fill(recoTkGlbTrack->p());
424  pGlbTrack[2]->Fill(recoStaGlbTrack->p());
425 
426  ptGlbTrack[0]->Fill(recoCombinedGlbTrack->pt());
427  ptGlbTrack[1]->Fill(recoTkGlbTrack->pt());
428  ptGlbTrack[2]->Fill(recoStaGlbTrack->pt());
429 
430  qGlbTrack[0]->Fill(recoCombinedGlbTrack->charge());
431  qGlbTrack[1]->Fill(recoTkGlbTrack->charge());
432  qGlbTrack[2]->Fill(recoStaGlbTrack->charge());
433  if(recoCombinedGlbTrack->charge()==recoStaGlbTrack->charge()) qGlbTrack[3]->Fill(1);
434  else qGlbTrack[3]->Fill(2);
435  if(recoCombinedGlbTrack->charge()==recoTkGlbTrack->charge()) qGlbTrack[3]->Fill(3);
436  else qGlbTrack[3]->Fill(4);
437  if(recoStaGlbTrack->charge()==recoTkGlbTrack->charge()) qGlbTrack[3]->Fill(5);
438  else qGlbTrack[3]->Fill(6);
439  if(recoCombinedGlbTrack->charge()!=recoStaGlbTrack->charge() && recoCombinedGlbTrack->charge()!=recoTkGlbTrack->charge()) qGlbTrack[3]->Fill(7);
440  if(recoCombinedGlbTrack->charge()==recoStaGlbTrack->charge() && recoCombinedGlbTrack->charge()==recoTkGlbTrack->charge()) qGlbTrack[3]->Fill(8);
441 
442  GetRes(recoTkGlbTrack, recoCombinedGlbTrack, "qOverp", res, pull);
443  qOverpResolution[0]->Fill(res);
444  GetRes(recoCombinedGlbTrack, recoStaGlbTrack, "qOverp", res, pull);
445  qOverpResolution[1]->Fill(res);
446  GetRes(recoTkGlbTrack, recoStaGlbTrack, "qOverp", res, pull);
447  qOverpResolution[2]->Fill(res);
448  qOverpPull->Fill(pull);
449 
450 
451  GetRes(recoTkGlbTrack, recoCombinedGlbTrack, "oneOverp", res, pull);
452  oneOverpResolution[0]->Fill(res);
453  GetRes(recoCombinedGlbTrack, recoStaGlbTrack, "oneOverp", res, pull);
454  oneOverpResolution[1]->Fill(res);
455  GetRes(recoTkGlbTrack, recoStaGlbTrack, "oneOverp", res, pull);
456  oneOverpResolution[2]->Fill(res);
457  oneOverpPull->Fill(pull);
458 
459 
460  GetRes(recoTkGlbTrack, recoCombinedGlbTrack, "qOverpt", res, pull);
461  qOverptResolution[0]->Fill(res);
462  GetRes(recoCombinedGlbTrack, recoStaGlbTrack, "qOverpt", res, pull);
463  qOverptResolution[1]->Fill(res);
464  GetRes(recoTkGlbTrack, recoStaGlbTrack, "qOverpt", res, pull);
465  qOverptResolution[2]->Fill(res);
466  qOverptPull->Fill(pull);
467 
468  GetRes(recoTkGlbTrack, recoCombinedGlbTrack, "oneOverpt", res, pull);
469  oneOverptResolution[0]->Fill(res);
470  GetRes(recoCombinedGlbTrack, recoStaGlbTrack, "oneOverpt", res, pull);
471  oneOverptResolution[1]->Fill(res);
472  GetRes(recoTkGlbTrack, recoStaGlbTrack, "oneOverpt", res, pull);
473  oneOverptResolution[2]->Fill(res);
474  oneOverptPull->Fill(pull);
475 
476 
477  //--- Test new tunePMuonBestTrack() method from Muon.h
478 
479  reco::TrackRef recoBestTrack = recoMu.muonBestTrack();
480 
481  reco::TrackRef recoTunePBestTrack = recoMu.tunePMuonBestTrack();
482 
483  double bestTrackPt = recoBestTrack->pt();
484 
485  double tunePBestTrackPt = recoTunePBestTrack->pt();
486 
487  double tunePBestTrackRes = (bestTrackPt - tunePBestTrackPt) / bestTrackPt;
488 
489  tunePResolution->Fill(tunePBestTrackRes);
490 
491 
492  oneOverptResolution[3]->Fill(recoCombinedGlbTrack->eta(),(1/recoTkGlbTrack->pt())-(1/recoCombinedGlbTrack->pt()));
493  oneOverptResolution[4]->Fill(recoCombinedGlbTrack->eta(),-(1/recoStaGlbTrack->pt())+(1/recoCombinedGlbTrack->pt()));
494  oneOverptResolution[5]->Fill(recoCombinedGlbTrack->eta(),(1/recoTkGlbTrack->pt())-(1/recoStaGlbTrack->pt()));
495  oneOverptResolution[6]->Fill(recoCombinedGlbTrack->phi(),(1/recoTkGlbTrack->pt())-(1/recoCombinedGlbTrack->pt()));
496  oneOverptResolution[7]->Fill(recoCombinedGlbTrack->phi(),-(1/recoStaGlbTrack->pt())+(1/recoCombinedGlbTrack->pt()));
497  oneOverptResolution[8]->Fill(recoCombinedGlbTrack->phi(),(1/recoTkGlbTrack->pt())-(1/recoStaGlbTrack->pt()));
498  oneOverptResolution[9]->Fill(recoCombinedGlbTrack->pt(),(1/recoTkGlbTrack->pt())-(1/recoCombinedGlbTrack->pt()));
499  oneOverptResolution[10]->Fill(recoCombinedGlbTrack->pt(),-(1/recoStaGlbTrack->pt())+(1/recoCombinedGlbTrack->pt()));
500  oneOverptResolution[11]->Fill(recoCombinedGlbTrack->pt(),(1/recoTkGlbTrack->pt())-(1/recoStaGlbTrack->pt()));
501 
502 
503 
504 
505 
506  // valid hits Glb track
507  double rhGlb = recoCombinedGlbTrack->found();
508  // valid hits Glb track from Tracker
509  double rhGlb_StaProvenance=0;
510  // valid hits Glb track from Sta system
511  double rhGlb_TkProvenance=0;
512  for (trackingRecHit_iterator recHit = recoCombinedGlbTrack->recHitsBegin();
513  recHit!=recoCombinedGlbTrack->recHitsEnd(); ++recHit){
514  if((*recHit)->isValid()){
515  DetId id = (*recHit)->geographicalId();
516  if (id.det() == DetId::Muon)
517  rhGlb_StaProvenance++;
518  if (id.det() == DetId::Tracker)
519  rhGlb_TkProvenance++;
520  }
521  }
522  // valid hits Sta track associated to Glb track
523  double rhStaGlb = recoStaGlbTrack->recHitsSize();
524  // valid hits Traker track associated to Glb track
525  double rhTkGlb = recoTkGlbTrack->found();
526  // invalid hits Traker track associated to Glb track
527  double rhTkGlb_notValid = recoTkGlbTrack->lost();
528 
529  // fill the histos
530  rhAnalysis[0]->Fill(rhGlb_StaProvenance/rhGlb);
531  rhAnalysis[1]->Fill(rhGlb_TkProvenance/rhGlb);
532  rhAnalysis[2]->Fill(rhGlb_StaProvenance/rhStaGlb);
533  rhAnalysis[3]->Fill(rhGlb_TkProvenance/rhTkGlb);
534  rhAnalysis[4]->Fill(rhGlb/(rhStaGlb+rhTkGlb));
535  rhAnalysis[5]->Fill(rhTkGlb_notValid/rhGlb);
536 
537  // aligment plots (mu system w.r.t. tracker rotation)
538  if(recoCombinedGlbTrack->charge()>0)
539  muVStkSytemRotation[0]->Fill(recoCombinedGlbTrack->pt(),recoTkGlbTrack->pt()/recoCombinedGlbTrack->pt());
540  else
541  muVStkSytemRotation[1]->Fill(recoCombinedGlbTrack->pt(),recoTkGlbTrack->pt()/recoCombinedGlbTrack->pt());
542 
543  }
544 
545 
546  if(recoMu.isTrackerMuon() && !(recoMu.isGlobalMuon())) {
547  LogTrace(metname)<<"[MuonRecoAnalyzer] The mu is tracker only - filling the histos";
548  if(recoMu.isStandAloneMuon())
549  muReco->Fill(3);
550  if(!(recoMu.isStandAloneMuon()))
551  muReco->Fill(4);
552 
553  // get the track using only the tracker data
554  reco::TrackRef recoTrack = recoMu.track();
555 
556  etaTrack->Fill(recoTrack->eta());
557  thetaTrack->Fill(recoTrack->theta());
558  phiTrack->Fill(recoTrack->phi());
559  chi2OvDFTrack->Fill(recoTrack->normalizedChi2());
560  probchi2Track->Fill(TMath::Prob(recoTrack->chi2(),recoTrack->ndof()));
561  pTrack->Fill(recoTrack->p());
562  ptTrack->Fill(recoTrack->pt());
563  qTrack->Fill(recoTrack->charge());
564 
565  }
566 
567  if(recoMu.isStandAloneMuon() && !(recoMu.isGlobalMuon())) {
568  LogTrace(metname)<<"[MuonRecoAnalyzer] The mu is STA only - filling the histos";
569  if(!(recoMu.isTrackerMuon()))
570  muReco->Fill(5);
571 
572  // get the track using only the mu spectrometer data
573  reco::TrackRef recoStaTrack = recoMu.standAloneMuon();
574 
575  etaStaTrack->Fill(recoStaTrack->eta());
576  thetaStaTrack->Fill(recoStaTrack->theta());
577  phiStaTrack->Fill(recoStaTrack->phi());
578  chi2OvDFStaTrack->Fill(recoStaTrack->normalizedChi2());
579  probchi2StaTrack->Fill(TMath::Prob(recoStaTrack->chi2(),recoStaTrack->ndof()));
580  pStaTrack->Fill(recoStaTrack->p());
581  ptStaTrack->Fill(recoStaTrack->pt());
582  qStaTrack->Fill(recoStaTrack->charge());
583 
584  }
585 
586  if(recoMu.isCaloMuon() && !(recoMu.isGlobalMuon()) && !(recoMu.isTrackerMuon()) && !(recoMu.isStandAloneMuon()))
587  muReco->Fill(6);
588 
589  //efficiency plots
590 
591  // get the track using only the mu spectrometer data
592  reco::TrackRef recoStaGlbTrack = recoMu.standAloneMuon();
593 
594  if(recoMu.isStandAloneMuon()){
595  etaEfficiency[0]->Fill(recoStaGlbTrack->eta());
596  phiEfficiency[0]->Fill(recoStaGlbTrack->phi());
597  }
598  if(recoMu.isStandAloneMuon() && recoMu.isGlobalMuon()){
599  etaEfficiency[1]->Fill(recoStaGlbTrack->eta());
600  phiEfficiency[1]->Fill(recoStaGlbTrack->phi());
601  }
602 
603 
604 
605 
606 }
MonitorElement * muReco
std::vector< MonitorElement * > oneOverpResolution
MonitorElement * qOverptPull
std::vector< MonitorElement * > ptGlbTrack
std::vector< MonitorElement * > chi2OvDFGlbTrack
bool isTrackerMuon() const
Definition: Muon.h:220
MonitorElement * etaStaTrack
virtual TrackRef track() const
reference to a Track
Definition: Muon.h:50
bool isGlobalMuon() const
Definition: Muon.h:219
std::vector< MonitorElement * > phiGlbTrack
bool isStandAloneMuon() const
Definition: Muon.h:221
MonitorElement * chi2OvDFStaTrack
MonitorElement * phiStaTrack
MonitorElement * qOverpPull
std::vector< MonitorElement * > phiEfficiency
bool isCaloMuon() const
Definition: Muon.h:222
void Fill(long long x)
MonitorElement * etaTrack
virtual TrackRef muonBestTrack() const
Definition: Muon.h:64
MonitorElement * chi2OvDFTrack
std::vector< MonitorElement * > qOverptResolution
std::vector< MonitorElement * > etaGlbTrack
std::vector< MonitorElement * > pGlbTrack
std::vector< MonitorElement * > qOverpResolution
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * oneOverpPull
std::string metname
std::vector< MonitorElement * > qGlbTrack
MonitorElement * pTrack
std::vector< MonitorElement * > probchi2GlbTrack
std::vector< MonitorElement * > etaResolution
MonitorElement * oneOverptPull
MonitorElement * tunePResolution
std::vector< MonitorElement * > etaEfficiency
#define LogTrace(id)
void GetRes(reco::TrackRef t1, reco::TrackRef t2, std::string par, float &res, float &pull)
MonitorElement * thetaStaTrack
Definition: DetId.h:20
std::vector< MonitorElement * > phiResolution
virtual TrackRef combinedMuon() const
reference to a stand-alone muon Track
Definition: Muon.h:56
std::vector< MonitorElement * > thetaGlbTrack
MonitorElement * phiPull
MonitorElement * phiTrack
std::vector< MonitorElement * > oneOverptResolution
MonitorElement * probchi2Track
std::vector< MonitorElement * > muVStkSytemRotation
MonitorElement * ptTrack
MonitorElement * probchi2StaTrack
MonitorElement * ptStaTrack
std::vector< MonitorElement * > rhAnalysis
MonitorElement * etaPull
virtual TrackRef tunePMuonBestTrack() const
Definition: Muon.h:66
MonitorElement * pStaTrack
MonitorElement * thetaTrack
std::vector< MonitorElement * > thetaResolution
MonitorElement * qTrack
MonitorElement * thetaPull
MonitorElement * qStaTrack
virtual TrackRef standAloneMuon() const
reference to a stand-alone muon Track
Definition: Muon.h:53
void MuonRecoAnalyzer::beginJob ( DQMStore dbe)
virtual

Inizialize parameters for histo binning.

Implements MuonAnalyzerBase.

Definition at line 38 of file MuonRecoAnalyzer.cc.

References DQMStore::book1D(), DQMStore::book2D(), chi2Bin, chi2Max, chi2Min, chi2OvDFGlbTrack, chi2OvDFStaTrack, chi2OvDFTrack, etaBin, etaEfficiency, etaGlbTrack, etaMax, etaMin, etaPull, etaResolution, etaStaTrack, etaTrack, edm::ParameterSet::getParameter(), LogTrace, metname, muReco, muVStkSytemRotation, oneOverpPull, oneOverpResolution, oneOverptPull, oneOverptResolution, parameters, pBin, pGlbTrack, phiBin, phiEfficiency, phiGlbTrack, phiMax, phiMin, phiPull, phiResolution, phiStaTrack, phiTrack, pMax, pMin, pResBin, pResMax, pResMin, probchi2GlbTrack, probchi2StaTrack, probchi2Track, pStaTrack, ptBin, ptGlbTrack, ptMax, ptMin, pTrack, ptStaTrack, ptTrack, qGlbTrack, qOverpPull, qOverpResolution, qOverptPull, qOverptResolution, qStaTrack, qTrack, rhAnalysis, rhBin, rhMax, rhMin, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, thetaBin, thetaGlbTrack, thetaMax, thetaMin, thetaPull, thetaResolution, thetaStaTrack, thetaTrack, tunePBin, tunePMax, tunePMin, and tunePResolution.

38  {
39 
40  metname = "muRecoAnalyzer";
41 
42  LogTrace(metname)<<"[MuonRecoAnalyzer] Parameters initialization";
43  dbe->setCurrentFolder("Muons/MuonRecoAnalyzer");
44 
45  muReco = dbe->book1D("muReco", "muon reconstructed tracks", 6, 1, 7);
46  muReco->setBinLabel(1,"glb+tk+sta");
47  muReco->setBinLabel(2,"glb+sta");
48  muReco->setBinLabel(3,"tk+sta");
49  muReco->setBinLabel(4,"tk");
50  muReco->setBinLabel(5,"sta");
51  muReco->setBinLabel(6,"calo");
52 
53  int binFactor = 4;
54 
55  // monitoring of eta parameter
56  etaBin = parameters.getParameter<int>("etaBin");
57  etaMin = parameters.getParameter<double>("etaMin");
58  etaMax = parameters.getParameter<double>("etaMax");
59  std::string histname = "GlbMuon_";
60  etaGlbTrack.push_back(dbe->book1D(histname+"Glb_eta", "#eta_{GLB}", etaBin, etaMin, etaMax));
61  etaGlbTrack.push_back(dbe->book1D(histname+"Tk_eta", "#eta_{TKfromGLB}", etaBin, etaMin, etaMax));
62  etaGlbTrack.push_back(dbe->book1D(histname+"Sta_eta", "#eta_{STAfromGLB}", etaBin, etaMin, etaMax));
63  etaResolution.push_back(dbe->book1D("Res_TkGlb_eta", "#eta_{TKfromGLB} - #eta_{GLB}", etaBin*binFactor, etaMin/3000, etaMax/3000));
64  etaResolution.push_back(dbe->book1D("Res_GlbSta_eta", "#eta_{GLB} - #eta_{STAfromGLB}", etaBin*binFactor, etaMin/100, etaMax/100));
65  etaResolution.push_back(dbe->book1D("Res_TkSta_eta", "#eta_{TKfromGLB} - #eta_{STAfromGLB}", etaBin*binFactor, etaMin/100, etaMax/100));
66  etaResolution.push_back(dbe->book2D("ResVsEta_TkGlb_eta", "(#eta_{TKfromGLB} - #eta_{GLB}) vs #eta_{GLB}", etaBin, etaMin, etaMax, etaBin*binFactor, etaMin/3000, etaMax/3000));
67  etaResolution.push_back(dbe->book2D("ResVsEta_GlbSta_eta", "(#eta_{GLB} - #eta_{STAfromGLB}) vs #eta_{GLB}", etaBin, etaMin, etaMax, etaBin*binFactor, etaMin/100, etaMax/100));
68  etaResolution.push_back(dbe->book2D("ResVsEta_TkSta_eta", "(#eta_{TKfromGLB} - #eta_{STAfromGLB}) vs #eta_{TKfromGLB}", etaBin, etaMin, etaMax, etaBin*binFactor, etaMin/100, etaMax/100));
69  etaPull = dbe->book1D("Pull_TkSta_eta", "#eta_{TKfromGLB} - #eta_{GLB} / error", 100,-10,10);
70  etaTrack = dbe->book1D("TkMuon_eta", "#eta_{TK}", etaBin, etaMin, etaMax);
71  etaStaTrack = dbe->book1D("StaMuon_eta", "#eta_{STA}", etaBin, etaMin, etaMax);
72  etaEfficiency.push_back(dbe->book1D("StaEta", "#eta_{STAfromGLB}", etaBin, etaMin, etaMax));
73  etaEfficiency.push_back(dbe->book1D("StaEta_ifCombinedAlso", "#eta_{STAfromGLB} if isGlb=true", etaBin, etaMin, etaMax));
74 
75  // monitoring of theta parameter
76  thetaBin = parameters.getParameter<int>("thetaBin");
77  thetaMin = parameters.getParameter<double>("thetaMin");
78  thetaMax = parameters.getParameter<double>("thetaMax");
79  thetaGlbTrack.push_back(dbe->book1D(histname+"Glb_theta", "#theta_{GLB}", thetaBin, thetaMin, thetaMax));
80  thetaGlbTrack[0]->setAxisTitle("rad");
81  thetaGlbTrack.push_back(dbe->book1D(histname+"Tk_theta", "#theta_{TKfromGLB}", thetaBin, thetaMin, thetaMax));
82  thetaGlbTrack[1]->setAxisTitle("rad");
83  thetaGlbTrack.push_back(dbe->book1D(histname+"Sta_theta", "#theta_{STAfromGLB}", thetaBin, thetaMin, thetaMax));
84  thetaGlbTrack[2]->setAxisTitle("rad");
85  thetaResolution.push_back(dbe->book1D("Res_TkGlb_theta", "#theta_{TKfromGLB} - #theta_{GLB}", thetaBin*binFactor, -(thetaMax/3000), thetaMax/3000));
86  thetaResolution[0]->setAxisTitle("rad");
87  thetaResolution.push_back(dbe->book1D("Res_GlbSta_theta", "#theta_{GLB} - #theta_{STAfromGLB}", thetaBin*binFactor,-(thetaMax/100), thetaMax/100));
88  thetaResolution[1]->setAxisTitle("rad");
89  thetaResolution.push_back(dbe->book1D("Res_TkSta_theta", "#theta_{TKfromGLB} - #theta_{STAfromGLB}", thetaBin*binFactor, -(thetaMax/100), thetaMax/100));
90  thetaResolution[2]->setAxisTitle("rad");
91  thetaResolution.push_back(dbe->book2D("ResVsTheta_TkGlb_theta", "(#theta_{TKfromGLB} - #theta_{GLB}) vs #theta_{GLB}", thetaBin, thetaMin, thetaMax, thetaBin*binFactor, -(thetaMax/3000), thetaMax/3000));
92  thetaResolution[3]->setAxisTitle("rad",1);
93  thetaResolution[3]->setAxisTitle("rad",2);
94  thetaResolution.push_back(dbe->book2D("ResVsTheta_GlbSta_theta", "(#theta_{GLB} - #theta_{STAfromGLB}) vs #theta_{GLB}", thetaBin, thetaMin, thetaMax, thetaBin*binFactor, -(thetaMax/100), thetaMax/100));
95  thetaResolution[4]->setAxisTitle("rad",1);
96  thetaResolution[4]->setAxisTitle("rad",2);
97  thetaResolution.push_back(dbe->book2D("ResVsTheta_TkSta_theta", "(#theta_{TKfromGLB} - #theta_{STAfromGLB}) vs #theta_{TKfromGLB}", thetaBin, thetaMin, thetaMax, thetaBin*binFactor, -(thetaMax/100), thetaMax/100));
98  thetaResolution[5]->setAxisTitle("rad",1);
99  thetaResolution[5]->setAxisTitle("rad",2);
100  thetaPull = dbe->book1D("Pull_TkSta_theta", "#theta_{TKfromGLB} - #theta_{STAfromGLB} / error", 100,-10,10);
101  thetaTrack = dbe->book1D("TkMuon_theta", "#theta_{TK}", thetaBin, thetaMin, thetaMax);
102  thetaTrack->setAxisTitle("rad");
103  thetaStaTrack = dbe->book1D("StaMuon_theta", "#theta_{STA}", thetaBin, thetaMin, thetaMax);
104  thetaStaTrack->setAxisTitle("rad");
105 
106  // monitoring tunePMuonBestTrack Pt
107  tunePBin= parameters.getParameter<int>("tunePBin");
108  tunePMax= parameters.getParameter<double>("tunePMax");
109  tunePMin= parameters.getParameter<double>("tunePMin");
110 
111  tunePResolution = dbe->book1D("Res_TuneP_pt", "Pt_{MuonBestTrack}-Pt_{tunePMuonBestTrack}/Pt_{MuonBestTrack}", tunePBin, tunePMin, tunePMax);
112 
113 
114 
115  // monitoring of phi paramater
116  phiBin = parameters.getParameter<int>("phiBin");
117  phiMin = parameters.getParameter<double>("phiMin");
118  phiMax = parameters.getParameter<double>("phiMax");
119  phiGlbTrack.push_back(dbe->book1D(histname+"Glb_phi", "#phi_{GLB}", phiBin, phiMin, phiMax));
120  phiGlbTrack[0]->setAxisTitle("rad");
121  phiGlbTrack.push_back(dbe->book1D(histname+"Tk_phi", "#phi_{TKfromGLB}", phiBin, phiMin, phiMax));
122  phiGlbTrack[1]->setAxisTitle("rad");
123  phiGlbTrack.push_back(dbe->book1D(histname+"Sta_phi", "#phi_{STAfromGLB}", phiBin, phiMin, phiMax));
124  phiGlbTrack[2]->setAxisTitle("rad");
125  phiResolution.push_back(dbe->book1D("Res_TkGlb_phi", "#phi_{TKfromGLB} - #phi_{GLB}", phiBin*binFactor, phiMin/3000, phiMax/3000));
126  phiResolution[0]->setAxisTitle("rad");
127  phiResolution.push_back(dbe->book1D("Res_GlbSta_phi", "#phi_{GLB} - #phi_{STAfromGLB}", phiBin*binFactor, phiMin/100, phiMax/100));
128  phiResolution[1]->setAxisTitle("rad");
129  phiResolution.push_back(dbe->book1D("Res_TkSta_phi", "#phi_{TKfromGLB} - #phi_{STAfromGLB}", phiBin*binFactor, phiMin/100, phiMax/100));
130  phiResolution[2]->setAxisTitle("rad");
131  phiResolution.push_back(dbe->book2D("ResVsPhi_TkGlb_phi", "(#phi_{TKfromGLB} - #phi_{GLB}) vs #phi_GLB", phiBin, phiMin, phiMax, phiBin*binFactor, phiMin/3000, phiMax/3000));
132  phiResolution[3]->setAxisTitle("rad",1);
133  phiResolution[3]->setAxisTitle("rad",2);
134  phiResolution.push_back(dbe->book2D("ResVsPhi_GlbSta_phi", "(#phi_{GLB} - #phi_{STAfromGLB}) vs #phi_{GLB}", phiBin, phiMin, phiMax, phiBin*binFactor, phiMin/100, phiMax/100));
135  phiResolution[4]->setAxisTitle("rad",1);
136  phiResolution[4]->setAxisTitle("rad",2);
137  phiResolution.push_back(dbe->book2D("ResVsPhi_TkSta_phi", "(#phi_{TKfromGLB} - #phi_{STAfromGLB}) vs #phi_{TKfromGLB}", phiBin, phiMin, phiMax, phiBin*binFactor, phiMin/100, phiMax/100));
138  phiResolution[5]->setAxisTitle("rad",1);
139  phiResolution[5]->setAxisTitle("rad",2);
140  phiPull = dbe->book1D("Pull_TkSta_phi", "#phi_{TKfromGLB} - #phi_{STAfromGLB} / error", 100,-10,10);
141  phiTrack = dbe->book1D("TkMuon_phi", "#phi_{TK}", phiBin, phiMin, phiMax);
142  phiTrack->setAxisTitle("rad");
143  phiStaTrack = dbe->book1D("StaMuon_phi", "#phi_{STA}", phiBin, phiMin, phiMax);
144  phiStaTrack->setAxisTitle("rad");
145  phiEfficiency.push_back(dbe->book1D("StaPhi", "#phi_{STAfromGLB}", phiBin, phiMin, phiMax));
146  phiEfficiency[0]->setAxisTitle("rad");
147  phiEfficiency.push_back(dbe->book1D("StaPhi_ifCombinedAlso", "#phi_{STAfromGLB} if the isGlb=true", phiBin, phiMin, phiMax));
148  phiEfficiency[1]->setAxisTitle("rad");
149 
150  // monitoring of the chi2 parameter
151  chi2Bin = parameters.getParameter<int>("chi2Bin");
152  chi2Min = parameters.getParameter<double>("chi2Min");
153  chi2Max = parameters.getParameter<double>("chi2Max");
154  chi2OvDFGlbTrack.push_back(dbe->book1D(histname+"Glb_chi2OverDf", "#chi_{2}OverDF_{GLB}", chi2Bin, chi2Min, chi2Max));
155  chi2OvDFGlbTrack.push_back(dbe->book1D(histname+"Tk_chi2OverDf", "#chi_{2}OverDF_{TKfromGLB}", phiBin, chi2Min, chi2Max));
156  chi2OvDFGlbTrack.push_back(dbe->book1D(histname+"Sta_chi2OverDf", "#chi_{2}OverDF_{STAfromGLB}", chi2Bin, chi2Min, chi2Max));
157  chi2OvDFTrack = dbe->book1D("TkMuon_chi2OverDf", "#chi_{2}OverDF_{TK}", chi2Bin, chi2Min, chi2Max);
158  chi2OvDFStaTrack = dbe->book1D("StaMuon_chi2OverDf", "#chi_{2}OverDF_{STA}", chi2Bin, chi2Min, chi2Max);
159 //--------------------------
160  probchi2GlbTrack.push_back(dbe->book1D(histname+"Glb_probchi", "Prob #chi_{GLB}", 120, chi2Min, 1.20));
161  probchi2GlbTrack.push_back(dbe->book1D(histname+"Tk_probchi", "Prob #chi_{TKfromGLB}", 120, chi2Min, 1.20));
162  probchi2GlbTrack.push_back(dbe->book1D(histname+"Sta_probchi", "Prob #chi_{STAfromGLB}", 120, chi2Min, 1.20));
163  probchi2Track=dbe->book1D("TkMuon_probchi", "Prob #chi_{TK}", 120, chi2Min, 1.20);
164  probchi2StaTrack=dbe->book1D("StaMuon_probchi", "Prob #chi_{STA}", 120, chi2Min, 1.20);
165 
166  // monitoring of the momentum
167  pBin = parameters.getParameter<int>("pBin");
168  pMin = parameters.getParameter<double>("pMin");
169  pMax = parameters.getParameter<double>("pMax");
170  pGlbTrack.push_back(dbe->book1D(histname+"Glb_p", "p_{GLB}", pBin, pMin, pMax));
171  pGlbTrack[0]->setAxisTitle("GeV");
172  pGlbTrack.push_back(dbe->book1D(histname+"Tk_p", "p_{TKfromGLB}", pBin, pMin, pMax));
173  pGlbTrack[1]->setAxisTitle("GeV");
174  pGlbTrack.push_back(dbe->book1D(histname+"Sta_p", "p_{STAfromGLB}", pBin, pMin, pMax));
175  pGlbTrack[2]->setAxisTitle("GeV");
176  pTrack = dbe->book1D("TkMuon_p", "p_{TK}", pBin, pMin, pMax);
177  pTrack->setAxisTitle("GeV");
178  pStaTrack = dbe->book1D("StaMuon_p", "p_{STA}", pBin, pMin, pMax);
179  pStaTrack->setAxisTitle("GeV");
180 
181  // monitoring of the transverse momentum
182  ptBin = parameters.getParameter<int>("ptBin");
183  ptMin = parameters.getParameter<double>("ptMin");
184  ptMax = parameters.getParameter<double>("ptMax");
185  ptGlbTrack.push_back(dbe->book1D(histname+"Glb_pt", "pt_{GLB}", ptBin, ptMin, ptMax));
186  ptGlbTrack[0]->setAxisTitle("GeV");
187  ptGlbTrack.push_back(dbe->book1D(histname+"Tk_pt", "pt_{TKfromGLB}", ptBin, ptMin, ptMax));
188  ptGlbTrack[1]->setAxisTitle("GeV");
189  ptGlbTrack.push_back(dbe->book1D(histname+"Sta_pt", "pt_{STAfromGLB}", ptBin, ptMin, ptMax));
190  ptGlbTrack[2]->setAxisTitle("GeV");
191  ptTrack = dbe->book1D("TkMuon_pt", "pt_{TK}", ptBin, ptMin, ptMax);
192  ptTrack->setAxisTitle("GeV");
193  ptStaTrack = dbe->book1D("StaMuon_pt", "pt_{STA}", ptBin, ptMin, pMax);
194  ptStaTrack->setAxisTitle("GeV");
195 
196  // monitoring of the muon charge
197  qGlbTrack.push_back(dbe->book1D(histname+"Glb_q", "q_{GLB}", 5, -2.5, 2.5));
198  qGlbTrack.push_back(dbe->book1D(histname+"Tk_q", "q_{TKfromGLB}", 5, -2.5, 2.5));
199  qGlbTrack.push_back(dbe->book1D(histname+"Sta_q", "q_{STAformGLB}", 5, -2.5, 2.5));
200  qGlbTrack.push_back(dbe->book1D(histname+"qComparison", "comparison between q_{GLB} and q_{TKfromGLB}, q_{STAfromGLB}", 8, 0.5, 8.5));
201  qGlbTrack[3]->setBinLabel(1,"qGlb=qSta");
202  qGlbTrack[3]->setBinLabel(2,"qGlb!=qSta");
203  qGlbTrack[3]->setBinLabel(3,"qGlb=qTk");
204  qGlbTrack[3]->setBinLabel(4,"qGlb!=qTk");
205  qGlbTrack[3]->setBinLabel(5,"qSta=qTk");
206  qGlbTrack[3]->setBinLabel(6,"qSta!=qTk");
207  qGlbTrack[3]->setBinLabel(7,"qGlb!=qSta,qGlb!=Tk");
208  qGlbTrack[3]->setBinLabel(8,"qGlb=qSta,qGlb=Tk");
209  qTrack = dbe->book1D("TkMuon_q", "q_{TK}", 5, -2.5, 2.5);
210  qStaTrack = dbe->book1D("StaMuon_q", "q_{STA}", 5, -2.5, 2.5);
211 
212  // monitoring of the momentum resolution
213  pResBin = parameters.getParameter<int>("pResBin");
214  pResMin = parameters.getParameter<double>("pResMin");
215  pResMax = parameters.getParameter<double>("pResMax");
216  qOverpResolution.push_back(dbe->book1D("Res_TkGlb_qOverp", "(q/p)_{TKfromGLB} - (q/p)_{GLB}", pResBin*binFactor*2, pResMin/10, pResMax/10));
217  qOverpResolution[0]->setAxisTitle("GeV^{-1}");
218  qOverpResolution.push_back(dbe->book1D("Res_GlbSta_qOverp", "(q/p)_{GLB} - (q/p)_{STAfromGLB}", pResBin*binFactor, pResMin, pResMax));
219  qOverpResolution[1]->setAxisTitle("GeV^{-1}");
220  qOverpResolution.push_back(dbe->book1D("Res_TkSta_qOverp", "(q/p)_{TKfromGLB} - (q/p)_{STAfromGLB}", pResBin*binFactor, pResMin, pResMax));
221  qOverpResolution[2]->setAxisTitle("GeV^{-1}");
222  qOverpPull = dbe->book1D("Pull_TkSta_qOverp", "(q/p)_{TKfromGLB} - (q/p)_{STAfromGLB} / error", 100,-10,10);
223 
224  oneOverpResolution.push_back(dbe->book1D("Res_TkGlb_oneOverp", "(1/p)_{TKfromGLB} - (1/p)_{GLB}", pResBin*binFactor*2, pResMin/10, pResMax/10));
225  oneOverpResolution[0]->setAxisTitle("GeV^{-1}");
226  oneOverpResolution.push_back(dbe->book1D("Res_GlbSta_oneOverp", "(1/p)_{GLB} - (1/p)_{STAfromGLB}", pResBin*binFactor, pResMin, pResMax));
227  oneOverpResolution[1]->setAxisTitle("GeV^{-1}");
228  oneOverpResolution.push_back(dbe->book1D("Res_TkSta_oneOverp", "(q/p)_{TKfromGLB} - (q/p)_{STAfromGLB}", pResBin*binFactor, pResMin, pResMax));
229  oneOverpResolution[2]->setAxisTitle("GeV^{-1}");
230  oneOverpPull = dbe->book1D("Pull_TkSta_oneOverp", "(1/p)_{TKfromGLB} - (1/p)_{STAfromGLB} / error", 100,-10,10);
231 
232 
233  qOverptResolution.push_back(dbe->book1D("Res_TkGlb_qOverpt", "(q/p_{t})_{TKfromGLB} - (q/p_{t})_{GLB}", pResBin*binFactor*2, pResMin/10, pResMax/10));
234  qOverptResolution[0]->setAxisTitle("GeV^{-1}");
235  qOverptResolution.push_back(dbe->book1D("Res_GlbSta_qOverpt", "(q/p_{t})_{GLB} - (q/p_{t})_{STAfromGLB}", pResBin*binFactor, pResMin, pResMax));
236  qOverptResolution[1]->setAxisTitle("GeV^{-1}");
237  qOverptResolution.push_back(dbe->book1D("Res_TkSta_qOverpt", "(q/p_{t})_{TKfromGLB} - (q/p_{t})_{STAfromGLB}", pResBin*binFactor, pResMin, pResMax));
238  qOverptResolution[2]->setAxisTitle("GeV^{-1}");
239  qOverptPull = dbe->book1D("Pull_TkSta_qOverpt", "(q/pt)_{TKfromGLB} - (q/pt)_{STAfromGLB} / error", 100,-10,10);
240 
241  oneOverptResolution.push_back(dbe->book1D("Res_TkGlb_oneOverpt", "(1/p_{t})_{TKfromGLB} - (1/p_{t})_{GLB}", pResBin*binFactor*2, pResMin/10, pResMax/10));
242  oneOverptResolution[0]->setAxisTitle("GeV^{-1}");
243  oneOverptResolution.push_back(dbe->book1D("Res_GlbSta_oneOverpt", "(1/p_{t})_{GLB} - (1/p_{t})_{STAfromGLB}", pResBin*binFactor, pResMin, pResMax));
244  oneOverptResolution[1]->setAxisTitle("GeV^{-1}");
245  oneOverptResolution.push_back(dbe->book1D("Res_TkSta_oneOverpt", "(1/p_{t})_{TKfromGLB} - (1/p_{t})_{STAfromGLB}", pResBin*binFactor, pResMin, pResMax));
246  oneOverptResolution[2]->setAxisTitle("GeV^{-1}");
247  oneOverptResolution.push_back(dbe->book2D("ResVsEta_TkGlb_oneOverpt", "(#eta_{TKfromGLB} - #eta_{GLB}) vs (1/p_{t})_{GLB}", etaBin, etaMin, etaMax, pResBin*binFactor*2, pResMin/10, pResMax/10));
248  oneOverptResolution[3]->setAxisTitle("GeV^{-1}",2);
249  oneOverptResolution.push_back(dbe->book2D("ResVsEta_GlbSta_oneOverpt", "(#eta_{GLB} - #eta_{STAfromGLB} vs (1/p_{t})_{GLB}", etaBin, etaMin, etaMax, pResBin*binFactor, pResMin, pResMax));
250  oneOverptResolution[4]->setAxisTitle("GeV^{-1}",2);
251  oneOverptResolution.push_back(dbe->book2D("ResVsEta_TkSta_oneOverpt", "(#eta_{TKfromGLB} - #eta_{STAfromGLB}) vs (1/p_{t})_{TKfromGLB}", etaBin, etaMin, etaMax, pResBin*binFactor, pResMin, pResMax));
252  oneOverptResolution[5]->setAxisTitle("GeV^{-1}",2);
253  oneOverptResolution.push_back(dbe->book2D("ResVsPhi_TkGlb_oneOverpt", "(#phi_{TKfromGLB} - #phi_{GLB}) vs (1/p_{t})_{GLB}", phiBin, phiMin, phiMax, pResBin*binFactor*2, pResMin/10, pResMax/10));
254  oneOverptResolution[6]->setAxisTitle("rad",1);
255  oneOverptResolution[6]->setAxisTitle("GeV^{-1}",2);
256  oneOverptResolution.push_back(dbe->book2D("ResVsPhi_GlbSta_oneOverpt", "(#phi_{GLB} - #phi_{STAfromGLB} vs (1/p_{t})_{GLB}", phiBin, phiMin, phiMax, pResBin*binFactor, pResMin, pResMax));
257  oneOverptResolution[7]->setAxisTitle("rad",1);
258  oneOverptResolution[7]->setAxisTitle("GeV^{-1}",2);
259  oneOverptResolution.push_back(dbe->book2D("ResVsPhi_TkSta_oneOverpt", "(#phi_{TKfromGLB} - #phi_{STAfromGLB}) vs (1/p_{t})_{TKfromGLB}", phiBin, phiMin, phiMax, pResBin*binFactor, pResMin, pResMax));
260  oneOverptResolution[8]->setAxisTitle("rad",1);
261  oneOverptResolution[8]->setAxisTitle("GeV^{-1}",2);
262  oneOverptResolution.push_back(dbe->book2D("ResVsPt_TkGlb_oneOverpt", "((1/p_{t})_{TKfromGLB} - (1/p_{t})_{GLB}) vs (1/p_{t})_{GLB}", ptBin/5, ptMin, ptMax/100, pResBin*binFactor*2, pResMin/10, pResMax/10));
263  oneOverptResolution[9]->setAxisTitle("GeV^{-1}",1);
264  oneOverptResolution[9]->setAxisTitle("GeV^{-1}",2);
265  oneOverptResolution.push_back(dbe->book2D("ResVsPt_GlbSta_oneOverpt", "((1/p_{t})_{GLB} - (1/p_{t})_{STAfromGLB} vs (1/p_{t})_{GLB}", ptBin/5, ptMin, ptMax/100, pResBin*binFactor, pResMin, pResMax));
266  oneOverptResolution[10]->setAxisTitle("GeV^{-1}",1);
267  oneOverptResolution[10]->setAxisTitle("GeV^{-1}",2);
268  oneOverptResolution.push_back(dbe->book2D("ResVsPt_TkSta_oneOverpt", "((1/p_{t})_{TKfromGLB} - (1/p_{t})_{STAfromGLB}) vs (1/p_{t})_{TKfromGLB}", ptBin/5, ptMin, ptMax/100, pResBin*binFactor, pResMin, pResMax));
269  oneOverptResolution[11]->setAxisTitle("GeV^{-1}",1);
270  oneOverptResolution[11]->setAxisTitle("GeV^{-1}",2);
271  oneOverptPull = dbe->book1D("Pull_TkSta_oneOverpt", "(1/pt)_{TKfromGLB} - (1/pt)_{STAfromGLB} / error", 100,-10,10);
272 
273 
274  // monitoring of the recHits provenance
275  rhBin=parameters.getParameter<int>("rhBin");
276  rhMin=parameters.getParameter<double>("rhMin");
277  rhMax=parameters.getParameter<double>("rhMax");
278  rhAnalysis.push_back(dbe->book1D("StaRh_Frac_inGlb", "recHits_{STAinGLB} / recHits_{GLB}", rhBin, rhMin, rhMax));
279  rhAnalysis.push_back(dbe->book1D("TkRh_Frac_inGlb", "recHits_{TKinGLB} / recHits_{GLB}", rhBin, rhMin, rhMax));
280  rhAnalysis.push_back(dbe->book1D("StaRh_inGlb_Div_RhAssoSta", "recHits_{STAinGLB} / recHits_{STAfromGLB}", rhBin, rhMin, rhMax));
281  rhAnalysis.push_back(dbe->book1D("TkRh_inGlb_Div_RhAssoTk", "recHits_{TKinGLB} / recHits_{TKfromGLB}", rhBin, rhMin, rhMax));
282  rhAnalysis.push_back(dbe->book1D("GlbRh_Div_RhAssoStaTk", "recHits_{GLB} / (recHits_{TKfromGLB}+recHits_{STAfromGLB})", rhBin, rhMin, rhMax));
283  rhAnalysis.push_back(dbe->book1D("invalidRh_Frac_inTk", "Invalid recHits / rechits_{GLB}", rhBin, rhMin, rhMax));
284 
285  // monitoring of the muon system rotation w.r.t. tracker
286  muVStkSytemRotation.push_back(dbe->book2D("muVStkSytemRotation_posMu", "pT_{TK} / pT_{GLB} vs pT_{GLB} for #mu^{+}", 50,0,200,100,0.8,1.2));
287  muVStkSytemRotation.push_back(dbe->book2D("muVStkSytemRotation_negMu", "pT_{TK} / pT_{GLB} vs pT_{GLB} for #mu^{-}", 50,0,200,100,0.8,1.2));
288 
289 }
T getParameter(std::string const &) const
MonitorElement * muReco
std::vector< MonitorElement * > oneOverpResolution
MonitorElement * qOverptPull
std::vector< MonitorElement * > ptGlbTrack
std::vector< MonitorElement * > chi2OvDFGlbTrack
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
MonitorElement * etaStaTrack
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
std::vector< MonitorElement * > phiGlbTrack
MonitorElement * chi2OvDFStaTrack
MonitorElement * phiStaTrack
MonitorElement * qOverpPull
std::vector< MonitorElement * > phiEfficiency
MonitorElement * etaTrack
MonitorElement * chi2OvDFTrack
std::vector< MonitorElement * > qOverptResolution
std::vector< MonitorElement * > etaGlbTrack
std::vector< MonitorElement * > pGlbTrack
std::vector< MonitorElement * > qOverpResolution
MonitorElement * oneOverpPull
std::string metname
std::vector< MonitorElement * > qGlbTrack
MonitorElement * pTrack
std::vector< MonitorElement * > probchi2GlbTrack
std::vector< MonitorElement * > etaResolution
MonitorElement * oneOverptPull
MonitorElement * tunePResolution
std::vector< MonitorElement * > etaEfficiency
#define LogTrace(id)
MonitorElement * thetaStaTrack
std::vector< MonitorElement * > phiResolution
edm::ParameterSet parameters
std::vector< MonitorElement * > thetaGlbTrack
MonitorElement * phiPull
MonitorElement * phiTrack
std::vector< MonitorElement * > oneOverptResolution
MonitorElement * probchi2Track
std::vector< MonitorElement * > muVStkSytemRotation
MonitorElement * ptTrack
MonitorElement * probchi2StaTrack
MonitorElement * ptStaTrack
std::vector< MonitorElement * > rhAnalysis
MonitorElement * etaPull
MonitorElement * pStaTrack
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
MonitorElement * thetaTrack
std::vector< MonitorElement * > thetaResolution
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * qTrack
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
MonitorElement * thetaPull
MonitorElement * qStaTrack
void MuonRecoAnalyzer::GetRes ( reco::TrackRef  t1,
reco::TrackRef  t2,
std::string  par,
float &  res,
float &  pull 
)

Definition at line 292 of file MuonRecoAnalyzer.cc.

References p1, p2, and mathSSE::sqrt().

Referenced by analyze().

292  {
293 
294  float p1=0, p2=0, p1e=1, p2e=1;
295 
296  if(par == "eta") {
297  p1 = t1->eta(); p1e = t1->etaError();
298  p2 = t2->eta(); p2e = t2->etaError();
299  }
300  else if(par == "theta") {
301  p1 = t1->theta(); p1e = t1->thetaError();
302  p2 = t2->theta(); p2e = t2->thetaError();
303  }
304  else if(par == "phi") {
305  p1 = t1->phi(); p1e = t1->phiError();
306  p2 = t2->phi(); p2e = t2->phiError();
307  }
308  else if(par == "qOverp") {
309  p1 = t1->charge()/t1->p(); p1e = t1->qoverpError();
310  p2 = t2->charge()/t2->p(); p2e = t2->qoverpError();
311  }
312  else if(par == "oneOverp") {
313  p1 = 1./t1->p(); p1e = t1->qoverpError();
314  p2 = 1./t2->p(); p2e = t2->qoverpError();
315  }
316  else if(par == "qOverpt") {
317  p1 = t1->charge()/t1->pt(); p1e = t1->ptError()*p1*p1;
318  p2 = t2->charge()/t2->pt(); p2e = t2->ptError()*p2*p2;
319  }
320  else if(par == "oneOverpt") {
321  p1 = 1./t1->pt(); p1e = t1->ptError()*p1*p1;
322  p2 = 1./t2->pt(); p2e = t2->ptError()*p2*p2;
323  }
324 
325  res = p1 - p2;
326  if(p1e!=0 || p2e!=0) pull = res / sqrt(p1e*p1e + p2e*p2e);
327  else pull = -99;
328  return;
329 }
T sqrt(T t)
Definition: SSEVec.h:48
double p2[4]
Definition: TauolaWrapper.h:90
double p1[4]
Definition: TauolaWrapper.h:89

Member Data Documentation

int MuonRecoAnalyzer::chi2Bin
private

Definition at line 71 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

double MuonRecoAnalyzer::chi2Max
private

Definition at line 73 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

double MuonRecoAnalyzer::chi2Min
private

Definition at line 72 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

std::vector<MonitorElement*> MuonRecoAnalyzer::chi2OvDFGlbTrack
private

Definition at line 104 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::chi2OvDFStaTrack
private

Definition at line 140 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::chi2OvDFTrack
private

Definition at line 131 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

int MuonRecoAnalyzer::etaBin
private

Definition at line 59 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

std::vector<MonitorElement*> MuonRecoAnalyzer::etaEfficiency
private

Definition at line 146 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<MonitorElement*> MuonRecoAnalyzer::etaGlbTrack
private

Definition at line 98 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

double MuonRecoAnalyzer::etaMax
private

Definition at line 61 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

double MuonRecoAnalyzer::etaMin
private

Definition at line 60 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

MonitorElement* MuonRecoAnalyzer::etaPull
private

Definition at line 119 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<MonitorElement*> MuonRecoAnalyzer::etaResolution
private

Definition at line 99 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::etaStaTrack
private

Definition at line 137 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::etaTrack
private

Definition at line 128 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

std::string MuonRecoAnalyzer::metname
private

Definition at line 54 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::muReco
private

Definition at line 96 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<MonitorElement*> MuonRecoAnalyzer::muVStkSytemRotation
private

Definition at line 114 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::oneOverpPull
private

Definition at line 124 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<MonitorElement*> MuonRecoAnalyzer::oneOverpResolution
private

Definition at line 111 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::oneOverptPull
private

Definition at line 125 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<MonitorElement*> MuonRecoAnalyzer::oneOverptResolution
private

Definition at line 112 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

edm::ParameterSet MuonRecoAnalyzer::parameters
private
int MuonRecoAnalyzer::pBin
private

Definition at line 75 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

std::vector<MonitorElement*> MuonRecoAnalyzer::pGlbTrack
private

Definition at line 106 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

int MuonRecoAnalyzer::phiBin
private

Definition at line 67 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

std::vector<MonitorElement*> MuonRecoAnalyzer::phiEfficiency
private

Definition at line 147 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<MonitorElement*> MuonRecoAnalyzer::phiGlbTrack
private

Definition at line 102 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

double MuonRecoAnalyzer::phiMax
private

Definition at line 69 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

double MuonRecoAnalyzer::phiMin
private

Definition at line 68 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

MonitorElement* MuonRecoAnalyzer::phiPull
private

Definition at line 121 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<MonitorElement*> MuonRecoAnalyzer::phiResolution
private

Definition at line 103 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::phiStaTrack
private

Definition at line 139 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::phiTrack
private

Definition at line 130 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

double MuonRecoAnalyzer::pMax
private

Definition at line 77 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

double MuonRecoAnalyzer::pMin
private

Definition at line 76 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

int MuonRecoAnalyzer::pResBin
private

Definition at line 83 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

double MuonRecoAnalyzer::pResMax
private

Definition at line 85 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

double MuonRecoAnalyzer::pResMin
private

Definition at line 84 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

std::vector<MonitorElement*> MuonRecoAnalyzer::probchi2GlbTrack
private

Definition at line 105 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::probchi2StaTrack
private

Definition at line 141 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::probchi2Track
private

Definition at line 132 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::pStaTrack
private

Definition at line 142 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

int MuonRecoAnalyzer::ptBin
private

Definition at line 79 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

std::vector<MonitorElement*> MuonRecoAnalyzer::ptGlbTrack
private

Definition at line 107 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

double MuonRecoAnalyzer::ptMax
private

Definition at line 81 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

double MuonRecoAnalyzer::ptMin
private

Definition at line 80 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

MonitorElement* MuonRecoAnalyzer::pTrack
private

Definition at line 133 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::ptStaTrack
private

Definition at line 143 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::ptTrack
private

Definition at line 134 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<MonitorElement*> MuonRecoAnalyzer::qGlbTrack
private

Definition at line 108 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::qOverpPull
private

Definition at line 122 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<MonitorElement*> MuonRecoAnalyzer::qOverpResolution
private

Definition at line 109 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::qOverptPull
private

Definition at line 123 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<MonitorElement*> MuonRecoAnalyzer::qOverptResolution
private

Definition at line 110 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::qStaTrack
private

Definition at line 144 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::qTrack
private

Definition at line 135 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<MonitorElement*> MuonRecoAnalyzer::rhAnalysis
private

Definition at line 113 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

int MuonRecoAnalyzer::rhBin
private

Definition at line 87 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

double MuonRecoAnalyzer::rhMax
private

Definition at line 89 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

double MuonRecoAnalyzer::rhMin
private

Definition at line 88 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

edm::InputTag MuonRecoAnalyzer::theSTACollectionLabel
private

Definition at line 56 of file MuonRecoAnalyzer.h.

int MuonRecoAnalyzer::thetaBin
private

Definition at line 63 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

std::vector<MonitorElement*> MuonRecoAnalyzer::thetaGlbTrack
private

Definition at line 100 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

double MuonRecoAnalyzer::thetaMax
private

Definition at line 65 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

double MuonRecoAnalyzer::thetaMin
private

Definition at line 64 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

MonitorElement* MuonRecoAnalyzer::thetaPull
private

Definition at line 120 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

std::vector<MonitorElement*> MuonRecoAnalyzer::thetaResolution
private

Definition at line 101 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::thetaStaTrack
private

Definition at line 138 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

MonitorElement* MuonRecoAnalyzer::thetaTrack
private

Definition at line 129 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().

int MuonRecoAnalyzer::tunePBin
private

Definition at line 91 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

double MuonRecoAnalyzer::tunePMax
private

Definition at line 93 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

double MuonRecoAnalyzer::tunePMin
private

Definition at line 92 of file MuonRecoAnalyzer.h.

Referenced by beginJob().

MonitorElement* MuonRecoAnalyzer::tunePResolution
private

Definition at line 117 of file MuonRecoAnalyzer.h.

Referenced by analyze(), and beginJob().