Inizialize parameters for histo binning.
349 if(
muon->isGlobalMuon()) {
350 LogTrace(
metname)<<
"[MuonRecoAnalyzer] The mu is global - filling the histos";
351 if(
muon->isTrackerMuon() &&
muon->isStandAloneMuon())
353 if(!(
muon->isTrackerMuon()) &&
muon->isStandAloneMuon())
355 if(!
muon->isStandAloneMuon())
356 LogTrace(
metname)<<
"[MuonRecoAnalyzer] ERROR: the mu is global but not standalone!";
370 phiVsetaGlbTrack[0]->Fill(recoCombinedGlbTrack->eta(), recoCombinedGlbTrack->phi());
374 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"eta", res, pull);
376 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"eta", res, pull);
378 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"eta", res, pull);
382 etaResolution[3]->Fill(recoCombinedGlbTrack->eta(), recoTkGlbTrack->eta()-recoCombinedGlbTrack->eta());
383 etaResolution[4]->Fill(recoCombinedGlbTrack->eta(), -recoStaGlbTrack->eta()+recoCombinedGlbTrack->eta());
384 etaResolution[5]->Fill(recoCombinedGlbTrack->eta(), recoTkGlbTrack->eta()-recoStaGlbTrack->eta());
390 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"theta", res, pull);
393 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"theta", res, pull);
396 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"theta", res, pull);
400 thetaResolution[3]->Fill(recoCombinedGlbTrack->theta(), recoTkGlbTrack->theta()-recoCombinedGlbTrack->theta());
401 thetaResolution[4]->Fill(recoCombinedGlbTrack->theta(), -recoStaGlbTrack->theta()+recoCombinedGlbTrack->theta());
402 thetaResolution[5]->Fill(recoCombinedGlbTrack->theta(), recoTkGlbTrack->theta()-recoStaGlbTrack->theta());
408 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"phi", res, pull);
410 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"phi", res, pull);
412 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"phi", res, pull);
415 phiResolution[3]->Fill(recoCombinedGlbTrack->phi(), recoTkGlbTrack->phi()-recoCombinedGlbTrack->phi());
416 phiResolution[4]->Fill(recoCombinedGlbTrack->phi(), -recoStaGlbTrack->phi()+recoCombinedGlbTrack->phi());
417 phiResolution[5]->Fill(recoCombinedGlbTrack->phi(), recoTkGlbTrack->phi()-recoStaGlbTrack->phi());
425 probchi2GlbTrack[0]->Fill(TMath::Prob(recoCombinedGlbTrack->chi2(),recoCombinedGlbTrack->ndof()));
426 probchi2GlbTrack[1]->Fill(TMath::Prob(recoTkGlbTrack->chi2(),recoTkGlbTrack->ndof()));
427 probchi2GlbTrack[2]->Fill(TMath::Prob(recoStaGlbTrack->chi2(),recoStaGlbTrack->ndof()));
431 pGlbTrack[0]->Fill(recoCombinedGlbTrack->p());
433 pGlbTrack[2]->Fill(recoStaGlbTrack->p());
435 ptGlbTrack[0]->Fill(recoCombinedGlbTrack->pt());
439 qGlbTrack[0]->Fill(recoCombinedGlbTrack->charge());
440 qGlbTrack[1]->Fill(recoTkGlbTrack->charge());
441 qGlbTrack[2]->Fill(recoStaGlbTrack->charge());
442 if(recoCombinedGlbTrack->charge()==recoStaGlbTrack->charge())
qGlbTrack[3]->
Fill(1);
444 if(recoCombinedGlbTrack->charge()==recoTkGlbTrack->charge())
qGlbTrack[3]->
Fill(3);
446 if(recoStaGlbTrack->charge()==recoTkGlbTrack->charge())
qGlbTrack[3]->
Fill(5);
448 if(recoCombinedGlbTrack->charge()!=recoStaGlbTrack->charge() && recoCombinedGlbTrack->charge()!=recoTkGlbTrack->charge())
qGlbTrack[3]->
Fill(7);
449 if(recoCombinedGlbTrack->charge()==recoStaGlbTrack->charge() && recoCombinedGlbTrack->charge()==recoTkGlbTrack->charge())
qGlbTrack[3]->
Fill(8);
451 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"qOverp", res, pull);
453 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"qOverp", res, pull);
455 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"qOverp", res, pull);
460 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"oneOverp", res, pull);
462 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"oneOverp", res, pull);
464 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"oneOverp", res, pull);
469 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"qOverpt", res, pull);
471 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"qOverpt", res, pull);
473 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"qOverpt", res, pull);
477 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"oneOverpt", res, pull);
479 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"oneOverpt", res, pull);
481 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"oneOverpt", res, pull);
492 double bestTrackPt = recoBestTrack->pt();
494 double tunePBestTrackPt = recoTunePBestTrack->pt();
496 double tunePBestTrackRes = (bestTrackPt - tunePBestTrackPt) / bestTrackPt;
500 oneOverptResolution[3]->Fill(recoCombinedGlbTrack->eta(),(1/recoTkGlbTrack->pt())-(1/recoCombinedGlbTrack->pt()));
501 oneOverptResolution[4]->Fill(recoCombinedGlbTrack->eta(),-(1/recoStaGlbTrack->pt())+(1/recoCombinedGlbTrack->pt()));
502 oneOverptResolution[5]->Fill(recoCombinedGlbTrack->eta(),(1/recoTkGlbTrack->pt())-(1/recoStaGlbTrack->pt()));
503 oneOverptResolution[6]->Fill(recoCombinedGlbTrack->phi(),(1/recoTkGlbTrack->pt())-(1/recoCombinedGlbTrack->pt()));
504 oneOverptResolution[7]->Fill(recoCombinedGlbTrack->phi(),-(1/recoStaGlbTrack->pt())+(1/recoCombinedGlbTrack->pt()));
505 oneOverptResolution[8]->Fill(recoCombinedGlbTrack->phi(),(1/recoTkGlbTrack->pt())-(1/recoStaGlbTrack->pt()));
506 oneOverptResolution[9]->Fill(recoCombinedGlbTrack->pt(),(1/recoTkGlbTrack->pt())-(1/recoCombinedGlbTrack->pt()));
507 oneOverptResolution[10]->Fill(recoCombinedGlbTrack->pt(),-(1/recoStaGlbTrack->pt())+(1/recoCombinedGlbTrack->pt()));
508 oneOverptResolution[11]->Fill(recoCombinedGlbTrack->pt(),(1/recoTkGlbTrack->pt())-(1/recoStaGlbTrack->pt()));
513 double rhGlb = recoCombinedGlbTrack->found();
515 double rhGlb_StaProvenance=0;
517 double rhGlb_TkProvenance=0;
524 if((*recHit)->isValid()){
525 DetId id = (*recHit)->geographicalId();
527 rhGlb_StaProvenance++;
529 rhGlb_TkProvenance++;
533 double rhStaGlb = recoStaGlbTrack->recHitsSize();
535 double rhTkGlb = recoTkGlbTrack->found();
537 double rhTkGlb_notValid = recoTkGlbTrack->lost();
540 rhAnalysis[0]->Fill(rhGlb_StaProvenance/rhGlb);
541 rhAnalysis[1]->Fill(rhGlb_TkProvenance/rhGlb);
542 rhAnalysis[2]->Fill(rhGlb_StaProvenance/rhStaGlb);
543 rhAnalysis[3]->Fill(rhGlb_TkProvenance/rhTkGlb);
544 rhAnalysis[4]->Fill(rhGlb/(rhStaGlb+rhTkGlb));
548 if(recoCombinedGlbTrack->charge()>0)
551 muVStkSytemRotation[1]->Fill(recoCombinedGlbTrack->pt(),recoTkGlbTrack->pt()/recoCombinedGlbTrack->pt());
556 if(
muon->isTrackerMuon() && !(
muon->isGlobalMuon())) {
557 LogTrace(
metname)<<
"[MuonRecoAnalyzer] The mu is tracker only - filling the histos";
558 if(
muon->isStandAloneMuon())
560 if(!(
muon->isStandAloneMuon()))
577 if(
muon->isStandAloneMuon() && !(
muon->isGlobalMuon())) {
578 LogTrace(
metname)<<
"[MuonRecoAnalyzer] The mu is STA only - filling the histos";
579 if(!(
muon->isTrackerMuon()))
596 if(
muon->isCaloMuon() && !(
muon->isGlobalMuon()) && !(
muon->isTrackerMuon()) && !(
muon->isStandAloneMuon()))
604 if(
muon->isStandAloneMuon()){
608 if(
muon->isStandAloneMuon() &&
muon->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
edm::EDGetTokenT< edm::View< reco::Muon > > theMuonCollectionLabel_
std::vector< MonitorElement * > phiResolution
std::vector< MonitorElement * > thetaGlbTrack
MonitorElement * phiTrack
std::vector< MonitorElement * > oneOverptResolution
MonitorElement * probchi2Track
std::vector< MonitorElement * > muVStkSytemRotation
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
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
MonitorElement * qStaTrack