Inizialize parameters for histo binning.
589 edm::LogInfo(
"MuonRecoAnalyzer") <<
"Error: Can't get the beamspot" << endl;
594 edm::LogInfo(
"MuonRecoAnalyzer") <<
"Error: Can't get the vertex collection" << endl;
601 bool fillBadLumi =
false;
603 for (
auto const& dcsStatusItr : *dcsStatus) {
654 float res = 0, pull = 0;
673 refPoint = vertex->at(pvIndex).position();
678 edm::LogInfo(
"MuonRecoAnalyzer") <<
"ERROR: No beam sport found!" << endl;
716 if (
muon->isGlobalMuon()) {
717 LogTrace(
metname) <<
"[MuonRecoAnalyzer] The mu is global - filling the histos";
718 if (
muon->isTrackerMuon() &&
muon->isStandAloneMuon())
720 if (!(
muon->isTrackerMuon()) &&
muon->isStandAloneMuon())
722 if (!
muon->isStandAloneMuon())
723 LogTrace(
metname) <<
"[MuonRecoAnalyzer] ERROR: the mu is global but not standalone!";
735 phiVsetaGlbTrack[0]->Fill(recoCombinedGlbTrack->eta(), recoCombinedGlbTrack->phi());
745 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"eta", res, pull);
747 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"eta", res, pull);
749 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"eta", res, pull);
752 etaResolution[3]->Fill(recoCombinedGlbTrack->eta(), recoTkGlbTrack->eta() - recoCombinedGlbTrack->eta());
753 etaResolution[4]->Fill(recoCombinedGlbTrack->eta(), -recoStaGlbTrack->eta() + recoCombinedGlbTrack->eta());
754 etaResolution[5]->Fill(recoCombinedGlbTrack->eta(), recoTkGlbTrack->eta() - recoStaGlbTrack->eta());
759 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"theta", res, pull);
761 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"theta", res, pull);
764 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"theta", res, pull);
767 thetaResolution[3]->Fill(recoCombinedGlbTrack->theta(), recoTkGlbTrack->theta() - recoCombinedGlbTrack->theta());
769 -recoStaGlbTrack->theta() + recoCombinedGlbTrack->theta());
770 thetaResolution[5]->Fill(recoCombinedGlbTrack->theta(), recoTkGlbTrack->theta() - recoStaGlbTrack->theta());
775 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"phi", res, pull);
777 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"phi", res, pull);
779 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"phi", res, pull);
782 phiResolution[3]->Fill(recoCombinedGlbTrack->phi(), recoTkGlbTrack->phi() - recoCombinedGlbTrack->phi());
783 phiResolution[4]->Fill(recoCombinedGlbTrack->phi(), -recoStaGlbTrack->phi() + recoCombinedGlbTrack->phi());
784 phiResolution[5]->Fill(recoCombinedGlbTrack->phi(), recoTkGlbTrack->phi() - recoStaGlbTrack->phi());
792 probchi2GlbTrack[0]->Fill(TMath::Prob(recoCombinedGlbTrack->chi2(), recoCombinedGlbTrack->ndof()));
793 probchi2GlbTrack[1]->Fill(TMath::Prob(recoTkGlbTrack->chi2(), recoTkGlbTrack->ndof()));
794 probchi2GlbTrack[2]->Fill(TMath::Prob(recoStaGlbTrack->chi2(), recoStaGlbTrack->ndof()));
798 pGlbTrack[0]->Fill(recoCombinedGlbTrack->p());
800 pGlbTrack[2]->Fill(recoStaGlbTrack->p());
802 ptGlbTrack[0]->Fill(recoCombinedGlbTrack->pt());
806 qGlbTrack[0]->Fill(recoCombinedGlbTrack->charge());
807 qGlbTrack[1]->Fill(recoTkGlbTrack->charge());
808 qGlbTrack[2]->Fill(recoStaGlbTrack->charge());
809 if (recoCombinedGlbTrack->charge() == recoStaGlbTrack->charge())
813 if (recoCombinedGlbTrack->charge() == recoTkGlbTrack->charge())
817 if (recoStaGlbTrack->charge() == recoTkGlbTrack->charge())
821 if (recoCombinedGlbTrack->charge() != recoStaGlbTrack->charge() &&
822 recoCombinedGlbTrack->charge() != recoTkGlbTrack->charge())
824 if (recoCombinedGlbTrack->charge() == recoStaGlbTrack->charge() &&
825 recoCombinedGlbTrack->charge() == recoTkGlbTrack->charge())
828 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"qOverp", res, pull);
830 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"qOverp", res, pull);
832 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"qOverp", res, pull);
836 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"oneOverp", res, pull);
838 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"oneOverp", res, pull);
840 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"oneOverp", res, pull);
844 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"qOverpt", res, pull);
846 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"qOverpt", res, pull);
848 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"qOverpt", res, pull);
852 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"oneOverpt", res, pull);
854 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"oneOverpt", res, pull);
856 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"oneOverpt", res, pull);
866 double bestTrackPt = recoBestTrack->pt();
868 double tunePBestTrackPt = recoTunePBestTrack->pt();
870 double tunePBestTrackRes = (bestTrackPt - tunePBestTrackPt) / bestTrackPt;
875 (1 / recoTkGlbTrack->pt()) - (1 / recoCombinedGlbTrack->pt()));
877 -(1 / recoStaGlbTrack->pt()) + (1 / recoCombinedGlbTrack->pt()));
879 (1 / recoTkGlbTrack->pt()) - (1 / recoStaGlbTrack->pt()));
881 (1 / recoTkGlbTrack->pt()) - (1 / recoCombinedGlbTrack->pt()));
883 -(1 / recoStaGlbTrack->pt()) + (1 / recoCombinedGlbTrack->pt()));
885 (1 / recoTkGlbTrack->pt()) - (1 / recoStaGlbTrack->pt()));
887 (1 / recoTkGlbTrack->pt()) - (1 / recoCombinedGlbTrack->pt()));
889 -(1 / recoStaGlbTrack->pt()) + (1 / recoCombinedGlbTrack->pt()));
891 (1 / recoTkGlbTrack->pt()) - (1 / recoStaGlbTrack->pt()));
895 double rhGlb = recoCombinedGlbTrack->found();
897 double rhGlb_StaProvenance = 0;
899 double rhGlb_TkProvenance = 0;
902 recHit != recoCombinedGlbTrack->recHitsEnd();
904 if ((*recHit)->isValid()) {
905 DetId id = (*recHit)->geographicalId();
907 rhGlb_StaProvenance++;
909 rhGlb_TkProvenance++;
913 double rhStaGlb = recoStaGlbTrack->recHitsSize();
915 double rhTkGlb = recoTkGlbTrack->found();
917 double rhTkGlb_notValid = recoTkGlbTrack->lost();
920 rhAnalysis[0]->Fill(rhGlb_StaProvenance / rhGlb);
921 rhAnalysis[1]->Fill(rhGlb_TkProvenance / rhGlb);
922 rhAnalysis[2]->Fill(rhGlb_StaProvenance / rhStaGlb);
923 rhAnalysis[3]->Fill(rhGlb_TkProvenance / rhTkGlb);
924 rhAnalysis[4]->Fill(rhGlb / (rhStaGlb + rhTkGlb));
925 rhAnalysis[5]->Fill(rhTkGlb_notValid / rhGlb);
928 if (recoCombinedGlbTrack->charge() > 0)
931 muVStkSytemRotation[1]->Fill(recoCombinedGlbTrack->pt(), recoTkGlbTrack->pt() / recoCombinedGlbTrack->pt());
934 if (
muon->isTrackerMuon() && !(
muon->isGlobalMuon())) {
935 LogTrace(
metname) <<
"[MuonRecoAnalyzer] The mu is tracker only - filling the histos";
936 if (
muon->isStandAloneMuon())
938 if (!(
muon->isStandAloneMuon()))
954 if (
muon->isStandAloneMuon() && !(
muon->isGlobalMuon())) {
955 LogTrace(
metname) <<
"[MuonRecoAnalyzer] The mu is STA only - filling the histos";
956 if (!(
muon->isTrackerMuon()))
972 if (
muon->isCaloMuon() && !(
muon->isGlobalMuon()) && !(
muon->isTrackerMuon()) && !(
muon->isStandAloneMuon()))
980 if (
muon->isStandAloneMuon()) {
984 if (
muon->isStandAloneMuon() &&
muon->isGlobalMuon()) {
float chi2LocalPosition
chi2 value for the STA-TK matching of local position
MonitorElement * NTrkVHitsSoftMuonMVA
std::vector< MonitorElement * > oneOverpResolution
MonitorElement * deltaRSoftMuonMVA
MonitorElement * trkRelChi2SoftMuonMVA
MonitorElement * qOverptPull
std::vector< MonitorElement * > ptGlbTrack
bool isNonnull() const
Checks for non-null.
std::vector< MonitorElement * > chi2OvDFGlbTrack
float chi2LocalMomentum
chi2 value for the STA-TK matching of local momentum
std::vector< MonitorElement * > phiVsetaGlbTrack_badlumi
MonitorElement * gNchi2SoftMuonMVA
std::vector< MonitorElement * > phiVsetaGlbTrack
bool getByToken(EDGetToken token, Handle< PROD > &result) const
float glbKink
value of the kink algorithm applied to the global track
MonitorElement * iValFracSoftMuonMVA
MonitorElement * outerChi2SoftMuonMVA
MonitorElement * etaStaTrack
float glbTrackProbability
the tail probability (-ln(P)) of the global fit
MonitorElement * vRPChitsSoftMuonMVA
float trkKink
value of the kink algorithm applied to the inner track stub
MonitorElement * dzRefSoftMuonMVA
edm::EDGetTokenT< DcsStatusCollection > dcsStatusCollection_
std::vector< MonitorElement * > phiGlbTrack
MonitorElement * LWHSoftMuonMVA
MonitorElement * chi2OvDFStaTrack
MuonServiceProxy * theService
MonitorElement * vMuHitsSoftMuonMVA
float trkRelChi2
chi2 value for the inner track stub with respect to the global track
MonitorElement * phiStaTrack
MonitorElement * vDThitsSoftMuonMVA
int trackerLayersWithMeasurement() const
MonitorElement * qOverpPull
int numberOfValidMuonCSCHits() const
std::vector< MonitorElement * > phiEfficiency
MonitorElement * mNuStationsSoftMuonMVA
int numberOfValidMuonRPCHits() const
MonitorElement * etaTrack
MonitorElement * innerChi2SoftMuonMVA
double getDeltaR(reco::Track track1, reco::Track track2)
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 * timeAtIpInOutSoftMuonMVA
MonitorElement * oneOverpPull
MonitorElement * valPixHitsSoftMuonMVA
std::vector< MonitorElement * > qGlbTrack
MonitorElement * timeAtIpInOutErrSoftMuonMVA
std::vector< MonitorElement * > probchi2GlbTrack
std::vector< MonitorElement * > etaResolution
edm::EDGetTokenT< reco::BeamSpot > theBeamSpotLabel_
MonitorElement * ptSoftMuonMVA
MonitorElement * oneOverptPull
MonitorElement * tunePResolution
float globalDeltaEtaPhi
global delta-Eta-Phi of STA-TK matching
MonitorElement * glbKinkFinderLogSoftMuonMVA
std::vector< MonitorElement * > etaEfficiency
MonitorElement * dxyRefSoftMuonMVA
void GetRes(reco::TrackRef t1, reco::TrackRef t2, std::string par, float &res, float &pull)
MonitorElement * staRelChi2SoftMuonMVA
MonitorElement * thetaStaTrack
edm::EDGetTokenT< edm::View< reco::Muon > > theMuonCollectionLabel_
float staRelChi2
chi2 value for the outer track stub with respect to the global track
std::vector< MonitorElement * > phiResolution
MonitorElement * chi2LocMomSoftMuonMVA
std::vector< MonitorElement * > thetaGlbTrack
int getPv(int tidx, const reco::VertexCollection *vc)
XYZPointD XYZPoint
point in space with cartesian internal representation
MonitorElement * phiTrack
MonitorElement * vCSChitsSoftMuonMVA
std::vector< MonitorElement * > oneOverptResolution
MonitorElement * probchi2Track
std::vector< MonitorElement * > muVStkSytemRotation
MonitorElement * kinkFinderSoftMuonMVA
MonitorElement * glbKinkFinderSoftMuonMVA
MonitorElement * chi2LocPosSoftMuonMVA
MonitorElement * glbDeltaEtaPhiSoftMuonMVA
int numberOfValidTrackerHits() const
MonitorElement * QprodSoftMuonMVA
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
MonitorElement * probchi2StaTrack
MonitorElement * ptStaTrack
int numberOfValidMuonDTHits() const
std::vector< MonitorElement * > rhAnalysis
int numberOfValidPixelHits() const
const Point & position() const
position
int numberOfValidMuonHits() const
MonitorElement * pStaTrack
MonitorElement * thetaTrack
std::vector< MonitorElement * > thetaResolution
MonitorElement * glbTrackTailProbSoftMuonMVA
MonitorElement * thetaPull
MonitorElement * qStaTrack
edm::EDGetTokenT< reco::VertexCollection > theVertexLabel_