CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes
RecoMuonValidator::MuonME Struct Reference

Public Types

typedef MonitorElementMEP
 

Public Member Functions

void bookHistos (DQMStore::IBooker &ibooker, 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 30 of file RecoMuonValidator.cc.

Member Typedef Documentation

Definition at line 31 of file RecoMuonValidator.cc.

Member Function Documentation

void RecoMuonValidator::MuonME::bookHistos ( DQMStore::IBooker ibooker,
const string &  dirName,
const HistoDimensions hDim 
)
inline

Definition at line 85 of file RecoMuonValidator.cc.

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

Referenced by RecoMuonValidator::bookHistograms().

87  {
88  ibooker.cd();
89  ibooker.setCurrentFolder(dirName);
90 
93 
94  //histograms for efficiency plots
95  hP_ = ibooker.book1D("P" , "p of recoTracks" , hDim.nBinP , hDim.minP , hDim.maxP );
96  hPt_ = ibooker.book1D("Pt" , "p_{T} of recoTracks", hDim.nBinPt , hDim.minPt , hDim.maxPt );
97  hEta_ = ibooker.book1D("Eta", "#eta of recoTracks" , hDim.nBinEta, hDim.minEta, hDim.maxEta);
98  hPhi_ = ibooker.book1D("Phi", "#phi of recoTracks" , hDim.nBinPhi, hDim.minPhi, hDim.maxPhi);
99 
100  hSimP_ = ibooker.book1D("SimP" , "p of simTracks" , hDim.nBinP , hDim.minP , hDim.maxP );
101  hSimPt_ = ibooker.book1D("SimPt" , "p_{T} of simTracks", hDim.nBinPt , hDim.minPt , hDim.maxPt );
102  hSimEta_ = ibooker.book1D("SimEta", "#eta of simTracks" , hDim.nBinEta, hDim.minEta, hDim.maxEta);
103  hSimPhi_ = ibooker.book1D("SimPhi", "#phi of simTracks" , hDim.nBinPhi, hDim.minPhi, hDim.maxPhi);
104  hSimDxy_ = ibooker.book1D("SimDxy", "Dxy of simTracks" , hDim.nBinDxy, hDim.minDxy, hDim.maxDxy);
105  hSimDz_ = ibooker.book1D("Dz", "Dz of simTracks" , hDim.nBinDz, hDim.minDz, hDim.maxDz);
106 
107  //track multiplicities
108  hNSim_ = ibooker.book1D("NSim" , "Number of particles per event", hDim.nTrks, -0.5, hDim.nTrks+0.5);
109  hNMuon_ = ibooker.book1D("NMuon", "Number of muons per event" , hDim.nTrks, -0.5, hDim.nTrks+0.5);
110 
111  // - Misc. variables
112  hNTrks_ = ibooker.book1D("NTrks", "Number of reco tracks per event", hDim.nTrks, -0.5, hDim.nTrks+0.5);
113  hNTrksEta_ = ibooker.book1D("NTrksEta", "Number of reco tracks vs #eta", hDim.nBinEta, hDim.minEta, hDim.maxEta);
114  hNTrksPt_ = ibooker.book1D("NTrksPt", "Number of reco tracks vs p_{T}", hDim.nBinPt, hDim.minPt, hDim.maxPt);
115 
116  hMisQPt_ = ibooker.book1D("MisQPt" , "Charge mis-id vs Pt" , hDim.nBinPt , hDim.minPt , hDim.maxPt );
117  hMisQEta_ = ibooker.book1D("MisQEta", "Charge mis-id vs Eta", hDim.nBinEta, hDim.minEta, hDim.maxEta);
118 
119  // - Resolutions
120  hErrP_ = ibooker.book1D("ErrP" , "#Delta(p)/p" , hDim.nBinErr, hDim.minErrP , hDim.maxErrP );
121  hErrPBarrel_ = ibooker.book1D("ErrP_barrel" , "#Delta(p)/p" , hDim.nBinErr, hDim.minErrP , hDim.maxErrP );
122  hErrPOverlap_ = ibooker.book1D("ErrP_overlap" , "#Delta(p)/p" , hDim.nBinErr, hDim.minErrP , hDim.maxErrP );
123  hErrPEndcap_ = ibooker.book1D("ErrP_endcap" , "#Delta(p)/p" , hDim.nBinErr, hDim.minErrP , hDim.maxErrP );
124  hErrPt_ = ibooker.book1D("ErrPt" , "#Delta(p_{T})/p_{T}", hDim.nBinErr, hDim.minErrPt , hDim.maxErrPt );
125  hErrPtBarrel_ = ibooker.book1D("ErrPt_barrel" , "#Delta(p_{T})/p_{T}", hDim.nBinErr, hDim.minErrPt , hDim.maxErrPt );
126  hErrPtOverlap_ = ibooker.book1D("ErrPt_overlap" , "#Delta(p_{T})/p_{T}", hDim.nBinErr, hDim.minErrPt , hDim.maxErrPt );
127  hErrPtEndcap_ = ibooker.book1D("ErrPt_endcap" , "#Delta(p_{T})/p_{T}", hDim.nBinErr, hDim.minErrPt , hDim.maxErrPt );
128  hErrEta_ = ibooker.book1D("ErrEta", "#sigma(#eta))" , hDim.nBinErr, hDim.minErrEta, hDim.maxErrEta);
129  hErrPhi_ = ibooker.book1D("ErrPhi", "#sigma(#phi)" , hDim.nBinErr, hDim.minErrPhi, hDim.maxErrPhi);
130  hErrDxy_ = ibooker.book1D("ErrDxy", "#sigma(d_{xy})" , hDim.nBinErr, hDim.minErrDxy, hDim.maxErrDxy);
131  hErrDz_ = ibooker.book1D("ErrDz" , "#sigma(d_{z})" , hDim.nBinErr, hDim.minErrDz , hDim.maxErrDz );
132 
133  //PF-RECO comparisons
134  if (usePFMuon_) {
135  hErrPt_PF_ = ibooker.book1D("ErrPt_PF" , "#Delta(p_{T})|_{PF}/p_{T}", hDim.nBinErr, hDim.minErrPt, hDim.maxErrPt );
136  hErrQPt_PF_ = ibooker.book1D("ErrQPt_PF" , "#Delta(q/p_{T})|_{PF}/(q/p_{T})", hDim.nBinErr, hDim.minErrQPt, hDim.maxErrQPt);
137 
138  hPFMomAssCorrectness = ibooker.book1D("hPFMomAssCorrectness", "Corrected momentum assignement PF/RECO",2,0.5,2.5);
139  hPt_vs_PFMomAssCorrectness = ibooker.book2D("hPt_vs_PFMomAssCorrectness", "Corrected momentum assignement PF/RECO", hDim.nBinPt, hDim.minPt, hDim.maxP, 2, 0.5, 2.5);
140 
141  hdPt_vs_Pt_ = ibooker.book2D("dPt_vs_Pt", "#Delta(p_{T}) vs p_{T}", hDim.nBinPt, hDim.minPt, hDim.maxPt, hDim.nBinErr, hDim.minErrPt, hDim.maxErrPt);
142  hdPt_vs_Eta_ = ibooker.book2D("dPt_vs_Eta", "#Delta(p_{T}) vs #eta", hDim.nBinEta, hDim.minEta, hDim.maxEta, hDim.nBinErr, hDim.minErrPt, hDim.maxErrPt);
143  }
144 
145  // -- Resolutions vs Eta
146  hErrP_vs_Eta_ = ibooker.book2D("ErrP_vs_Eta", "#Delta(p)/p vs #eta",
148  hErrPt_vs_Eta_ = ibooker.book2D("ErrPt_vs_Eta", "#Delta(p_{T})/p_{T} vs #eta",
150  hErrQPt_vs_Eta_ = ibooker.book2D("ErrQPt_vs_Eta", "#Delta(q/p_{T})/(q/p_{T}) vs #eta",
152  hErrEta_vs_Eta_ = ibooker.book2D("ErrEta_vs_Eta", "#sigma(#eta) vs #eta",
154 
155  // -- Resolutions vs momentum
156  hErrP_vs_P_ = ibooker.book2D("ErrP_vs_P", "#Delta(p)/p vs p",
158  hErrPt_vs_Pt_ = ibooker.book2D("ErrPt_vs_Pt", "#Delta(p_{T})/p_{T} vs p_{T}",
160  hErrQPt_vs_Pt_ = ibooker.book2D("ErrQPt_vs_Pt", "#Delta(q/p_{T})/(q/p_{T}) vs p_{T}",
162 
163  // - Pulls
164  hPullPt_ = ibooker.book1D("PullPt" , "Pull(#p_{T})" , hDim.nBinPull, -hDim.wPull, hDim.wPull);
165  hPullEta_ = ibooker.book1D("PullEta", "Pull(#eta)" , hDim.nBinPull, -hDim.wPull, hDim.wPull);
166  hPullPhi_ = ibooker.book1D("PullPhi", "Pull(#phi)" , hDim.nBinPull, -hDim.wPull, hDim.wPull);
167  hPullQPt_ = ibooker.book1D("PullQPt", "Pull(q/p_{T})", hDim.nBinPull, -hDim.wPull, hDim.wPull);
168  hPullDxy_ = ibooker.book1D("PullDxy", "Pull(D_{xy})" , hDim.nBinPull, -hDim.wPull, hDim.wPull);
169  hPullDz_ = ibooker.book1D("PullDz" , "Pull(D_{z})" , hDim.nBinPull, -hDim.wPull, hDim.wPull);
170 
171  // -- Pulls vs Eta
172  hPullPt_vs_Eta_ = ibooker.book2D("PullPt_vs_Eta", "Pull(p_{T}) vs #eta",
174  hPullEta_vs_Eta_ = ibooker.book2D("PullEta_vs_Eta", "Pull(#eta) vs #eta",
176  hPullPhi_vs_Eta_ = ibooker.book2D("PullPhi_vs_Eta", "Pull(#phi) vs #eta",
178 
179  // -- Pulls vs Pt
180  hPullPt_vs_Pt_ = ibooker.book2D("PullPt_vs_Pt", "Pull(p_{T}) vs p_{T}",
182  hPullEta_vs_Pt_ = ibooker.book2D("PullEta_vs_Pt", "Pull(#eta) vs p_{T}",
184 
185  // -- Number of Hits
186  const int nHits = 100;
187  hNHits_ = ibooker.book1D("NHits", "Number of hits", nHits+1, -0.5, nHits+0.5);
188  hNHits_vs_Pt_ = ibooker.book2D("NHits_vs_Pt", "Number of hits vs p_{T}",
189  hDim.nBinPt, hDim.minPt, hDim.maxPt, nHits/4+1, -0.25, nHits+0.25);
190  hNHits_vs_Eta_ = ibooker.book2D("NHits_vs_Eta", "Number of hits vs #eta",
191  hDim.nBinEta, hDim.minEta, hDim.maxEta, nHits/4+1, -0.25, nHits+0.25);
192  hNSimHits_ = ibooker.book1D("NSimHits", "Number of simHits", nHits+1, -0.5, nHits+0.5);
193 
194  const int nLostHits = 5;
195  hNLostHits_ = ibooker.book1D("NLostHits", "Number of Lost hits", nLostHits+1, -0.5, nLostHits+0.5);
196  hNLostHits_vs_Pt_ = ibooker.book2D("NLostHits_vs_Pt", "Number of lost Hits vs p_{T}",
197  hDim.nBinPt, hDim.minPt, hDim.maxPt, nLostHits+1, -0.5, nLostHits+0.5);
198  hNLostHits_vs_Eta_ = ibooker.book2D("NLostHits_vs_Eta", "Number of lost Hits vs #eta",
199  hDim.nBinEta, hDim.minEta, hDim.maxEta, nLostHits+1, -0.5, nLostHits+0.5);
200 
201  const int nTrackerHits = 40;
202  hNTrackerHits_ = ibooker.book1D("NTrackerHits", "Number of valid tracker hits", nTrackerHits+1, -0.5, nTrackerHits+0.5);
203  hNTrackerHits_vs_Pt_ = ibooker.book2D("NTrackerHits_vs_Pt", "Number of valid traker hits vs p_{T}",
204  hDim.nBinPt, hDim.minPt, hDim.maxPt, nTrackerHits/4+1, -0.25, nTrackerHits+0.25);
205  hNTrackerHits_vs_Eta_ = ibooker.book2D("NTrackerHits_vs_Eta", "Number of valid tracker hits vs #eta",
206  hDim.nBinEta, hDim.minEta, hDim.maxEta, nTrackerHits/4+1, -0.25, nTrackerHits+0.25);
207 
208  const int nMuonHits = 60;
209  hNMuonHits_ = ibooker.book1D("NMuonHits", "Number of valid muon hits", nMuonHits+1, -0.5, nMuonHits+0.5);
210  hNMuonHits_vs_Pt_ = ibooker.book2D("NMuonHits_vs_Pt", "Number of valid muon hits vs p_{T}",
211  hDim.nBinPt, hDim.minPt, hDim.maxPt, nMuonHits/4+1, -0.25, nMuonHits+0.25);
212  hNMuonHits_vs_Eta_ = ibooker.book2D("NMuonHits_vs_Eta", "Number of valid muon hits vs #eta",
213  hDim.nBinEta, hDim.minEta, hDim.maxEta, nMuonHits/4+1, -0.25, nMuonHits+0.25);
214 
215  hNDof_ = ibooker.book1D("NDof", "Number of DoF", hDim.nDof+1, -0.5, hDim.nDof+0.5);
216  hChi2_ = ibooker.book1D("Chi2", "#Chi^{2}", hDim.nBinErr, 0, 200);
217  hChi2Norm_ = ibooker.book1D("Chi2Norm", "Normalized #Chi^{2}", hDim.nBinErr, 0, 50);
218  hChi2Prob_ = ibooker.book1D("Chi2Prob", "Prob(#Chi^{2})", hDim.nBinErr, 0, 1);
219 
220  hNDof_vs_Eta_ = ibooker.book2D("NDof_vs_Eta", "Number of DoF vs #eta",
221  hDim.nBinEta, hDim.minEta, hDim.maxEta, hDim.nDof+1, -0.5, hDim.nDof+0.5);
222  hChi2_vs_Eta_ = ibooker.book2D("Chi2_vs_Eta", "#Chi^{2} vs #eta",
223  hDim.nBinEta, hDim.minEta, hDim.maxEta, hDim.nBinErr, 0., 200.);
224  hChi2Norm_vs_Eta_ = ibooker.book2D("Chi2Norm_vs_Eta", "Normalized #Chi^{2} vs #eta",
225  hDim.nBinEta, hDim.minEta, hDim.maxEta, hDim.nBinErr, 0., 50.);
226  hChi2Prob_vs_Eta_ = ibooker.book2D("Chi2Prob_vs_Eta", "Prob(#Chi^{2}) vs #eta",
228 
229  hNSimToReco_ = ibooker.book1D("NSimToReco", "Number of associated reco tracks", hDim.nAssoc+1, -0.5, hDim.nAssoc+0.5);
230  hNRecoToSim_ = ibooker.book1D("NRecoToSim", "Number of associated sim TP's", hDim.nAssoc+1, -0.5, hDim.nAssoc+0.5);
231 
232  };
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
HistoDimensions hDim
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
void RecoMuonValidator::MuonME::fill ( const TrackingParticle simRef,
const Muon muonRef 
)
inline

Definition at line 237 of file RecoMuonValidator.cc.

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

Referenced by RecoMuonValidator::analyze().

238  {
239 
240  const double simP = simRef->p();
241  const double simPt = simRef->pt();
242  const double simEta = doAbsEta_ ? fabs(simRef->eta()) : simRef->eta();
243  const double simPhi = simRef->phi();
244  const double simQ = simRef->charge();
245  const double simQPt = simQ/simPt;
246 
247  GlobalPoint simVtx(simRef->vertex().x(), simRef->vertex().y(), simRef->vertex().z());
248  GlobalVector simMom(simRef->momentum().x(), simRef->momentum().y(), simRef->momentum().z());
249  const double simDxy = -simVtx.x()*sin(simPhi)+simVtx.y()*cos(simPhi);
250  const double simDz = simVtx.z() - (simVtx.x()*simMom.x()+simVtx.y()*simMom.y())*simMom.z()/simMom.perp2();
251 
252  const double recoQ = muonRef->charge();
253  if ( simQ*recoQ < 0 ) {
254  hMisQPt_ ->Fill(simPt );
255  hMisQEta_->Fill(simEta);
256  }
257 
258  double recoP, recoPt, recoEta, recoPhi, recoQPt;
259  if (usePFMuon_) {
260  // const double origRecoP = muonRef->p();
261  const double origRecoPt = muonRef->pt();
262  // const double origRecoEta = muonRef->eta();
263  // const double origRecoPhi = muonRef->phi();
264  const double origRecoQPt = recoQ/origRecoPt;
265  recoP = muonRef->pfP4().P();
266  recoPt = muonRef->pfP4().Pt();
267  recoEta = muonRef->pfP4().Eta();
268  recoPhi = muonRef->pfP4().Phi();
269  recoQPt = recoQ/recoPt;
270  hErrPt_PF_->Fill((recoPt-origRecoPt)/origRecoPt);
271  hErrQPt_PF_->Fill((recoQPt-origRecoQPt)/origRecoQPt);
272 
273  hdPt_vs_Eta_->Fill(recoEta,recoPt-origRecoPt);
274  hdPt_vs_Pt_->Fill(recoPt,recoPt-origRecoPt);
275 
276  int theCorrectPFAss = (fabs(recoPt-simPt) < fabs(origRecoPt - simPt))? 1 : 2;
277  hPFMomAssCorrectness->Fill(theCorrectPFAss);
278  hPt_vs_PFMomAssCorrectness->Fill(simPt,theCorrectPFAss);
279  }
280 
281  else {
282  recoP = muonRef->p();
283  recoPt = muonRef->pt();
284  recoEta = muonRef->eta();
285  recoPhi = muonRef->phi();
286  recoQPt = recoQ/recoPt;
287  }
288 
289  const double errP = (recoP-simP)/simP;
290  const double errPt = (recoPt-simPt)/simPt;
291  const double errEta = (recoEta-simEta)/simEta;
292  const double errPhi = (recoPhi-simPhi)/simPhi;
293  const double errQPt = (recoQPt-simQPt)/simQPt;
294 
295  hP_ ->Fill(simP);
296  hPt_ ->Fill(simPt );
297  hEta_->Fill(simEta);
298  hPhi_->Fill(simPhi);
299 
300  hErrP_ ->Fill(errP );
301  hErrPt_ ->Fill(errPt );
302  hErrEta_->Fill(errEta);
303  hErrPhi_->Fill(errPhi);
304 
305  if(fabs(simEta) > 0. && fabs(simEta) < 0.8) {
306  hErrPBarrel_->Fill(errP);
307  hErrPtBarrel_->Fill(errPt);
308  } else if (fabs(simEta) > 0.8 && fabs(simEta) < 1.2) {
309  hErrPOverlap_->Fill(errP);
310  hErrPtOverlap_->Fill(errPt);
311  } else if (fabs(simEta) > 1.2 ){
312  hErrPEndcap_->Fill(errP);
313  hErrPtEndcap_->Fill(errPt);
314  }
315 
316  hErrP_vs_Eta_ ->Fill(simEta, errP );
317  hErrPt_vs_Eta_ ->Fill(simEta, errPt );
318  hErrQPt_vs_Eta_->Fill(simEta, errQPt);
319 
320  hErrP_vs_P_ ->Fill(simP , errP );
321  hErrPt_vs_Pt_ ->Fill(simPt , errPt );
322  hErrQPt_vs_Pt_->Fill(simQPt, errQPt);
323 
324  hErrEta_vs_Eta_->Fill(simEta, errEta);
325 
326  //access from track
327  reco::TrackRef recoRef = muonRef->track();
328  if (recoRef.isNonnull()) {
329 
330  // Number of reco-hits
331  const int nRecoHits = recoRef->numberOfValidHits();
332  const int nLostHits = recoRef->numberOfLostHits();
333 
334  hNHits_->Fill(nRecoHits);
335  hNHits_vs_Pt_ ->Fill(simPt , nRecoHits);
336  hNHits_vs_Eta_->Fill(simEta, nRecoHits);
337 
338  hNLostHits_->Fill(nLostHits);
339  hNLostHits_vs_Pt_ ->Fill(simPt , nLostHits);
340  hNLostHits_vs_Eta_->Fill(simEta, nLostHits);
341 
342  const double recoNDof = recoRef->ndof();
343  const double recoChi2 = recoRef->chi2();
344  const double recoChi2Norm = recoRef->normalizedChi2();
345  const double recoChi2Prob = TMath::Prob(recoRef->chi2(), static_cast<int>(recoRef->ndof()));
346 
347  hNDof_->Fill(recoNDof);
348  hChi2_->Fill(recoChi2);
349  hChi2Norm_->Fill(recoChi2Norm);
350  hChi2Prob_->Fill(recoChi2Prob);
351 
352  hNDof_vs_Eta_->Fill(simEta, recoNDof);
353  hChi2_vs_Eta_->Fill(simEta, recoChi2);
354  hChi2Norm_vs_Eta_->Fill(simEta, recoChi2Norm);
355  hChi2Prob_vs_Eta_->Fill(simEta, recoChi2Prob);
356 
357  const double recoDxy = recoRef->dxy();
358  const double recoDz = recoRef->dz();
359 
360  const double errDxy = (recoDxy-simDxy)/simDxy;
361  const double errDz = (recoDz-simDz)/simDz;
362  hErrDxy_->Fill(errDxy);
363  hErrDz_ ->Fill(errDz );
364 
365  const double pullPt = (recoPt-simPt)/recoRef->ptError();
366  const double pullQPt = (recoQPt-simQPt)/recoRef->qoverpError();
367  const double pullEta = (recoEta-simEta)/recoRef->etaError();
368  const double pullPhi = (recoPhi-simPhi)/recoRef->phiError();
369  const double pullDxy = (recoDxy-simDxy)/recoRef->dxyError();
370  const double pullDz = (recoDz-simDz)/recoRef->dzError();
371 
372  hPullPt_ ->Fill(pullPt );
373  hPullEta_->Fill(pullEta);
374  hPullPhi_->Fill(pullPhi);
375  hPullQPt_->Fill(pullQPt);
376  hPullDxy_->Fill(pullDxy);
377  hPullDz_ ->Fill(pullDz );
378 
379  hPullPt_vs_Eta_->Fill(simEta, pullPt);
380  hPullPt_vs_Pt_ ->Fill(simPt, pullPt);
381 
382  hPullEta_vs_Eta_->Fill(simEta, pullEta);
383  hPullPhi_vs_Eta_->Fill(simEta, pullPhi);
384 
385  hPullEta_vs_Pt_->Fill(simPt, pullEta);
386  }
387  };
TrackRef track() const override
reference to a Track
Definition: Muon.h:49
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251
double eta() const final
momentum pseudorapidity
Vector momentum() const
spatial momentum vector
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double pt() const
Transverse momentum. Note this is taken from the first SimTrack only.
double pt() const final
transverse momentum
int charge() const final
electric charge
Definition: LeafCandidate.h:91
reco::Candidate::LorentzVector pfP4() const
Definition: Muon.h:102
void Fill(long long x)
float charge() const
Electric charge. Note this is taken from the first SimTrack only.
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double p() const
Magnitude of momentum vector. Note this is taken from the first SimTrack only.
double p() const final
magnitude of momentum vector
double eta() const
Momentum pseudorapidity. Note this is taken from the first SimTrack only.
Point vertex() const
Parent vertex position.
T x() const
Definition: PV3DBase.h:62
double phi() const final
momentum azimuthal angle
double phi() const
Momentum azimuthal angle. Note this is taken from the first SimTrack only.

Member Data Documentation

bool RecoMuonValidator::MuonME::doAbsEta_

Definition at line 78 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hChi2_

Definition at line 75 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hChi2_vs_Eta_

Definition at line 76 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hChi2Norm_

Definition at line 75 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hChi2Norm_vs_Eta_

Definition at line 76 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hChi2Prob_

Definition at line 75 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hChi2Prob_vs_Eta_

Definition at line 76 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hdPt_vs_Eta_

Definition at line 55 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hdPt_vs_Pt_

Definition at line 56 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrDxy_

Definition at line 47 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrDz_

Definition at line 47 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrEta_

Definition at line 44 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrEta_vs_Eta_

Definition at line 50 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrP_

Definition at line 44 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrP_vs_Eta_

Definition at line 49 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrP_vs_P_

Definition at line 50 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPBarrel_

Definition at line 45 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPEndcap_

Definition at line 45 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPhi_

Definition at line 44 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPOverlap_

Definition at line 45 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPt_

Definition at line 44 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPt_PF_

Definition at line 53 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPt_vs_Eta_

Definition at line 49 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPt_vs_Pt_

Definition at line 50 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPtBarrel_

Definition at line 46 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPtEndcap_

Definition at line 46 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPtOverlap_

Definition at line 46 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrQPt_PF_

Definition at line 54 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrQPt_vs_Eta_

Definition at line 49 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrQPt_vs_Pt_

Definition at line 50 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hEta_

Definition at line 36 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hMisQEta_

Definition at line 41 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hMisQPt_

Definition at line 41 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNDof_

Definition at line 75 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNDof_vs_Eta_

Definition at line 76 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNHits_

Definition at line 64 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNHits_vs_Eta_

Definition at line 65 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNHits_vs_Pt_

Definition at line 65 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNLostHits_

Definition at line 64 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNLostHits_vs_Eta_

Definition at line 66 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNLostHits_vs_Pt_

Definition at line 66 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNMuon_

Definition at line 37 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNMuonHits_

Definition at line 64 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNMuonHits_vs_Eta_

Definition at line 68 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNMuonHits_vs_Pt_

Definition at line 68 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNRecoToSim_

Definition at line 62 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNSim_

Definition at line 37 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNSimHits_

Definition at line 61 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNSimToReco_

Definition at line 62 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNTrackerHits_

Definition at line 64 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNTrackerHits_vs_Eta_

Definition at line 67 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNTrackerHits_vs_Pt_

Definition at line 67 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNTrks_

Definition at line 40 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNTrksEta_

Definition at line 40 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNTrksPt_

Definition at line 40 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hP_

Definition at line 36 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPFMomAssCorrectness

Definition at line 57 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPhi_

Definition at line 36 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPt_

Definition at line 36 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPt_vs_PFMomAssCorrectness

Definition at line 58 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullDxy_

Definition at line 71 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullDz_

Definition at line 71 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullEta_

Definition at line 71 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullEta_vs_Eta_

Definition at line 72 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullEta_vs_Pt_

Definition at line 72 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullPhi_

Definition at line 71 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullPhi_vs_Eta_

Definition at line 72 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullPt_

Definition at line 71 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullPt_vs_Eta_

Definition at line 72 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullPt_vs_Pt_

Definition at line 72 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullQPt_

Definition at line 71 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hSimDxy_

Definition at line 34 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hSimDz_

Definition at line 34 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hSimEta_

Definition at line 34 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hSimP_

Definition at line 34 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hSimPhi_

Definition at line 34 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hSimPt_

Definition at line 34 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

bool RecoMuonValidator::MuonME::usePFMuon_

Definition at line 79 of file RecoMuonValidator.cc.