Inizialize parameters for histo binning.
336 for (reco::MuonCollection::const_iterator recoMu = muons->begin(); recoMu!=muons->end(); ++recoMu){
338 if(recoMu->isGlobalMuon()) {
340 LogTrace(
metname)<<
"[MuonRecoAnalyzer] The mu is global - filling the histos";
341 if(recoMu->isTrackerMuon() && recoMu->isStandAloneMuon())
343 if(!(recoMu->isTrackerMuon()) && recoMu->isStandAloneMuon())
345 if(!recoMu->isStandAloneMuon())
346 LogTrace(
metname)<<
"[MuonRecoAnalyzer] ERROR: the mu is global but not standalone!";
360 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"eta", res, pull);
362 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"eta", res, pull);
364 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"eta", res, pull);
368 etaResolution[3]->Fill(recoCombinedGlbTrack->eta(), recoTkGlbTrack->eta()-recoCombinedGlbTrack->eta());
369 etaResolution[4]->Fill(recoCombinedGlbTrack->eta(), -recoStaGlbTrack->eta()+recoCombinedGlbTrack->eta());
370 etaResolution[5]->Fill(recoCombinedGlbTrack->eta(), recoTkGlbTrack->eta()-recoStaGlbTrack->eta());
376 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"theta", res, pull);
379 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"theta", res, pull);
382 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"theta", res, pull);
386 thetaResolution[3]->Fill(recoCombinedGlbTrack->theta(), recoTkGlbTrack->theta()-recoCombinedGlbTrack->theta());
387 thetaResolution[4]->Fill(recoCombinedGlbTrack->theta(), -recoStaGlbTrack->theta()+recoCombinedGlbTrack->theta());
388 thetaResolution[5]->Fill(recoCombinedGlbTrack->theta(), recoTkGlbTrack->theta()-recoStaGlbTrack->theta());
395 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"phi", res, pull);
397 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"phi", res, pull);
399 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"phi", res, pull);
402 phiResolution[3]->Fill(recoCombinedGlbTrack->phi(), recoTkGlbTrack->phi()-recoCombinedGlbTrack->phi());
403 phiResolution[4]->Fill(recoCombinedGlbTrack->phi(), -recoStaGlbTrack->phi()+recoCombinedGlbTrack->phi());
404 phiResolution[5]->Fill(recoCombinedGlbTrack->phi(), recoTkGlbTrack->phi()-recoStaGlbTrack->phi());
412 probchi2GlbTrack[0]->Fill(TMath::Prob(recoCombinedGlbTrack->chi2(),recoCombinedGlbTrack->ndof()));
413 probchi2GlbTrack[1]->Fill(TMath::Prob(recoTkGlbTrack->chi2(),recoTkGlbTrack->ndof()));
414 probchi2GlbTrack[2]->Fill(TMath::Prob(recoStaGlbTrack->chi2(),recoStaGlbTrack->ndof()));
418 pGlbTrack[0]->Fill(recoCombinedGlbTrack->p());
420 pGlbTrack[2]->Fill(recoStaGlbTrack->p());
422 ptGlbTrack[0]->Fill(recoCombinedGlbTrack->pt());
426 qGlbTrack[0]->Fill(recoCombinedGlbTrack->charge());
427 qGlbTrack[1]->Fill(recoTkGlbTrack->charge());
428 qGlbTrack[2]->Fill(recoStaGlbTrack->charge());
429 if(recoCombinedGlbTrack->charge()==recoStaGlbTrack->charge())
qGlbTrack[3]->
Fill(1);
431 if(recoCombinedGlbTrack->charge()==recoTkGlbTrack->charge())
qGlbTrack[3]->
Fill(3);
433 if(recoStaGlbTrack->charge()==recoTkGlbTrack->charge())
qGlbTrack[3]->
Fill(5);
435 if(recoCombinedGlbTrack->charge()!=recoStaGlbTrack->charge() && recoCombinedGlbTrack->charge()!=recoTkGlbTrack->charge())
qGlbTrack[3]->
Fill(7);
436 if(recoCombinedGlbTrack->charge()==recoStaGlbTrack->charge() && recoCombinedGlbTrack->charge()==recoTkGlbTrack->charge())
qGlbTrack[3]->
Fill(8);
438 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"qOverp", res, pull);
440 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"qOverp", res, pull);
442 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"qOverp", res, pull);
447 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"oneOverp", res, pull);
449 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"oneOverp", res, pull);
451 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"oneOverp", res, pull);
456 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"qOverpt", res, pull);
458 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"qOverpt", res, pull);
460 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"qOverpt", res, pull);
464 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"oneOverpt", res, pull);
466 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"oneOverpt", res, pull);
468 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"oneOverpt", res, pull);
479 double bestTrackPt = recoBestTrack->pt();
481 double tunePBestTrackPt = recoTunePBestTrack->pt();
483 double tunePBestTrackRes = (bestTrackPt - tunePBestTrackPt) / bestTrackPt;
488 oneOverptResolution[3]->Fill(recoCombinedGlbTrack->eta(),(1/recoTkGlbTrack->pt())-(1/recoCombinedGlbTrack->pt()));
489 oneOverptResolution[4]->Fill(recoCombinedGlbTrack->eta(),-(1/recoStaGlbTrack->pt())+(1/recoCombinedGlbTrack->pt()));
490 oneOverptResolution[5]->Fill(recoCombinedGlbTrack->eta(),(1/recoTkGlbTrack->pt())-(1/recoStaGlbTrack->pt()));
491 oneOverptResolution[6]->Fill(recoCombinedGlbTrack->phi(),(1/recoTkGlbTrack->pt())-(1/recoCombinedGlbTrack->pt()));
492 oneOverptResolution[7]->Fill(recoCombinedGlbTrack->phi(),-(1/recoStaGlbTrack->pt())+(1/recoCombinedGlbTrack->pt()));
493 oneOverptResolution[8]->Fill(recoCombinedGlbTrack->phi(),(1/recoTkGlbTrack->pt())-(1/recoStaGlbTrack->pt()));
494 oneOverptResolution[9]->Fill(recoCombinedGlbTrack->pt(),(1/recoTkGlbTrack->pt())-(1/recoCombinedGlbTrack->pt()));
495 oneOverptResolution[10]->Fill(recoCombinedGlbTrack->pt(),-(1/recoStaGlbTrack->pt())+(1/recoCombinedGlbTrack->pt()));
496 oneOverptResolution[11]->Fill(recoCombinedGlbTrack->pt(),(1/recoTkGlbTrack->pt())-(1/recoStaGlbTrack->pt()));
499 double rhGlb = recoCombinedGlbTrack->found();
501 double rhGlb_StaProvenance=0;
503 double rhGlb_TkProvenance=0;
505 recHit!=recoCombinedGlbTrack->recHitsEnd(); ++recHit){
506 if((*recHit)->isValid()){
507 DetId id = (*recHit)->geographicalId();
509 rhGlb_StaProvenance++;
511 rhGlb_TkProvenance++;
515 double rhStaGlb = recoStaGlbTrack->recHitsSize();
517 double rhTkGlb = recoTkGlbTrack->found();
519 double rhTkGlb_notValid = recoTkGlbTrack->lost();
522 rhAnalysis[0]->Fill(rhGlb_StaProvenance/rhGlb);
523 rhAnalysis[1]->Fill(rhGlb_TkProvenance/rhGlb);
524 rhAnalysis[2]->Fill(rhGlb_StaProvenance/rhStaGlb);
525 rhAnalysis[3]->Fill(rhGlb_TkProvenance/rhTkGlb);
526 rhAnalysis[4]->Fill(rhGlb/(rhStaGlb+rhTkGlb));
530 if(recoCombinedGlbTrack->charge()>0)
533 muVStkSytemRotation[1]->Fill(recoCombinedGlbTrack->pt(),recoTkGlbTrack->pt()/recoCombinedGlbTrack->pt());
538 if(recoMu->isTrackerMuon() && !(recoMu->isGlobalMuon())) {
539 LogTrace(
metname)<<
"[MuonRecoAnalyzer] The mu is tracker only - filling the histos";
540 if(recoMu->isStandAloneMuon())
542 if(!(recoMu->isStandAloneMuon()))
559 if(recoMu->isStandAloneMuon() && !(recoMu->isGlobalMuon())) {
560 LogTrace(
metname)<<
"[MuonRecoAnalyzer] The mu is STA only - filling the histos";
561 if(!(recoMu->isTrackerMuon()))
578 if(recoMu->isCaloMuon() && !(recoMu->isGlobalMuon()) && !(recoMu->isTrackerMuon()) && !(recoMu->isStandAloneMuon()))
586 if(recoMu->isStandAloneMuon()){
590 if(recoMu->isStandAloneMuon() && recoMu->isGlobalMuon()){
std::vector< MonitorElement * > oneOverpResolution
MonitorElement * qOverptPull
std::vector< MonitorElement * > ptGlbTrack
std::vector< MonitorElement * > chi2OvDFGlbTrack
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
edm::EDGetTokenT< reco::MuonCollection > theMuonCollectionLabel_
MonitorElement * qStaTrack