test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 33 of file RecoMuonValidator.cc.

Member Typedef Documentation

Definition at line 34 of file RecoMuonValidator.cc.

Member Function Documentation

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

Definition at line 88 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().

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

Definition at line 240 of file RecoMuonValidator.cc.

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

Referenced by RecoMuonValidator::analyze().

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

MEP RecoMuonValidator::MuonME::hChi2_

Definition at line 78 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hChi2_vs_Eta_

Definition at line 79 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hChi2Norm_

Definition at line 78 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hChi2Norm_vs_Eta_

Definition at line 79 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hChi2Prob_

Definition at line 78 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hChi2Prob_vs_Eta_

Definition at line 79 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hdPt_vs_Eta_

Definition at line 58 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hdPt_vs_Pt_

Definition at line 59 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrDxy_

Definition at line 50 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrDz_

Definition at line 50 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrEta_

Definition at line 47 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrEta_vs_Eta_

Definition at line 53 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrP_

Definition at line 47 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrP_vs_Eta_

Definition at line 52 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrP_vs_P_

Definition at line 53 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPBarrel_

Definition at line 48 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPEndcap_

Definition at line 48 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPhi_

Definition at line 47 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPOverlap_

Definition at line 48 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPt_

Definition at line 47 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPt_PF_

Definition at line 56 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPt_vs_Eta_

Definition at line 52 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPt_vs_Pt_

Definition at line 53 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPtBarrel_

Definition at line 49 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPtEndcap_

Definition at line 49 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrPtOverlap_

Definition at line 49 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrQPt_PF_

Definition at line 57 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrQPt_vs_Eta_

Definition at line 52 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hErrQPt_vs_Pt_

Definition at line 53 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hEta_

Definition at line 39 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hMisQEta_

Definition at line 44 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hMisQPt_

Definition at line 44 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNDof_

Definition at line 78 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNDof_vs_Eta_

Definition at line 79 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNHits_

Definition at line 67 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNHits_vs_Eta_

Definition at line 68 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNHits_vs_Pt_

Definition at line 68 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNLostHits_

Definition at line 67 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNLostHits_vs_Eta_

Definition at line 69 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNLostHits_vs_Pt_

Definition at line 69 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNMuon_

Definition at line 40 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNMuonHits_

Definition at line 67 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNMuonHits_vs_Eta_

Definition at line 71 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNMuonHits_vs_Pt_

Definition at line 71 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNRecoToSim_

Definition at line 65 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNSim_

Definition at line 40 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNSimHits_

Definition at line 64 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNSimToReco_

Definition at line 65 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNTrackerHits_

Definition at line 67 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNTrackerHits_vs_Eta_

Definition at line 70 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNTrackerHits_vs_Pt_

Definition at line 70 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNTrks_

Definition at line 43 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hNTrksEta_

Definition at line 43 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hNTrksPt_

Definition at line 43 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hP_

Definition at line 39 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPFMomAssCorrectness

Definition at line 60 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPhi_

Definition at line 39 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPt_

Definition at line 39 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPt_vs_PFMomAssCorrectness

Definition at line 61 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullDxy_

Definition at line 74 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullDz_

Definition at line 74 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullEta_

Definition at line 74 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullEta_vs_Eta_

Definition at line 75 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullEta_vs_Pt_

Definition at line 75 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullPhi_

Definition at line 74 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullPhi_vs_Eta_

Definition at line 75 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullPt_

Definition at line 74 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullPt_vs_Eta_

Definition at line 75 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullPt_vs_Pt_

Definition at line 75 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hPullQPt_

Definition at line 74 of file RecoMuonValidator.cc.

MEP RecoMuonValidator::MuonME::hSimDxy_

Definition at line 37 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hSimDz_

Definition at line 37 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hSimEta_

Definition at line 37 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hSimP_

Definition at line 37 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hSimPhi_

Definition at line 37 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

MEP RecoMuonValidator::MuonME::hSimPt_

Definition at line 37 of file RecoMuonValidator.cc.

Referenced by RecoMuonValidator::analyze().

bool RecoMuonValidator::MuonME::usePFMuon_

Definition at line 82 of file RecoMuonValidator.cc.