CMS 3D CMS Logo

Public Types | Public Member Functions | Public Attributes

RecoMuonValidator::MuonME Struct Reference

List of all members.

Public Types

typedef MonitorElementMEP

Public Member Functions

void bookHistograms (DQMStore *dqm, const string &dirName, const HistoDimensions &hDim)
void fill (const TrackingParticle *simRef, const Muon *muonRef)

Public Attributes

bool doAbsEta_
MEP hChi2_
MEP hChi2_vs_Eta_
MEP hChi2Norm_
MEP hChi2Norm_vs_Eta_
MEP hChi2Prob_
MEP hChi2Prob_vs_Eta_
MEP hdPt_vs_Eta_
MEP hdPt_vs_Pt_
MEP hErrDxy_
MEP hErrDz_
MEP hErrEta_
MEP hErrEta_vs_Eta_
MEP hErrP_
MEP hErrP_vs_Eta_
MEP hErrP_vs_P_
MEP hErrPBarrel_
MEP hErrPEndcap_
MEP hErrPhi_
MEP hErrPOverlap_
MEP hErrPt_
MEP hErrPt_PF_
MEP hErrPt_vs_Eta_
MEP hErrPt_vs_Pt_
MEP hErrPtBarrel_
MEP hErrPtEndcap_
MEP hErrPtOverlap_
MEP hErrQPt_PF_
MEP hErrQPt_vs_Eta_
MEP hErrQPt_vs_Pt_
MEP hEta_
MEP hMisQEta_
MEP hMisQPt_
MEP hNDof_
MEP hNDof_vs_Eta_
MEP hNHits_
MEP hNHits_vs_Eta_
MEP hNHits_vs_Pt_
MEP hNLostHits_
MEP hNLostHits_vs_Eta_
MEP hNLostHits_vs_Pt_
MEP hNMuon_
MEP hNMuonHits_
MEP hNMuonHits_vs_Eta_
MEP hNMuonHits_vs_Pt_
MEP hNRecoToSim_
MEP hNSim_
MEP hNSimHits_
MEP hNSimToReco_
MEP hNTrackerHits_
MEP hNTrackerHits_vs_Eta_
MEP hNTrackerHits_vs_Pt_
MEP hNTrks_
MEP hNTrksEta_
MEP hNTrksPt_
MEP hP_
MEP hPFMomAssCorrectness
MEP hPhi_
MEP hPt_
MEP hPt_vs_PFMomAssCorrectness
MEP hPullDxy_
MEP hPullDz_
MEP hPullEta_
MEP hPullEta_vs_Eta_
MEP hPullEta_vs_Pt_
MEP hPullPhi_
MEP hPullPhi_vs_Eta_
MEP hPullPt_
MEP hPullPt_vs_Eta_
MEP hPullPt_vs_Pt_
MEP hPullQPt_
MEP hSimDxy_
MEP hSimDz_
MEP hSimEta_
MEP hSimP_
MEP hSimPhi_
MEP hSimPt_
bool usePFMuon_

Detailed Description

Definition at line 81 of file RecoMuonValidator.cc.


Member Typedef Documentation

Definition at line 82 of file RecoMuonValidator.cc.


Member Function Documentation

void RecoMuonValidator::MuonME::bookHistograms ( DQMStore dqm,
const string &  dirName,
const HistoDimensions hDim 
) [inline]

Definition at line 136 of file RecoMuonValidator.cc.

References DQMStore::book1D(), DQMStore::book2D(), DQMStore::cd(), HistoDimensions::doAbsEta, HistoDimensions::maxDxy, HistoDimensions::maxDz, HistoDimensions::maxErrDxy, HistoDimensions::maxErrDz, HistoDimensions::maxErrEta, HistoDimensions::maxErrP, HistoDimensions::maxErrPhi, HistoDimensions::maxErrPt, HistoDimensions::maxErrQPt, HistoDimensions::maxEta, HistoDimensions::maxP, HistoDimensions::maxPhi, HistoDimensions::maxPt, HistoDimensions::minDxy, HistoDimensions::minDz, HistoDimensions::minErrDxy, HistoDimensions::minErrDz, HistoDimensions::minErrEta, HistoDimensions::minErrP, HistoDimensions::minErrPhi, HistoDimensions::minErrPt, HistoDimensions::minErrQPt, HistoDimensions::minEta, HistoDimensions::minP, HistoDimensions::minPhi, HistoDimensions::minPt, HistoDimensions::nAssoc, HistoDimensions::nBinDxy, HistoDimensions::nBinDz, HistoDimensions::nBinErr, HistoDimensions::nBinEta, HistoDimensions::nBinP, HistoDimensions::nBinPhi, HistoDimensions::nBinPt, HistoDimensions::nBinPull, HistoDimensions::nDof, HistoDimensions::nTrks, DQMStore::setCurrentFolder(), HistoDimensions::usePFMuon, and HistoDimensions::wPull.

Referenced by RecoMuonValidator::RecoMuonValidator().

  {
    dqm->cd();
    dqm->setCurrentFolder(dirName.c_str());

    doAbsEta_ = hDim.doAbsEta;
    usePFMuon_ = hDim.usePFMuon;

    //histograms for efficiency plots
    hP_   = dqm->book1D("P"  , "p of recoTracks"    , hDim.nBinP  , hDim.minP  , hDim.maxP  );
    hPt_  = dqm->book1D("Pt" , "p_{T} of recoTracks", hDim.nBinPt , hDim.minPt , hDim.maxPt );
    hEta_ = dqm->book1D("Eta", "#eta of recoTracks" , hDim.nBinEta, hDim.minEta, hDim.maxEta);
    hPhi_ = dqm->book1D("Phi", "#phi of recoTracks" , hDim.nBinPhi, hDim.minPhi, hDim.maxPhi);

    hSimP_   = dqm->book1D("SimP"  , "p of simTracks"    , hDim.nBinP  , hDim.minP  , hDim.maxP  );
    hSimPt_  = dqm->book1D("SimPt" , "p_{T} of simTracks", hDim.nBinPt , hDim.minPt , hDim.maxPt );
    hSimEta_ = dqm->book1D("SimEta", "#eta of simTracks" , hDim.nBinEta, hDim.minEta, hDim.maxEta);
    hSimPhi_ = dqm->book1D("SimPhi", "#phi of simTracks" , hDim.nBinPhi, hDim.minPhi, hDim.maxPhi);
    hSimDxy_ = dqm->book1D("SimDxy", "Dxy of simTracks" , hDim.nBinDxy, hDim.minDxy, hDim.maxDxy);
    hSimDz_ = dqm->book1D("Dz", "Dz of simTracks" , hDim.nBinDz, hDim.minDz, hDim.maxDz);

    //track multiplicities
    hNSim_  = dqm->book1D("NSim" , "Number of particles per event", hDim.nTrks, -0.5, hDim.nTrks+0.5);
    hNMuon_ = dqm->book1D("NMuon", "Number of muons per event"    , hDim.nTrks, -0.5, hDim.nTrks+0.5);

    // - Misc. variables
    hNTrks_ = dqm->book1D("NTrks", "Number of reco tracks per event", hDim.nTrks, -0.5, hDim.nTrks+0.5);
    hNTrksEta_ = dqm->book1D("NTrksEta", "Number of reco tracks vs #eta", hDim.nBinEta, hDim.minEta, hDim.maxEta);
    hNTrksPt_ = dqm->book1D("NTrksPt", "Number of reco tracks vs p_{T}", hDim.nBinPt, hDim.minPt, hDim.maxPt);

    hMisQPt_  = dqm->book1D("MisQPt" , "Charge mis-id vs Pt" , hDim.nBinPt , hDim.minPt , hDim.maxPt );
    hMisQEta_ = dqm->book1D("MisQEta", "Charge mis-id vs Eta", hDim.nBinEta, hDim.minEta, hDim.maxEta);

    // - Resolutions
    hErrP_   = dqm->book1D("ErrP"  , "#Delta(p)/p"        , hDim.nBinErr, hDim.minErrP  , hDim.maxErrP  );
    hErrPBarrel_   = dqm->book1D("ErrP_barrel"  , "#Delta(p)/p"        , hDim.nBinErr, hDim.minErrP  , hDim.maxErrP  );
    hErrPOverlap_   = dqm->book1D("ErrP_overlap"  , "#Delta(p)/p"        , hDim.nBinErr, hDim.minErrP  , hDim.maxErrP  );
    hErrPEndcap_   = dqm->book1D("ErrP_endcap"  , "#Delta(p)/p"        , hDim.nBinErr, hDim.minErrP  , hDim.maxErrP  );
    hErrPt_  = dqm->book1D("ErrPt" , "#Delta(p_{T})/p_{T}", hDim.nBinErr, hDim.minErrPt , hDim.maxErrPt );
    hErrPtBarrel_  = dqm->book1D("ErrPt_barrel" , "#Delta(p_{T})/p_{T}", hDim.nBinErr, hDim.minErrPt , hDim.maxErrPt );
    hErrPtOverlap_  = dqm->book1D("ErrPt_overlap" , "#Delta(p_{T})/p_{T}", hDim.nBinErr, hDim.minErrPt , hDim.maxErrPt );
    hErrPtEndcap_  = dqm->book1D("ErrPt_endcap" , "#Delta(p_{T})/p_{T}", hDim.nBinErr, hDim.minErrPt , hDim.maxErrPt );
    hErrEta_ = dqm->book1D("ErrEta", "#sigma(#eta))"      , hDim.nBinErr, hDim.minErrEta, hDim.maxErrEta);
    hErrPhi_ = dqm->book1D("ErrPhi", "#sigma(#phi)"       , hDim.nBinErr, hDim.minErrPhi, hDim.maxErrPhi);
    hErrDxy_ = dqm->book1D("ErrDxy", "#sigma(d_{xy})"     , hDim.nBinErr, hDim.minErrDxy, hDim.maxErrDxy);
    hErrDz_  = dqm->book1D("ErrDz" , "#sigma(d_{z})"      , hDim.nBinErr, hDim.minErrDz , hDim.maxErrDz );

    //PF-RECO comparisons
    if (usePFMuon_) {
      hErrPt_PF_  = dqm->book1D("ErrPt_PF" , "#Delta(p_{T})|_{PF}/p_{T}", hDim.nBinErr, hDim.minErrPt, hDim.maxErrPt );
      hErrQPt_PF_  = dqm->book1D("ErrQPt_PF" , "#Delta(q/p_{T})|_{PF}/(q/p_{T})", hDim.nBinErr, hDim.minErrQPt, hDim.maxErrQPt);
      
      hPFMomAssCorrectness  = dqm->book1D("hPFMomAssCorrectness", "Corrected momentum assignement PF/RECO",2,0.5,2.5);
      hPt_vs_PFMomAssCorrectness  = dqm->book2D("hPt_vs_PFMomAssCorrectness", "Corrected momentum assignement PF/RECO", hDim.nBinPt, hDim.minPt, hDim.maxP, 2, 0.5, 2.5);
      
      hdPt_vs_Pt_  = dqm->book2D("dPt_vs_Pt", "#Delta(p_{T}) vs p_{T}", hDim.nBinPt, hDim.minPt, hDim.maxPt, hDim.nBinErr, hDim.minErrPt, hDim.maxErrPt);
      hdPt_vs_Eta_  = dqm->book2D("dPt_vs_Eta", "#Delta(p_{T}) vs #eta", hDim.nBinEta, hDim.minEta, hDim.maxEta, hDim.nBinErr, hDim.minErrPt, hDim.maxErrPt);
    }

    // -- Resolutions vs Eta
    hErrP_vs_Eta_   = dqm->book2D("ErrP_vs_Eta", "#Delta(p)/p vs #eta",
                                  hDim.nBinEta, hDim.minEta, hDim.maxEta, hDim.nBinErr, hDim.minErrP, hDim.maxErrP);
    hErrPt_vs_Eta_  = dqm->book2D("ErrPt_vs_Eta", "#Delta(p_{T})/p_{T} vs #eta",
                                  hDim.nBinEta, hDim.minEta, hDim.maxEta, hDim.nBinErr, hDim.minErrPt, hDim.maxErrPt);
    hErrQPt_vs_Eta_ = dqm->book2D("ErrQPt_vs_Eta", "#Delta(q/p_{T})/(q/p_{T}) vs #eta",
                                  hDim.nBinEta, hDim.minEta, hDim.maxEta, hDim.nBinErr, hDim.minErrQPt, hDim.maxErrQPt);
    hErrEta_vs_Eta_ = dqm->book2D("ErrEta_vs_Eta", "#sigma(#eta) vs #eta",
                                  hDim.nBinEta, hDim.minEta, hDim.maxEta, hDim.nBinErr, hDim.minErrEta, hDim.maxErrEta);

    // -- Resolutions vs momentum
    hErrP_vs_P_    = dqm->book2D("ErrP_vs_P", "#Delta(p)/p vs p",
                                 hDim.nBinP, hDim.minP, hDim.maxP, hDim.nBinErr, hDim.minErrP, hDim.maxErrP);
    hErrPt_vs_Pt_  = dqm->book2D("ErrPt_vs_Pt", "#Delta(p_{T})/p_{T} vs p_{T}",
                                 hDim.nBinPt, hDim.minPt, hDim.maxPt, hDim.nBinErr, hDim.minErrPt, hDim.maxErrPt);
    hErrQPt_vs_Pt_ = dqm->book2D("ErrQPt_vs_Pt", "#Delta(q/p_{T})/(q/p_{T}) vs p_{T}",
                                 hDim.nBinPt, hDim.minPt, hDim.maxPt, hDim.nBinErr, hDim.minErrQPt, hDim.maxErrQPt);

    // - Pulls
    hPullPt_  = dqm->book1D("PullPt" , "Pull(#p_{T})" , hDim.nBinPull, -hDim.wPull, hDim.wPull);
    hPullEta_ = dqm->book1D("PullEta", "Pull(#eta)"   , hDim.nBinPull, -hDim.wPull, hDim.wPull);
    hPullPhi_ = dqm->book1D("PullPhi", "Pull(#phi)"   , hDim.nBinPull, -hDim.wPull, hDim.wPull);
    hPullQPt_ = dqm->book1D("PullQPt", "Pull(q/p_{T})", hDim.nBinPull, -hDim.wPull, hDim.wPull);
    hPullDxy_ = dqm->book1D("PullDxy", "Pull(D_{xy})" , hDim.nBinPull, -hDim.wPull, hDim.wPull);
    hPullDz_  = dqm->book1D("PullDz" , "Pull(D_{z})"  , hDim.nBinPull, -hDim.wPull, hDim.wPull);

    // -- Pulls vs Eta
    hPullPt_vs_Eta_  = dqm->book2D("PullPt_vs_Eta", "Pull(p_{T}) vs #eta",
                                   hDim.nBinEta, hDim.minEta, hDim.maxEta, hDim.nBinPull, -hDim.wPull, hDim.wPull);
    hPullEta_vs_Eta_ = dqm->book2D("PullEta_vs_Eta", "Pull(#eta) vs #eta",
                                   hDim.nBinEta, hDim.minEta, hDim.maxEta, hDim.nBinPull, -hDim.wPull, hDim.wPull);
    hPullPhi_vs_Eta_ = dqm->book2D("PullPhi_vs_Eta", "Pull(#phi) vs #eta",
                                   hDim.nBinEta, hDim.minEta, hDim.maxEta, hDim.nBinPull, -hDim.wPull, hDim.wPull);

    // -- Pulls vs Pt
    hPullPt_vs_Pt_ = dqm->book2D("PullPt_vs_Pt", "Pull(p_{T}) vs p_{T}",
                                 hDim.nBinPt, hDim.minPt, hDim.maxPt, hDim.nBinPull, -hDim.wPull, hDim.wPull);
    hPullEta_vs_Pt_ = dqm->book2D("PullEta_vs_Pt", "Pull(#eta) vs p_{T}",
                                  hDim.nBinPt, hDim.minPt, hDim.maxPt, hDim.nBinPull, -hDim.wPull, hDim.wPull);

    // -- Number of Hits
    const int nHits = 100;
    hNHits_ = dqm->book1D("NHits", "Number of hits", nHits+1, -0.5, nHits+0.5);
    hNHits_vs_Pt_  = dqm->book2D("NHits_vs_Pt", "Number of hits vs p_{T}",
                                 hDim.nBinPt, hDim.minPt, hDim.maxPt, nHits/4+1, -0.25, nHits+0.25);
    hNHits_vs_Eta_ = dqm->book2D("NHits_vs_Eta", "Number of hits vs #eta",
                                 hDim.nBinEta, hDim.minEta, hDim.maxEta, nHits/4+1, -0.25, nHits+0.25);
    hNSimHits_ = dqm->book1D("NSimHits", "Number of simHits", nHits+1, -0.5, nHits+0.5);

    const int nLostHits = 5;
    hNLostHits_ = dqm->book1D("NLostHits", "Number of Lost hits", nLostHits+1, -0.5, nLostHits+0.5);
    hNLostHits_vs_Pt_  = dqm->book2D("NLostHits_vs_Pt", "Number of lost Hits vs p_{T}",
                                     hDim.nBinPt, hDim.minPt, hDim.maxPt, nLostHits+1, -0.5, nLostHits+0.5);
    hNLostHits_vs_Eta_ = dqm->book2D("NLostHits_vs_Eta", "Number of lost Hits vs #eta",
                                     hDim.nBinEta, hDim.minEta, hDim.maxEta, nLostHits+1, -0.5, nLostHits+0.5);

    const int nTrackerHits = 40;
    hNTrackerHits_ = dqm->book1D("NTrackerHits", "Number of valid tracker hits", nTrackerHits+1, -0.5, nTrackerHits+0.5);
    hNTrackerHits_vs_Pt_ = dqm->book2D("NTrackerHits_vs_Pt", "Number of valid traker hits vs p_{T}",
                                       hDim.nBinPt, hDim.minPt, hDim.maxPt, nTrackerHits/4+1, -0.25, nTrackerHits+0.25);
    hNTrackerHits_vs_Eta_ = dqm->book2D("NTrackerHits_vs_Eta", "Number of valid tracker hits vs #eta",
                                        hDim.nBinEta, hDim.minEta, hDim.maxEta, nTrackerHits/4+1, -0.25, nTrackerHits+0.25);

    const int nMuonHits = 60;
    hNMuonHits_ = dqm->book1D("NMuonHits", "Number of valid muon hits", nMuonHits+1, -0.5, nMuonHits+0.5);
    hNMuonHits_vs_Pt_  = dqm->book2D("NMuonHits_vs_Pt", "Number of valid muon hits vs p_{T}",
                                     hDim.nBinPt, hDim.minPt, hDim.maxPt, nMuonHits/4+1, -0.25, nMuonHits+0.25);
    hNMuonHits_vs_Eta_ = dqm->book2D("NMuonHits_vs_Eta", "Number of valid muon hits vs #eta",
                                     hDim.nBinEta, hDim.minEta, hDim.maxEta, nMuonHits/4+1, -0.25, nMuonHits+0.25);

    hNDof_ = dqm->book1D("NDof", "Number of DoF", hDim.nDof+1, -0.5, hDim.nDof+0.5);
    hChi2_ = dqm->book1D("Chi2", "#Chi^{2}", hDim.nBinErr, 0, 200);
    hChi2Norm_ = dqm->book1D("Chi2Norm", "Normalized #Chi^{2}", hDim.nBinErr, 0, 50);
    hChi2Prob_ = dqm->book1D("Chi2Prob", "Prob(#Chi^{2})", hDim.nBinErr, 0, 1);

    hNDof_vs_Eta_ = dqm->book2D("NDof_vs_Eta", "Number of DoF vs #eta",
                                hDim.nBinEta, hDim.minEta, hDim.maxEta, hDim.nDof+1, -0.5, hDim.nDof+0.5);
    hChi2_vs_Eta_ = dqm->book2D("Chi2_vs_Eta", "#Chi^{2} vs #eta",
                                hDim.nBinEta, hDim.minEta, hDim.maxEta, hDim.nBinErr, 0., 200.);
    hChi2Norm_vs_Eta_ = dqm->book2D("Chi2Norm_vs_Eta", "Normalized #Chi^{2} vs #eta",
                                    hDim.nBinEta, hDim.minEta, hDim.maxEta, hDim.nBinErr, 0., 50.);
    hChi2Prob_vs_Eta_ = dqm->book2D("Chi2Prob_vs_Eta", "Prob(#Chi^{2}) vs #eta",
                                    hDim.nBinEta, hDim.minEta, hDim.maxEta, hDim.nBinErr, 0., 1.);

    hNSimToReco_ = dqm->book1D("NSimToReco", "Number of associated reco tracks", hDim.nAssoc+1, -0.5, hDim.nAssoc+0.5);
    hNRecoToSim_ = dqm->book1D("NRecoToSim", "Number of associated sim TP's", hDim.nAssoc+1, -0.5, hDim.nAssoc+0.5);

  };
void RecoMuonValidator::MuonME::fill ( const TrackingParticle simRef,
const Muon muonRef 
) [inline]

Definition at line 287 of file RecoMuonValidator.cc.

References reco::LeafCandidate::charge(), ParticleBase::charge(), funct::cos(), ParticleBase::eta(), reco::LeafCandidate::eta(), edm::Ref< C, T, F >::isNonnull(), ParticleBase::momentum(), reco::LeafCandidate::p(), ParticleBase::p(), reco::Muon::pfP4(), ParticleBase::phi(), reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), ParticleBase::pt(), funct::sin(), reco::Muon::track(), ParticleBase::vertex(), and PV3DBase< T, PVType, FrameType >::x().

Referenced by RecoMuonValidator::analyze().

  {

    const double simP   = simRef->p();
    const double simPt  = simRef->pt();
    const double simEta = doAbsEta_ ? fabs(simRef->eta()) : simRef->eta();
    const double simPhi = simRef->phi();
    const double simQ   = simRef->charge();
    const double simQPt = simQ/simPt;

    GlobalPoint  simVtx(simRef->vertex().x(), simRef->vertex().y(), simRef->vertex().z());
    GlobalVector simMom(simRef->momentum().x(), simRef->momentum().y(), simRef->momentum().z());
    const double simDxy = -simVtx.x()*sin(simPhi)+simVtx.y()*cos(simPhi);
    const double simDz  = simVtx.z() - (simVtx.x()*simMom.x()+simVtx.y()*simMom.y())*simMom.z()/simMom.perp2();

    const double recoQ   = muonRef->charge();
    if ( simQ*recoQ < 0 ) {
      hMisQPt_ ->Fill(simPt );
      hMisQEta_->Fill(simEta);
    }

    double recoP, recoPt, recoEta, recoPhi, recoQPt;
    if (usePFMuon_) {
      //      const double origRecoP   = muonRef->p(); 
      const double origRecoPt  = muonRef->pt();
      //      const double origRecoEta = muonRef->eta();
      //      const double origRecoPhi = muonRef->phi();
      const double origRecoQPt = recoQ/origRecoPt;
      recoP = muonRef->pfP4().P();
      recoPt = muonRef->pfP4().Pt();
      recoEta = muonRef->pfP4().Eta(); 
      recoPhi = muonRef->pfP4().Phi();
      recoQPt = recoQ/recoPt;
      hErrPt_PF_->Fill((recoPt-origRecoPt)/origRecoPt);
      hErrQPt_PF_->Fill((recoQPt-origRecoQPt)/origRecoQPt);

      hdPt_vs_Eta_->Fill(recoEta,recoPt-origRecoPt);
      hdPt_vs_Pt_->Fill(recoPt,recoPt-origRecoPt);

      int theCorrectPFAss = (fabs(recoPt-simPt) < fabs(origRecoPt - simPt))? 1 : 2;
      hPFMomAssCorrectness->Fill(theCorrectPFAss);
      hPt_vs_PFMomAssCorrectness->Fill(simPt,theCorrectPFAss);
    }
  
    else {
      recoP   = muonRef->p(); 
      recoPt  = muonRef->pt();
      recoEta = muonRef->eta();
      recoPhi = muonRef->phi();
      recoQPt = recoQ/recoPt;
    }

    const double errP   = (recoP-simP)/simP;
    const double errPt  = (recoPt-simPt)/simPt;
    const double errEta = (recoEta-simEta)/simEta;
    const double errPhi = (recoPhi-simPhi)/simPhi;
    const double errQPt = (recoQPt-simQPt)/simQPt;

    hP_  ->Fill(simP);
    hPt_ ->Fill(simPt );
    hEta_->Fill(simEta);   
    hPhi_->Fill(simPhi);

    hErrP_  ->Fill(errP  );
    hErrPt_ ->Fill(errPt );
    hErrEta_->Fill(errEta);
    hErrPhi_->Fill(errPhi);

    if(fabs(simEta) > 0. && fabs(simEta) < 0.8) {
      hErrPBarrel_->Fill(errP);
      hErrPtBarrel_->Fill(errPt);
    } else if (fabs(simEta) > 0.8 && fabs(simEta) < 1.2) {
      hErrPOverlap_->Fill(errP);
      hErrPtOverlap_->Fill(errPt);
    } else if (fabs(simEta) > 1.2 ){
      hErrPEndcap_->Fill(errP);
      hErrPtEndcap_->Fill(errPt);
    }

    hErrP_vs_Eta_  ->Fill(simEta, errP  );
    hErrPt_vs_Eta_ ->Fill(simEta, errPt );
    hErrQPt_vs_Eta_->Fill(simEta, errQPt);

    hErrP_vs_P_   ->Fill(simP  , errP  );
    hErrPt_vs_Pt_ ->Fill(simPt , errPt );
    hErrQPt_vs_Pt_->Fill(simQPt, errQPt);

    hErrEta_vs_Eta_->Fill(simEta, errEta);

    //access from track
    reco::TrackRef recoRef = muonRef->track();
    if (recoRef.isNonnull()) {

    // Number of reco-hits
    const int nRecoHits = recoRef->numberOfValidHits();
    const int nLostHits = recoRef->numberOfLostHits();

    hNHits_->Fill(nRecoHits);
    hNHits_vs_Pt_ ->Fill(simPt , nRecoHits);
    hNHits_vs_Eta_->Fill(simEta, nRecoHits);

    hNLostHits_->Fill(nLostHits);
    hNLostHits_vs_Pt_ ->Fill(simPt , nLostHits);
    hNLostHits_vs_Eta_->Fill(simEta, nLostHits);

    const double recoNDof = recoRef->ndof();
    const double recoChi2 = recoRef->chi2();
    const double recoChi2Norm = recoRef->normalizedChi2();
    const double recoChi2Prob = TMath::Prob(recoRef->chi2(), static_cast<int>(recoRef->ndof()));

    hNDof_->Fill(recoNDof);
    hChi2_->Fill(recoChi2);
    hChi2Norm_->Fill(recoChi2Norm);
    hChi2Prob_->Fill(recoChi2Prob);

    hNDof_vs_Eta_->Fill(simEta, recoNDof);
    hChi2_vs_Eta_->Fill(simEta, recoChi2);
    hChi2Norm_vs_Eta_->Fill(simEta, recoChi2Norm);
    hChi2Prob_vs_Eta_->Fill(simEta, recoChi2Prob);

    const double recoDxy = recoRef->dxy();
    const double recoDz  = recoRef->dz();

    const double errDxy = (recoDxy-simDxy)/simDxy;
    const double errDz  = (recoDz-simDz)/simDz;
    hErrDxy_->Fill(errDxy);
    hErrDz_ ->Fill(errDz );

    const double pullPt  = (recoPt-simPt)/recoRef->ptError();
    const double pullQPt = (recoQPt-simQPt)/recoRef->qoverpError();
    const double pullEta = (recoEta-simEta)/recoRef->etaError();
    const double pullPhi = (recoPhi-simPhi)/recoRef->phiError();
    const double pullDxy = (recoDxy-simDxy)/recoRef->dxyError();
    const double pullDz  = (recoDz-simDz)/recoRef->dzError();

    hPullPt_ ->Fill(pullPt );
    hPullEta_->Fill(pullEta);
    hPullPhi_->Fill(pullPhi);
    hPullQPt_->Fill(pullQPt);
    hPullDxy_->Fill(pullDxy);
    hPullDz_ ->Fill(pullDz );

    hPullPt_vs_Eta_->Fill(simEta, pullPt);
    hPullPt_vs_Pt_ ->Fill(simPt, pullPt);

    hPullEta_vs_Eta_->Fill(simEta, pullEta);
    hPullPhi_vs_Eta_->Fill(simEta, pullPhi);

    hPullEta_vs_Pt_->Fill(simPt, pullEta);
    }
  };

Member Data Documentation

Definition at line 129 of file RecoMuonValidator.cc.

Definition at line 126 of file RecoMuonValidator.cc.

Definition at line 127 of file RecoMuonValidator.cc.

Definition at line 126 of file RecoMuonValidator.cc.

Definition at line 127 of file RecoMuonValidator.cc.

Definition at line 126 of file RecoMuonValidator.cc.

Definition at line 127 of file RecoMuonValidator.cc.

Definition at line 106 of file RecoMuonValidator.cc.

Definition at line 107 of file RecoMuonValidator.cc.

Definition at line 98 of file RecoMuonValidator.cc.

Definition at line 98 of file RecoMuonValidator.cc.

Definition at line 95 of file RecoMuonValidator.cc.

Definition at line 101 of file RecoMuonValidator.cc.

Definition at line 95 of file RecoMuonValidator.cc.

Definition at line 100 of file RecoMuonValidator.cc.

Definition at line 101 of file RecoMuonValidator.cc.

Definition at line 96 of file RecoMuonValidator.cc.

Definition at line 96 of file RecoMuonValidator.cc.

Definition at line 95 of file RecoMuonValidator.cc.

Definition at line 96 of file RecoMuonValidator.cc.

Definition at line 95 of file RecoMuonValidator.cc.

Definition at line 104 of file RecoMuonValidator.cc.

Definition at line 100 of file RecoMuonValidator.cc.

Definition at line 101 of file RecoMuonValidator.cc.

Definition at line 97 of file RecoMuonValidator.cc.

Definition at line 97 of file RecoMuonValidator.cc.

Definition at line 97 of file RecoMuonValidator.cc.

Definition at line 105 of file RecoMuonValidator.cc.

Definition at line 100 of file RecoMuonValidator.cc.

Definition at line 101 of file RecoMuonValidator.cc.

Definition at line 87 of file RecoMuonValidator.cc.

Definition at line 92 of file RecoMuonValidator.cc.

Definition at line 92 of file RecoMuonValidator.cc.

Definition at line 126 of file RecoMuonValidator.cc.

Definition at line 127 of file RecoMuonValidator.cc.

Definition at line 115 of file RecoMuonValidator.cc.

Definition at line 116 of file RecoMuonValidator.cc.

Definition at line 116 of file RecoMuonValidator.cc.

Definition at line 115 of file RecoMuonValidator.cc.

Definition at line 117 of file RecoMuonValidator.cc.

Definition at line 117 of file RecoMuonValidator.cc.

Definition at line 88 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

Definition at line 115 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

Definition at line 119 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

Definition at line 119 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

Definition at line 113 of file RecoMuonValidator.cc.

Definition at line 88 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

Definition at line 112 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

Definition at line 113 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

Definition at line 115 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

Definition at line 118 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

Definition at line 118 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

Definition at line 91 of file RecoMuonValidator.cc.

Definition at line 91 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

Definition at line 91 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

Definition at line 87 of file RecoMuonValidator.cc.

Definition at line 108 of file RecoMuonValidator.cc.

Definition at line 87 of file RecoMuonValidator.cc.

Definition at line 87 of file RecoMuonValidator.cc.

Definition at line 109 of file RecoMuonValidator.cc.

Definition at line 122 of file RecoMuonValidator.cc.

Definition at line 122 of file RecoMuonValidator.cc.

Definition at line 122 of file RecoMuonValidator.cc.

Definition at line 123 of file RecoMuonValidator.cc.

Definition at line 123 of file RecoMuonValidator.cc.

Definition at line 122 of file RecoMuonValidator.cc.

Definition at line 123 of file RecoMuonValidator.cc.

Definition at line 122 of file RecoMuonValidator.cc.

Definition at line 123 of file RecoMuonValidator.cc.

Definition at line 123 of file RecoMuonValidator.cc.

Definition at line 122 of file RecoMuonValidator.cc.

Definition at line 85 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

Definition at line 85 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

Definition at line 85 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

Definition at line 85 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

Definition at line 85 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

Definition at line 85 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

Definition at line 130 of file RecoMuonValidator.cc.