Inizialize parameters for histo binning.
343 for (reco::MuonCollection::const_iterator recoMu = muons->begin(); recoMu!=muons->end(); ++recoMu){
345 if(recoMu->isGlobalMuon()) {
347 LogTrace(
metname)<<
"[MuonRecoAnalyzer] The mu is global - filling the histos";
348 if(recoMu->isTrackerMuon() && recoMu->isStandAloneMuon())
350 if(!(recoMu->isTrackerMuon()) && recoMu->isStandAloneMuon())
352 if(!recoMu->isStandAloneMuon())
353 LogTrace(
metname)<<
"[MuonRecoAnalyzer] ERROR: the mu is global but not standalone!";
367 phiVsetaGlbTrack[0]->Fill(recoCombinedGlbTrack->eta(), recoCombinedGlbTrack->phi());
371 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"eta", res, pull);
373 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"eta", res, pull);
375 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"eta", res, pull);
379 etaResolution[3]->Fill(recoCombinedGlbTrack->eta(), recoTkGlbTrack->eta()-recoCombinedGlbTrack->eta());
380 etaResolution[4]->Fill(recoCombinedGlbTrack->eta(), -recoStaGlbTrack->eta()+recoCombinedGlbTrack->eta());
381 etaResolution[5]->Fill(recoCombinedGlbTrack->eta(), recoTkGlbTrack->eta()-recoStaGlbTrack->eta());
387 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"theta", res, pull);
390 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"theta", res, pull);
393 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"theta", res, pull);
397 thetaResolution[3]->Fill(recoCombinedGlbTrack->theta(), recoTkGlbTrack->theta()-recoCombinedGlbTrack->theta());
398 thetaResolution[4]->Fill(recoCombinedGlbTrack->theta(), -recoStaGlbTrack->theta()+recoCombinedGlbTrack->theta());
399 thetaResolution[5]->Fill(recoCombinedGlbTrack->theta(), recoTkGlbTrack->theta()-recoStaGlbTrack->theta());
406 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"phi", res, pull);
408 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"phi", res, pull);
410 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"phi", res, pull);
413 phiResolution[3]->Fill(recoCombinedGlbTrack->phi(), recoTkGlbTrack->phi()-recoCombinedGlbTrack->phi());
414 phiResolution[4]->Fill(recoCombinedGlbTrack->phi(), -recoStaGlbTrack->phi()+recoCombinedGlbTrack->phi());
415 phiResolution[5]->Fill(recoCombinedGlbTrack->phi(), recoTkGlbTrack->phi()-recoStaGlbTrack->phi());
423 probchi2GlbTrack[0]->Fill(TMath::Prob(recoCombinedGlbTrack->chi2(),recoCombinedGlbTrack->ndof()));
424 probchi2GlbTrack[1]->Fill(TMath::Prob(recoTkGlbTrack->chi2(),recoTkGlbTrack->ndof()));
425 probchi2GlbTrack[2]->Fill(TMath::Prob(recoStaGlbTrack->chi2(),recoStaGlbTrack->ndof()));
429 pGlbTrack[0]->Fill(recoCombinedGlbTrack->p());
431 pGlbTrack[2]->Fill(recoStaGlbTrack->p());
433 ptGlbTrack[0]->Fill(recoCombinedGlbTrack->pt());
437 qGlbTrack[0]->Fill(recoCombinedGlbTrack->charge());
438 qGlbTrack[1]->Fill(recoTkGlbTrack->charge());
439 qGlbTrack[2]->Fill(recoStaGlbTrack->charge());
440 if(recoCombinedGlbTrack->charge()==recoStaGlbTrack->charge())
qGlbTrack[3]->
Fill(1);
442 if(recoCombinedGlbTrack->charge()==recoTkGlbTrack->charge())
qGlbTrack[3]->
Fill(3);
444 if(recoStaGlbTrack->charge()==recoTkGlbTrack->charge())
qGlbTrack[3]->
Fill(5);
446 if(recoCombinedGlbTrack->charge()!=recoStaGlbTrack->charge() && recoCombinedGlbTrack->charge()!=recoTkGlbTrack->charge())
qGlbTrack[3]->
Fill(7);
447 if(recoCombinedGlbTrack->charge()==recoStaGlbTrack->charge() && recoCombinedGlbTrack->charge()==recoTkGlbTrack->charge())
qGlbTrack[3]->
Fill(8);
449 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"qOverp", res, pull);
451 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"qOverp", res, pull);
453 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"qOverp", res, pull);
458 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"oneOverp", res, pull);
460 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"oneOverp", res, pull);
462 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"oneOverp", res, pull);
467 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"qOverpt", res, pull);
469 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"qOverpt", res, pull);
471 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"qOverpt", res, pull);
475 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"oneOverpt", res, pull);
477 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"oneOverpt", res, pull);
479 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"oneOverpt", res, pull);
490 double bestTrackPt = recoBestTrack->pt();
492 double tunePBestTrackPt = recoTunePBestTrack->pt();
494 double tunePBestTrackRes = (bestTrackPt - tunePBestTrackPt) / bestTrackPt;
499 oneOverptResolution[3]->Fill(recoCombinedGlbTrack->eta(),(1/recoTkGlbTrack->pt())-(1/recoCombinedGlbTrack->pt()));
500 oneOverptResolution[4]->Fill(recoCombinedGlbTrack->eta(),-(1/recoStaGlbTrack->pt())+(1/recoCombinedGlbTrack->pt()));
501 oneOverptResolution[5]->Fill(recoCombinedGlbTrack->eta(),(1/recoTkGlbTrack->pt())-(1/recoStaGlbTrack->pt()));
502 oneOverptResolution[6]->Fill(recoCombinedGlbTrack->phi(),(1/recoTkGlbTrack->pt())-(1/recoCombinedGlbTrack->pt()));
503 oneOverptResolution[7]->Fill(recoCombinedGlbTrack->phi(),-(1/recoStaGlbTrack->pt())+(1/recoCombinedGlbTrack->pt()));
504 oneOverptResolution[8]->Fill(recoCombinedGlbTrack->phi(),(1/recoTkGlbTrack->pt())-(1/recoStaGlbTrack->pt()));
505 oneOverptResolution[9]->Fill(recoCombinedGlbTrack->pt(),(1/recoTkGlbTrack->pt())-(1/recoCombinedGlbTrack->pt()));
506 oneOverptResolution[10]->Fill(recoCombinedGlbTrack->pt(),-(1/recoStaGlbTrack->pt())+(1/recoCombinedGlbTrack->pt()));
507 oneOverptResolution[11]->Fill(recoCombinedGlbTrack->pt(),(1/recoTkGlbTrack->pt())-(1/recoStaGlbTrack->pt()));
510 double rhGlb = recoCombinedGlbTrack->found();
512 double rhGlb_StaProvenance=0;
514 double rhGlb_TkProvenance=0;
516 recHit!=recoCombinedGlbTrack->recHitsEnd(); ++recHit){
517 if((*recHit)->isValid()){
518 DetId id = (*recHit)->geographicalId();
520 rhGlb_StaProvenance++;
522 rhGlb_TkProvenance++;
526 double rhStaGlb = recoStaGlbTrack->recHitsSize();
528 double rhTkGlb = recoTkGlbTrack->found();
530 double rhTkGlb_notValid = recoTkGlbTrack->lost();
533 rhAnalysis[0]->Fill(rhGlb_StaProvenance/rhGlb);
534 rhAnalysis[1]->Fill(rhGlb_TkProvenance/rhGlb);
535 rhAnalysis[2]->Fill(rhGlb_StaProvenance/rhStaGlb);
536 rhAnalysis[3]->Fill(rhGlb_TkProvenance/rhTkGlb);
537 rhAnalysis[4]->Fill(rhGlb/(rhStaGlb+rhTkGlb));
541 if(recoCombinedGlbTrack->charge()>0)
544 muVStkSytemRotation[1]->Fill(recoCombinedGlbTrack->pt(),recoTkGlbTrack->pt()/recoCombinedGlbTrack->pt());
549 if(recoMu->isTrackerMuon() && !(recoMu->isGlobalMuon())) {
550 LogTrace(
metname)<<
"[MuonRecoAnalyzer] The mu is tracker only - filling the histos";
551 if(recoMu->isStandAloneMuon())
553 if(!(recoMu->isStandAloneMuon()))
570 if(recoMu->isStandAloneMuon() && !(recoMu->isGlobalMuon())) {
571 LogTrace(
metname)<<
"[MuonRecoAnalyzer] The mu is STA only - filling the histos";
572 if(!(recoMu->isTrackerMuon()))
589 if(recoMu->isCaloMuon() && !(recoMu->isGlobalMuon()) && !(recoMu->isTrackerMuon()) && !(recoMu->isStandAloneMuon()))
597 if(recoMu->isStandAloneMuon()){
601 if(recoMu->isStandAloneMuon() && recoMu->isGlobalMuon()){
std::vector< MonitorElement * > oneOverpResolution
MonitorElement * qOverptPull
std::vector< MonitorElement * > ptGlbTrack
std::vector< MonitorElement * > chi2OvDFGlbTrack
std::vector< MonitorElement * > phiVsetaGlbTrack
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * etaStaTrack
std::vector< MonitorElement * > phiGlbTrack
MonitorElement * chi2OvDFStaTrack
MuonServiceProxy * theService
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
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * oneOverpPull
std::vector< MonitorElement * > qGlbTrack
std::vector< MonitorElement * > probchi2GlbTrack
std::vector< MonitorElement * > etaResolution
MonitorElement * oneOverptPull
MonitorElement * tunePResolution
std::vector< MonitorElement * > etaEfficiency
void GetRes(reco::TrackRef t1, reco::TrackRef t2, std::string par, float &res, float &pull)
MonitorElement * thetaStaTrack
std::vector< MonitorElement * > phiResolution
std::vector< MonitorElement * > thetaGlbTrack
MonitorElement * phiTrack
std::vector< MonitorElement * > oneOverptResolution
MonitorElement * probchi2Track
std::vector< MonitorElement * > muVStkSytemRotation
MonitorElement * probchi2StaTrack
MonitorElement * ptStaTrack
std::vector< MonitorElement * > rhAnalysis
MonitorElement * pStaTrack
MonitorElement * thetaTrack
std::vector< MonitorElement * > thetaResolution
MonitorElement * thetaPull
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection
edm::EDGetTokenT< reco::MuonCollection > theMuonCollectionLabel_
MonitorElement * qStaTrack