22 IsminiAOD =
parameters.getParameter<
bool>(
"IsminiAOD");
23 doMVA =
parameters.getParameter<
bool>(
"doMVA");
24 useGEM =
parameters.getUntrackedParameter<
bool>(
"useGEM");
25 maxGEMhitsSoftMuonMVA =
parameters.getUntrackedParameter<
int>(
"maxGEMhitsSoftMuonMVA");
28 theMuonCollectionLabel_ = consumes<edm::View<reco::Muon> >(
parameters.getParameter<
edm::InputTag>(
"MuonCollection"));
29 theVertexLabel_ = consumes<reco::VertexCollection>(pSet.
getParameter<
InputTag>(
"inputTagVertex"));
31 dcsStatusCollection_ =
37 pResBin =
parameters.getParameter<
int>(
"pResBin");
38 pResMin =
parameters.getParameter<
double>(
"pResMin");
39 pResMax =
parameters.getParameter<
double>(
"pResMax");
41 rhMin =
parameters.getParameter<
double>(
"rhMin");
42 rhMax =
parameters.getParameter<
double>(
"rhMax");
45 pMax =
parameters.getParameter<
double>(
"pMax");
46 chi2Bin =
parameters.getParameter<
int>(
"chi2Bin");
47 chi2Min =
parameters.getParameter<
double>(
"chi2Min");
49 phiBin =
parameters.getParameter<
int>(
"phiBin");
52 tunePBin =
parameters.getParameter<
int>(
"tunePBin");
53 tunePMax =
parameters.getParameter<
double>(
"tunePMax");
54 tunePMin =
parameters.getParameter<
double>(
"tunePMin");
55 thetaBin =
parameters.getParameter<
int>(
"thetaBin");
56 thetaMin =
parameters.getParameter<
double>(
"thetaMin");
57 thetaMax =
parameters.getParameter<
double>(
"thetaMax");
62 theFolder =
parameters.getParameter<
string>(
"folder");
72 muReco = ibooker.
book1D(
"muReco",
"muon reconstructed tracks", 6, 1, 7);
74 muReco->setBinLabel(2,
"glb+sta");
75 muReco->setBinLabel(3,
"tk+sta");
76 muReco->setBinLabel(4,
"tk");
77 muReco->setBinLabel(5,
"sta");
78 muReco->setBinLabel(6,
"calo");
89 etaResolution.push_back(ibooker.
book1D(
90 "Res_TkGlb_eta",
"#eta_{TKfromGLB} - #eta_{GLB}",
etaBin * binFactor,
etaMin / 3000,
etaMax / 3000));
91 etaResolution.push_back(ibooker.
book1D(
92 "Res_GlbSta_eta",
"#eta_{GLB} - #eta_{STAfromGLB}",
etaBin * binFactor,
etaMin / 100,
etaMax / 100));
93 etaResolution.push_back(ibooker.
book1D(
94 "Res_TkSta_eta",
"#eta_{TKfromGLB} - #eta_{STAfromGLB}",
etaBin * binFactor,
etaMin / 100,
etaMax / 100));
95 etaResolution.push_back(ibooker.
book2D(
"ResVsEta_TkGlb_eta",
96 "(#eta_{TKfromGLB} - #eta_{GLB}) vs #eta_{GLB}",
103 etaResolution.push_back(ibooker.
book2D(
"ResVsEta_GlbSta_eta",
104 "(#eta_{GLB} - #eta_{STAfromGLB}) vs #eta_{GLB}",
111 etaResolution.push_back(ibooker.
book2D(
"ResVsEta_TkSta_eta",
112 "(#eta_{TKfromGLB} - #eta_{STAfromGLB}) vs #eta_{TKfromGLB}",
119 etaPull = ibooker.
book1D(
"Pull_TkSta_eta",
"#eta_{TKfromGLB} - #eta_{GLB} / error", 100, -10, 10);
123 etaEfficiency.push_back(
129 thetaGlbTrack.push_back(ibooker.
book1D(histname +
"Glb_theta",
"#theta_{GLB}", thetaBin, thetaMin, thetaMax));
131 thetaGlbTrack.push_back(ibooker.
book1D(histname +
"Tk_theta",
"#theta_{TKfromGLB}", thetaBin, thetaMin, thetaMax));
132 thetaGlbTrack[1]->setAxisTitle(
"rad");
133 thetaGlbTrack.push_back(ibooker.
book1D(histname +
"Sta_theta",
"#theta_{STAfromGLB}", thetaBin, thetaMin, thetaMax));
134 thetaGlbTrack[2]->setAxisTitle(
"rad");
135 thetaResolution.push_back(ibooker.
book1D(
"Res_TkGlb_theta",
136 "#theta_{TKfromGLB} - #theta_{GLB}",
137 thetaBin * binFactor,
140 thetaResolution[0]->setAxisTitle(
"rad");
141 thetaResolution.push_back(ibooker.
book1D(
"Res_GlbSta_theta",
142 "#theta_{GLB} - #theta_{STAfromGLB}",
143 thetaBin * binFactor,
146 thetaResolution[1]->setAxisTitle(
"rad");
147 thetaResolution.push_back(ibooker.
book1D(
"Res_TkSta_theta",
148 "#theta_{TKfromGLB} - #theta_{STAfromGLB}",
149 thetaBin * binFactor,
152 thetaResolution[2]->setAxisTitle(
"rad");
153 thetaResolution.push_back(ibooker.
book2D(
"ResVsTheta_TkGlb_theta",
154 "(#theta_{TKfromGLB} - #theta_{GLB}) vs #theta_{GLB}",
158 thetaBin * binFactor,
161 thetaResolution[3]->setAxisTitle(
"rad", 1);
162 thetaResolution[3]->setAxisTitle(
"rad", 2);
163 thetaResolution.push_back(ibooker.
book2D(
"ResVsTheta_GlbSta_theta",
164 "(#theta_{GLB} - #theta_{STAfromGLB}) vs #theta_{GLB}",
168 thetaBin * binFactor,
171 thetaResolution[4]->setAxisTitle(
"rad", 1);
172 thetaResolution[4]->setAxisTitle(
"rad", 2);
173 thetaResolution.push_back(ibooker.
book2D(
"ResVsTheta_TkSta_theta",
174 "(#theta_{TKfromGLB} - #theta_{STAfromGLB}) vs #theta_{TKfromGLB}",
178 thetaBin * binFactor,
181 thetaResolution[5]->setAxisTitle(
"rad", 1);
182 thetaResolution[5]->setAxisTitle(
"rad", 2);
183 thetaPull = ibooker.
book1D(
"Pull_TkSta_theta",
"#theta_{TKfromGLB} - #theta_{STAfromGLB} / error", 100, -10, 10);
184 thetaTrack = ibooker.
book1D(
"TkMuon_theta",
"#theta_{TK}", thetaBin, thetaMin, thetaMax);
186 thetaStaTrack = ibooker.
book1D(
"StaMuon_theta",
"#theta_{STA}", thetaBin, thetaMin, thetaMax);
190 tunePResolution = ibooker.
book1D(
191 "Res_TuneP_pt",
"Pt_{MuonBestTrack}-Pt_{tunePMuonBestTrack}/Pt_{MuonBestTrack}", tunePBin, tunePMin, tunePMax);
194 phiGlbTrack.push_back(ibooker.
book1D(histname +
"Glb_phi",
"#phi_{GLB}", phiBin,
phiMin,
phiMax));
196 phiGlbTrack.push_back(ibooker.
book1D(histname +
"Tk_phi",
"#phi_{TKfromGLB}", phiBin,
phiMin,
phiMax));
197 phiGlbTrack[1]->setAxisTitle(
"rad");
198 phiGlbTrack.push_back(ibooker.
book1D(histname +
"Sta_phi",
"#phi_{STAfromGLB}", phiBin,
phiMin,
phiMax));
199 phiGlbTrack[2]->setAxisTitle(
"rad");
200 phiResolution.push_back(ibooker.
book1D(
201 "Res_TkGlb_phi",
"#phi_{TKfromGLB} - #phi_{GLB}", phiBin * binFactor,
phiMin / 3000,
phiMax / 3000));
202 phiResolution[0]->setAxisTitle(
"rad");
203 phiResolution.push_back(ibooker.
book1D(
204 "Res_GlbSta_phi",
"#phi_{GLB} - #phi_{STAfromGLB}", phiBin * binFactor,
phiMin / 100,
phiMax / 100));
205 phiResolution[1]->setAxisTitle(
"rad");
206 phiResolution.push_back(ibooker.
book1D(
207 "Res_TkSta_phi",
"#phi_{TKfromGLB} - #phi_{STAfromGLB}", phiBin * binFactor,
phiMin / 100,
phiMax / 100));
208 phiResolution[2]->setAxisTitle(
"rad");
209 phiResolution.push_back(ibooker.
book2D(
"ResVsPhi_TkGlb_phi",
210 "(#phi_{TKfromGLB} - #phi_{GLB}) vs #phi_GLB",
217 phiResolution[3]->setAxisTitle(
"rad", 1);
218 phiResolution[3]->setAxisTitle(
"rad", 2);
219 phiResolution.push_back(ibooker.
book2D(
"ResVsPhi_GlbSta_phi",
220 "(#phi_{GLB} - #phi_{STAfromGLB}) vs #phi_{GLB}",
227 phiResolution[4]->setAxisTitle(
"rad", 1);
228 phiResolution[4]->setAxisTitle(
"rad", 2);
229 phiResolution.push_back(ibooker.
book2D(
"ResVsPhi_TkSta_phi",
230 "(#phi_{TKfromGLB} - #phi_{STAfromGLB}) vs #phi_{TKfromGLB}",
237 phiResolution[5]->setAxisTitle(
"rad", 1);
238 phiResolution[5]->setAxisTitle(
"rad", 2);
239 phiPull = ibooker.
book1D(
"Pull_TkSta_phi",
"#phi_{TKfromGLB} - #phi_{STAfromGLB} / error", 100, -10, 10);
244 phiEfficiency.push_back(ibooker.
book1D(
"StaPhi",
"#phi_{STAfromGLB}", phiBin,
phiMin,
phiMax));
245 phiEfficiency[0]->setAxisTitle(
"rad");
246 phiEfficiency.push_back(
247 ibooker.
book1D(
"StaPhi_ifCombinedAlso",
"#phi_{STAfromGLB} if the isGlb=true", phiBin,
phiMin,
phiMax));
248 phiEfficiency[1]->setAxisTitle(
"rad");
251 chi2OvDFGlbTrack.push_back(
252 ibooker.
book1D(histname +
"Glb_chi2OverDf",
"#chi_{2}OverDF_{GLB}", chi2Bin, chi2Min,
chi2Max));
253 chi2OvDFGlbTrack.push_back(
254 ibooker.
book1D(histname +
"Tk_chi2OverDf",
"#chi_{2}OverDF_{TKfromGLB}", phiBin, chi2Min,
chi2Max));
255 chi2OvDFGlbTrack.push_back(
256 ibooker.
book1D(histname +
"Sta_chi2OverDf",
"#chi_{2}OverDF_{STAfromGLB}", chi2Bin, chi2Min,
chi2Max));
257 chi2OvDFTrack = ibooker.
book1D(
"TkMuon_chi2OverDf",
"#chi_{2}OverDF_{TK}", chi2Bin, chi2Min,
chi2Max);
258 chi2OvDFStaTrack = ibooker.
book1D(
"StaMuon_chi2OverDf",
"#chi_{2}OverDF_{STA}", chi2Bin, chi2Min,
chi2Max);
260 probchi2GlbTrack.push_back(ibooker.
book1D(histname +
"Glb_probchi",
"Prob #chi_{GLB}", 120, chi2Min, 1.20));
261 probchi2GlbTrack.push_back(ibooker.
book1D(histname +
"Tk_probchi",
"Prob #chi_{TKfromGLB}", 120, chi2Min, 1.20));
262 probchi2GlbTrack.push_back(ibooker.
book1D(histname +
"Sta_probchi",
"Prob #chi_{STAfromGLB}", 120, chi2Min, 1.20));
263 probchi2Track = ibooker.
book1D(
"TkMuon_probchi",
"Prob #chi_{TK}", 120, chi2Min, 1.20);
264 probchi2StaTrack = ibooker.
book1D(
"StaMuon_probchi",
"Prob #chi_{STA}", 120, chi2Min, 1.20);
267 pGlbTrack.push_back(ibooker.
book1D(histname +
"Glb_p",
"p_{GLB}", pBin,
pMin, pMax));
269 pGlbTrack.push_back(ibooker.
book1D(histname +
"Tk_p",
"p_{TKfromGLB}", pBin,
pMin, pMax));
270 pGlbTrack[1]->setAxisTitle(
"GeV");
271 pGlbTrack.push_back(ibooker.
book1D(histname +
"Sta_p",
"p_{STAfromGLB}", pBin,
pMin, pMax));
272 pGlbTrack[2]->setAxisTitle(
"GeV");
273 pTrack = ibooker.
book1D(
"TkMuon_p",
"p_{TK}", pBin,
pMin, pMax);
275 pStaTrack = ibooker.
book1D(
"StaMuon_p",
"p_{STA}", pBin,
pMin, pMax);
279 ptGlbTrack.push_back(ibooker.
book1D(histname +
"Glb_pt",
"pt_{GLB}", ptBin,
ptMin,
ptMax));
280 ptGlbTrack[0]->setAxisTitle(
"GeV");
281 ptGlbTrack.push_back(ibooker.
book1D(histname +
"Tk_pt",
"pt_{TKfromGLB}", ptBin,
ptMin,
ptMax));
282 ptGlbTrack[1]->setAxisTitle(
"GeV");
283 ptGlbTrack.push_back(ibooker.
book1D(histname +
"Sta_pt",
"pt_{STAfromGLB}", ptBin,
ptMin,
ptMax));
284 ptGlbTrack[2]->setAxisTitle(
"GeV");
287 ptStaTrack = ibooker.
book1D(
"StaMuon_pt",
"pt_{STA}", ptBin,
ptMin, pMax);
292 ptSoftMuonMVA = ibooker.
book1D(
"ptSoftMuonMVA",
"pt_{SoftMuon}", 50, 0, 50);
293 deltaRSoftMuonMVA = ibooker.
book1D(
"deltaRSoftMuonMVA",
"#Delta R", 50, 0, 5);
294 gNchi2SoftMuonMVA = ibooker.
book1D(
"gNchi2SoftMuonMVA",
"gNchi2", 50, 0, 3);
295 vMuHitsSoftMuonMVA = ibooker.
book1D(
"vMuHitsSoftMuonMVA",
"vMuHits", 50, 0, 50);
296 mNuStationsSoftMuonMVA = ibooker.
book1D(
"mNuStationsSoftMuonMVA",
"mNuStations", 6, 0, 6);
297 dxyRefSoftMuonMVA = ibooker.
book1D(
"dxyRefSoftMuonMVA",
"dxyRef", 50, -0.1, 0.1);
298 dzRefSoftMuonMVA = ibooker.
book1D(
"dzRefSoftMuonMVA",
"dzRef", 50, -0.1, 0.1);
299 LWHSoftMuonMVA = ibooker.
book1D(
"LWHSoftMuonMVA",
"LWH", 20, 0, 20);
300 valPixHitsSoftMuonMVA = ibooker.
book1D(
"valPixHitsSoftMuonMVA",
"valPixHits", 8, 0, 8);
301 innerChi2SoftMuonMVA = ibooker.
book1D(
"innerChi2SoftMuonMVA",
"innerChi2", 50, 0, 3);
302 outerChi2SoftMuonMVA = ibooker.
book1D(
"outerChi2SoftMuonMVA",
"outerChi2", 50, 0, 4);
303 iValFracSoftMuonMVA = ibooker.
book1D(
"iValFracSoftMuonMVA",
"iValFrac", 50, 0.5, 1.0);
304 segCompSoftMuonMVA = ibooker.
book1D(
"segCompSoftMuonMVA",
"segComp", 50, 0, 1.2);
305 chi2LocMomSoftMuonMVA = ibooker.
book1D(
"chi2LocMomSoftMuonMVA",
"chi2LocMom", 50, 0, 40);
306 chi2LocPosSoftMuonMVA = ibooker.
book1D(
"chi2LocPosSoftMuonMVA",
"chi2LocPos", 0, 0, 8);
307 glbTrackTailProbSoftMuonMVA = ibooker.
book1D(
"glbTrackTailProbSoftMuonMVA",
"glbTrackTailProb", 50, 0, 8);
308 NTrkVHitsSoftMuonMVA = ibooker.
book1D(
"NTrkVHitsSoftMuonMVA",
"NTrkVHits", 50, 0, 35);
309 kinkFinderSoftMuonMVA = ibooker.
book1D(
"kinkFinderSoftMuonMVA",
"kinkFinder", 50, 0, 30);
310 vRPChitsSoftMuonMVA = ibooker.
book1D(
"vRPChitsSoftMuonMVA",
"vRPChits", 50, 0, 50);
311 glbKinkFinderSoftMuonMVA = ibooker.
book1D(
"glbKinkFinderSoftMuonMVA",
"glbKinkFinder", 50, 0, 50);
312 glbKinkFinderLogSoftMuonMVA = ibooker.
book1D(
"glbKinkFinderLogSoftMuonMVA",
"glbKinkFinderLog", 50, 0, 50);
313 staRelChi2SoftMuonMVA = ibooker.
book1D(
"staRelChi2SoftMuonMVA",
"staRelChi2", 50, 0, 2);
314 glbDeltaEtaPhiSoftMuonMVA = ibooker.
book1D(
"glbDeltaEtaPhiSoftMuonMVA",
"glbDeltaEtaPhi", 50, 0, 0.15);
315 trkRelChi2SoftMuonMVA = ibooker.
book1D(
"trkRelChi2SoftMuonMVA",
"trkRelChi2", 50, 0, 1.2);
316 vDThitsSoftMuonMVA = ibooker.
book1D(
"vDThitsSoftMuonMVA",
"vDThits", 50, 0, 50);
317 vCSChitsSoftMuonMVA = ibooker.
book1D(
"vCSChitsSoftMuonMVA",
"vCSChits", 50, 0, 50);
319 vGEMhitsSoftMuonMVA =
320 ibooker.
book1D(
"vGEMhitsSoftMuonMVA",
"vGEMhits", maxGEMhitsSoftMuonMVA, 0, maxGEMhitsSoftMuonMVA);
321 vGEMhitsSoftMuonMVA->
setXTitle(
"Number of Valid GEM Hits of Global Muon");
323 vGEMhitsSoftMuonMVA =
nullptr;
325 timeAtIpInOutSoftMuonMVA = ibooker.
book1D(
"timeAtIpInOutSoftMuonMVA",
"timeAtIpInOut", 50, -10.0, 10.0);
326 timeAtIpInOutErrSoftMuonMVA = ibooker.
book1D(
"timeAtIpInOutErrSoftMuonMVA",
"timeAtIpInOutErr", 50, 0, 3.5);
327 getMuonHitsPerStationSoftMuonMVA =
328 ibooker.
book1D(
"getMuonHitsPerStationSoftMuonMVA",
"getMuonHitsPerStation", 6, 0, 6);
329 QprodSoftMuonMVA = ibooker.
book1D(
"QprodSoftMuonMVA",
"Qprod", 4, -2, 2);
332 qGlbTrack.push_back(ibooker.
book1D(histname +
"Glb_q",
"q_{GLB}", 5, -2.5, 2.5));
333 qGlbTrack.push_back(ibooker.
book1D(histname +
"Tk_q",
"q_{TKfromGLB}", 5, -2.5, 2.5));
334 qGlbTrack.push_back(ibooker.
book1D(histname +
"Sta_q",
"q_{STAformGLB}", 5, -2.5, 2.5));
335 qGlbTrack.push_back(ibooker.
book1D(
336 histname +
"qComparison",
"comparison between q_{GLB} and q_{TKfromGLB}, q_{STAfromGLB}", 8, 0.5, 8.5));
338 qGlbTrack[3]->setBinLabel(2,
"qGlb!=qSta");
339 qGlbTrack[3]->setBinLabel(3,
"qGlb=qTk");
340 qGlbTrack[3]->setBinLabel(4,
"qGlb!=qTk");
341 qGlbTrack[3]->setBinLabel(5,
"qSta=qTk");
342 qGlbTrack[3]->setBinLabel(6,
"qSta!=qTk");
343 qGlbTrack[3]->setBinLabel(7,
"qGlb!=qSta,qGlb!=Tk");
344 qGlbTrack[3]->setBinLabel(8,
"qGlb=qSta,qGlb=Tk");
345 qTrack = ibooker.
book1D(
"TkMuon_q",
"q_{TK}", 5, -2.5, 2.5);
346 qStaTrack = ibooker.
book1D(
"StaMuon_q",
"q_{STA}", 5, -2.5, 2.5);
350 qOverpResolution.push_back(ibooker.
book1D(
351 "Res_TkGlb_qOverp",
"(q/p)_{TKfromGLB} - (q/p)_{GLB}", pResBin * binFactor * 2, pResMin / 10, pResMax / 10));
353 qOverpResolution.push_back(
354 ibooker.
book1D(
"Res_GlbSta_qOverp",
"(q/p)_{GLB} - (q/p)_{STAfromGLB}", pResBin * binFactor, pResMin, pResMax));
355 qOverpResolution[1]->setAxisTitle(
"GeV^{-1}");
356 qOverpResolution.push_back(ibooker.
book1D(
357 "Res_TkSta_qOverp",
"(q/p)_{TKfromGLB} - (q/p)_{STAfromGLB}", pResBin * binFactor, pResMin, pResMax));
358 qOverpResolution[2]->setAxisTitle(
"GeV^{-1}");
359 qOverpPull = ibooker.
book1D(
"Pull_TkSta_qOverp",
"(q/p)_{TKfromGLB} - (q/p)_{STAfromGLB} / error", 100, -10, 10);
361 oneOverpResolution.push_back(ibooker.
book1D(
362 "Res_TkGlb_oneOverp",
"(1/p)_{TKfromGLB} - (1/p)_{GLB}", pResBin * binFactor * 2, pResMin / 10, pResMax / 10));
364 oneOverpResolution.push_back(
365 ibooker.
book1D(
"Res_GlbSta_oneOverp",
"(1/p)_{GLB} - (1/p)_{STAfromGLB}", pResBin * binFactor, pResMin, pResMax));
366 oneOverpResolution[1]->setAxisTitle(
"GeV^{-1}");
367 oneOverpResolution.push_back(ibooker.
book1D(
368 "Res_TkSta_oneOverp",
"(q/p)_{TKfromGLB} - (q/p)_{STAfromGLB}", pResBin * binFactor, pResMin, pResMax));
369 oneOverpResolution[2]->setAxisTitle(
"GeV^{-1}");
370 oneOverpPull = ibooker.
book1D(
"Pull_TkSta_oneOverp",
"(1/p)_{TKfromGLB} - (1/p)_{STAfromGLB} / error", 100, -10, 10);
372 qOverptResolution.push_back(ibooker.
book1D(
"Res_TkGlb_qOverpt",
373 "(q/p_{t})_{TKfromGLB} - (q/p_{t})_{GLB}",
374 pResBin * binFactor * 2,
378 qOverptResolution.push_back(ibooker.
book1D(
379 "Res_GlbSta_qOverpt",
"(q/p_{t})_{GLB} - (q/p_{t})_{STAfromGLB}", pResBin * binFactor, pResMin, pResMax));
380 qOverptResolution[1]->setAxisTitle(
"GeV^{-1}");
381 qOverptResolution.push_back(ibooker.
book1D(
382 "Res_TkSta_qOverpt",
"(q/p_{t})_{TKfromGLB} - (q/p_{t})_{STAfromGLB}", pResBin * binFactor, pResMin, pResMax));
383 qOverptResolution[2]->setAxisTitle(
"GeV^{-1}");
384 qOverptPull = ibooker.
book1D(
"Pull_TkSta_qOverpt",
"(q/pt)_{TKfromGLB} - (q/pt)_{STAfromGLB} / error", 100, -10, 10);
386 oneOverptResolution.push_back(ibooker.
book1D(
"Res_TkGlb_oneOverpt",
387 "(1/p_{t})_{TKfromGLB} - (1/p_{t})_{GLB}",
388 pResBin * binFactor * 2,
392 oneOverptResolution.push_back(ibooker.
book1D(
393 "Res_GlbSta_oneOverpt",
"(1/p_{t})_{GLB} - (1/p_{t})_{STAfromGLB}", pResBin * binFactor, pResMin, pResMax));
394 oneOverptResolution[1]->setAxisTitle(
"GeV^{-1}");
395 oneOverptResolution.push_back(ibooker.
book1D(
396 "Res_TkSta_oneOverpt",
"(1/p_{t})_{TKfromGLB} - (1/p_{t})_{STAfromGLB}", pResBin * binFactor, pResMin, pResMax));
397 oneOverptResolution[2]->setAxisTitle(
"GeV^{-1}");
398 oneOverptResolution.push_back(ibooker.
book2D(
"ResVsEta_TkGlb_oneOverpt",
399 "(#eta_{TKfromGLB} - #eta_{GLB}) vs (1/p_{t})_{GLB}",
403 pResBin * binFactor * 2,
406 oneOverptResolution[3]->setAxisTitle(
"GeV^{-1}", 2);
407 oneOverptResolution.push_back(ibooker.
book2D(
"ResVsEta_GlbSta_oneOverpt",
408 "(#eta_{GLB} - #eta_{STAfromGLB} vs (1/p_{t})_{GLB}",
415 oneOverptResolution[4]->setAxisTitle(
"GeV^{-1}", 2);
416 oneOverptResolution.push_back(ibooker.
book2D(
"ResVsEta_TkSta_oneOverpt",
417 "(#eta_{TKfromGLB} - #eta_{STAfromGLB}) vs (1/p_{t})_{TKfromGLB}",
424 oneOverptResolution[5]->setAxisTitle(
"GeV^{-1}", 2);
425 oneOverptResolution.push_back(ibooker.
book2D(
"ResVsPhi_TkGlb_oneOverpt",
426 "(#phi_{TKfromGLB} - #phi_{GLB}) vs (1/p_{t})_{GLB}",
430 pResBin * binFactor * 2,
433 oneOverptResolution[6]->setAxisTitle(
"rad", 1);
434 oneOverptResolution[6]->setAxisTitle(
"GeV^{-1}", 2);
435 oneOverptResolution.push_back(ibooker.
book2D(
"ResVsPhi_GlbSta_oneOverpt",
436 "(#phi_{GLB} - #phi_{STAfromGLB} vs (1/p_{t})_{GLB}",
443 oneOverptResolution[7]->setAxisTitle(
"rad", 1);
444 oneOverptResolution[7]->setAxisTitle(
"GeV^{-1}", 2);
445 oneOverptResolution.push_back(ibooker.
book2D(
"ResVsPhi_TkSta_oneOverpt",
446 "(#phi_{TKfromGLB} - #phi_{STAfromGLB}) vs (1/p_{t})_{TKfromGLB}",
453 oneOverptResolution[8]->setAxisTitle(
"rad", 1);
454 oneOverptResolution[8]->setAxisTitle(
"GeV^{-1}", 2);
455 oneOverptResolution.push_back(ibooker.
book2D(
"ResVsPt_TkGlb_oneOverpt",
456 "((1/p_{t})_{TKfromGLB} - (1/p_{t})_{GLB}) vs (1/p_{t})_{GLB}",
460 pResBin * binFactor * 2,
463 oneOverptResolution[9]->setAxisTitle(
"GeV^{-1}", 1);
464 oneOverptResolution[9]->setAxisTitle(
"GeV^{-1}", 2);
465 oneOverptResolution.push_back(ibooker.
book2D(
"ResVsPt_GlbSta_oneOverpt",
466 "((1/p_{t})_{GLB} - (1/p_{t})_{STAfromGLB} vs (1/p_{t})_{GLB}",
473 oneOverptResolution[10]->setAxisTitle(
"GeV^{-1}", 1);
474 oneOverptResolution[10]->setAxisTitle(
"GeV^{-1}", 2);
475 oneOverptResolution.push_back(
476 ibooker.
book2D(
"ResVsPt_TkSta_oneOverpt",
477 "((1/p_{t})_{TKfromGLB} - (1/p_{t})_{STAfromGLB}) vs (1/p_{t})_{TKfromGLB}",
484 oneOverptResolution[11]->setAxisTitle(
"GeV^{-1}", 1);
485 oneOverptResolution[11]->setAxisTitle(
"GeV^{-1}", 2);
487 ibooker.
book1D(
"Pull_TkSta_oneOverpt",
"(1/pt)_{TKfromGLB} - (1/pt)_{STAfromGLB} / error", 100, -10, 10);
491 phiVsetaGlbTrack.push_back(ibooker.
book2D(
493 phiVsetaGlbTrack.push_back(ibooker.
book2D(
495 phiVsetaGlbTrack.push_back(ibooker.
book2D(
498 phiVsetaGlbTrack_badlumi.push_back(ibooker.
book2D(
500 phiVsetaGlbTrack_badlumi.push_back(ibooker.
book2D(histname +
"Tk_phiVSeta_badlumi",
501 "#phi vs #eta (TKfromGLB)",
508 phiVsetaGlbTrack_badlumi.push_back(ibooker.
book2D(histname +
"Sta_phiVseta_badlumi",
509 "#phi vs #eta (STAfromGLB)",
519 rhAnalysis.push_back(ibooker.
book1D(
"StaRh_Frac_inGlb",
"recHits_{STAinGLB} / recHits_{GLB}", rhBin, rhMin, rhMax));
520 rhAnalysis.push_back(ibooker.
book1D(
"TkRh_Frac_inGlb",
"recHits_{TKinGLB} / recHits_{GLB}", rhBin, rhMin, rhMax));
521 rhAnalysis.push_back(
522 ibooker.
book1D(
"StaRh_inGlb_Div_RhAssoSta",
"recHits_{STAinGLB} / recHits_{STAfromGLB}", rhBin, rhMin, rhMax));
523 rhAnalysis.push_back(
524 ibooker.
book1D(
"TkRh_inGlb_Div_RhAssoTk",
"recHits_{TKinGLB} / recHits_{TKfromGLB}", rhBin, rhMin, rhMax));
525 rhAnalysis.push_back(ibooker.
book1D(
526 "GlbRh_Div_RhAssoStaTk",
"recHits_{GLB} / (recHits_{TKfromGLB}+recHits_{STAfromGLB})", rhBin, rhMin, rhMax));
527 rhAnalysis.push_back(ibooker.
book1D(
"invalidRh_Frac_inTk",
"Invalid recHits / rechits_{GLB}", rhBin, rhMin, rhMax));
531 muVStkSytemRotation.push_back(ibooker.
book2D(
532 "muVStkSytemRotation_posMu",
"pT_{TK} / pT_{GLB} vs pT_{GLB} for #mu^{+}", 50, 0, 200, 100, 0.8, 1.2));
533 muVStkSytemRotation.push_back(ibooker.
book2D(
534 "muVStkSytemRotation_negMu",
"pT_{TK} / pT_{GLB} vs pT_{GLB} for #mu^{-}", 50, 0, 200, 100, 0.8, 1.2));
538 float p1 = 0,
p2 = 0, p1e = 1, p2e = 1;
542 p1e = t1->etaError();
544 p2e = t2->etaError();
545 }
else if (par ==
"theta") {
547 p1e = t1->thetaError();
549 p2e = t2->thetaError();
550 }
else if (par ==
"phi") {
552 p1e = t1->phiError();
554 p2e = t2->phiError();
555 }
else if (par ==
"qOverp") {
556 p1 = t1->charge() / t1->p();
557 p1e = t1->qoverpError();
558 p2 = t2->charge() / t2->p();
559 p2e = t2->qoverpError();
560 }
else if (par ==
"oneOverp") {
562 p1e = t1->qoverpError();
564 p2e = t2->qoverpError();
565 }
else if (par ==
"qOverpt") {
566 p1 = t1->charge() / t1->pt();
567 p1e = t1->ptError() * p1 *
p1;
568 p2 = t2->charge() / t2->pt();
569 p2e = t2->ptError() *
p2 *
p2;
570 }
else if (par ==
"oneOverpt") {
572 p1e = t1->ptError() * p1 *
p1;
574 p2e = t2->ptError() *
p2 *
p2;
578 if (p1e != 0 || p2e != 0)
579 pull = res /
sqrt(p1e * p1e + p2e * p2e);
590 iEvent.
getByToken(theMuonCollectionLabel_, muons);
595 iEvent.
getByToken(theBeamSpotLabel_, beamSpot);
597 edm::LogInfo(
"MuonRecoAnalyzer") <<
"Error: Can't get the beamspot" << endl;
602 edm::LogInfo(
"MuonRecoAnalyzer") <<
"Error: Can't get the vertex collection" << endl;
609 bool fillBadLumi =
false;
611 for (
auto const& dcsStatusItr : *dcsStatus) {
662 float res = 0, pull = 0;
679 pvIndex = getPv(iTrack.
index(), &(*vertex));
681 refPoint = vertex->at(pvIndex).position();
684 refPoint = beamSpot->position();
686 edm::LogInfo(
"MuonRecoAnalyzer") <<
"ERROR: No beam sport found!" << endl;
690 ptSoftMuonMVA->Fill(iTrack->eta());
691 deltaRSoftMuonMVA->Fill(getDeltaR(*iTrack, *oTrack));
692 gNchi2SoftMuonMVA->Fill(gTrack->normalizedChi2());
694 mNuStationsSoftMuonMVA->Fill(
muon->numberOfMatchedStations());
696 dxyRefSoftMuonMVA->Fill(iTrack->dxy(refPoint));
697 dzRefSoftMuonMVA->Fill(iTrack->dz(refPoint));
701 innerChi2SoftMuonMVA->Fill(iTrack->normalizedChi2());
702 outerChi2SoftMuonMVA->Fill(oTrack->normalizedChi2());
703 iValFracSoftMuonMVA->Fill(iTrack->validFraction());
709 kinkFinderSoftMuonMVA->Fill(muonQuality.
trkKink);
711 glbKinkFinderSoftMuonMVA->Fill(muonQuality.
glbKink);
712 glbKinkFinderLogSoftMuonMVA->Fill(TMath::Log(2 + muonQuality.
glbKink));
713 staRelChi2SoftMuonMVA->Fill(muonQuality.
staRelChi2);
715 trkRelChi2SoftMuonMVA->Fill(muonQuality.
trkRelChi2);
721 timeAtIpInOutSoftMuonMVA->Fill(
muon->time().timeAtIpInOut);
722 timeAtIpInOutErrSoftMuonMVA->Fill(
muon->time().timeAtIpInOutErr);
724 QprodSoftMuonMVA->Fill((iTrack->charge() * oTrack->charge()));
727 if (
muon->isGlobalMuon()) {
728 LogTrace(
metname) <<
"[MuonRecoAnalyzer] The mu is global - filling the histos";
729 if (
muon->isTrackerMuon() &&
muon->isStandAloneMuon())
731 if (!(
muon->isTrackerMuon()) &&
muon->isStandAloneMuon())
733 if (!
muon->isStandAloneMuon())
734 LogTrace(
metname) <<
"[MuonRecoAnalyzer] ERROR: the mu is global but not standalone!";
742 etaGlbTrack[0]->Fill(recoCombinedGlbTrack->eta());
743 etaGlbTrack[1]->Fill(recoTkGlbTrack->eta());
744 etaGlbTrack[2]->Fill(recoStaGlbTrack->eta());
746 phiVsetaGlbTrack[0]->Fill(recoCombinedGlbTrack->eta(), recoCombinedGlbTrack->phi());
747 phiVsetaGlbTrack[1]->Fill(recoTkGlbTrack->eta(), recoTkGlbTrack->phi());
748 phiVsetaGlbTrack[2]->Fill(recoStaGlbTrack->eta(), recoStaGlbTrack->phi());
751 phiVsetaGlbTrack_badlumi[0]->Fill(recoCombinedGlbTrack->eta(), recoCombinedGlbTrack->phi());
752 phiVsetaGlbTrack_badlumi[1]->Fill(recoTkGlbTrack->eta(), recoTkGlbTrack->phi());
753 phiVsetaGlbTrack_badlumi[2]->Fill(recoStaGlbTrack->eta(), recoStaGlbTrack->phi());
756 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"eta", res, pull);
757 etaResolution[0]->Fill(res);
758 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"eta", res, pull);
759 etaResolution[1]->Fill(res);
760 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"eta", res, pull);
761 etaResolution[2]->Fill(res);
763 etaResolution[3]->Fill(recoCombinedGlbTrack->eta(), recoTkGlbTrack->eta() - recoCombinedGlbTrack->eta());
764 etaResolution[4]->Fill(recoCombinedGlbTrack->eta(), -recoStaGlbTrack->eta() + recoCombinedGlbTrack->eta());
765 etaResolution[5]->Fill(recoCombinedGlbTrack->eta(), recoTkGlbTrack->eta() - recoStaGlbTrack->eta());
767 thetaGlbTrack[0]->Fill(recoCombinedGlbTrack->theta());
768 thetaGlbTrack[1]->Fill(recoTkGlbTrack->theta());
769 thetaGlbTrack[2]->Fill(recoStaGlbTrack->theta());
770 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"theta", res, pull);
771 thetaResolution[0]->Fill(res);
772 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"theta", res, pull);
773 thetaResolution[1]->Fill(res);
775 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"theta", res, pull);
776 thetaResolution[2]->Fill(res);
777 thetaPull->Fill(pull);
778 thetaResolution[3]->Fill(recoCombinedGlbTrack->theta(), recoTkGlbTrack->theta() - recoCombinedGlbTrack->theta());
779 thetaResolution[4]->Fill(recoCombinedGlbTrack->theta(),
780 -recoStaGlbTrack->theta() + recoCombinedGlbTrack->theta());
781 thetaResolution[5]->Fill(recoCombinedGlbTrack->theta(), recoTkGlbTrack->theta() - recoStaGlbTrack->theta());
783 phiGlbTrack[0]->Fill(recoCombinedGlbTrack->phi());
784 phiGlbTrack[1]->Fill(recoTkGlbTrack->phi());
785 phiGlbTrack[2]->Fill(recoStaGlbTrack->phi());
786 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"phi", res, pull);
787 phiResolution[0]->Fill(res);
788 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"phi", res, pull);
789 phiResolution[1]->Fill(res);
790 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"phi", res, pull);
791 phiResolution[2]->Fill(res);
793 phiResolution[3]->Fill(recoCombinedGlbTrack->phi(), recoTkGlbTrack->phi() - recoCombinedGlbTrack->phi());
794 phiResolution[4]->Fill(recoCombinedGlbTrack->phi(), -recoStaGlbTrack->phi() + recoCombinedGlbTrack->phi());
795 phiResolution[5]->Fill(recoCombinedGlbTrack->phi(), recoTkGlbTrack->phi() - recoStaGlbTrack->phi());
797 chi2OvDFGlbTrack[0]->Fill(recoCombinedGlbTrack->normalizedChi2());
798 chi2OvDFGlbTrack[1]->Fill(recoTkGlbTrack->normalizedChi2());
799 chi2OvDFGlbTrack[2]->Fill(recoStaGlbTrack->normalizedChi2());
803 probchi2GlbTrack[0]->Fill(TMath::Prob(recoCombinedGlbTrack->chi2(), recoCombinedGlbTrack->ndof()));
804 probchi2GlbTrack[1]->Fill(TMath::Prob(recoTkGlbTrack->chi2(), recoTkGlbTrack->ndof()));
805 probchi2GlbTrack[2]->Fill(TMath::Prob(recoStaGlbTrack->chi2(), recoStaGlbTrack->ndof()));
809 pGlbTrack[0]->Fill(recoCombinedGlbTrack->p());
810 pGlbTrack[1]->Fill(recoTkGlbTrack->p());
811 pGlbTrack[2]->Fill(recoStaGlbTrack->p());
813 ptGlbTrack[0]->Fill(recoCombinedGlbTrack->pt());
814 ptGlbTrack[1]->Fill(recoTkGlbTrack->pt());
815 ptGlbTrack[2]->Fill(recoStaGlbTrack->pt());
817 qGlbTrack[0]->Fill(recoCombinedGlbTrack->charge());
818 qGlbTrack[1]->Fill(recoTkGlbTrack->charge());
819 qGlbTrack[2]->Fill(recoStaGlbTrack->charge());
820 if (recoCombinedGlbTrack->charge() == recoStaGlbTrack->charge())
821 qGlbTrack[3]->
Fill(1);
823 qGlbTrack[3]->Fill(2);
824 if (recoCombinedGlbTrack->charge() == recoTkGlbTrack->charge())
825 qGlbTrack[3]->
Fill(3);
827 qGlbTrack[3]->Fill(4);
828 if (recoStaGlbTrack->charge() == recoTkGlbTrack->charge())
829 qGlbTrack[3]->
Fill(5);
831 qGlbTrack[3]->Fill(6);
832 if (recoCombinedGlbTrack->charge() != recoStaGlbTrack->charge() &&
833 recoCombinedGlbTrack->charge() != recoTkGlbTrack->charge())
834 qGlbTrack[3]->
Fill(7);
835 if (recoCombinedGlbTrack->charge() == recoStaGlbTrack->charge() &&
836 recoCombinedGlbTrack->charge() == recoTkGlbTrack->charge())
837 qGlbTrack[3]->
Fill(8);
839 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"qOverp", res, pull);
840 qOverpResolution[0]->Fill(res);
841 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"qOverp", res, pull);
842 qOverpResolution[1]->Fill(res);
843 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"qOverp", res, pull);
844 qOverpResolution[2]->Fill(res);
845 qOverpPull->Fill(pull);
847 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"oneOverp", res, pull);
848 oneOverpResolution[0]->Fill(res);
849 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"oneOverp", res, pull);
850 oneOverpResolution[1]->Fill(res);
851 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"oneOverp", res, pull);
852 oneOverpResolution[2]->Fill(res);
853 oneOverpPull->Fill(pull);
855 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"qOverpt", res, pull);
856 qOverptResolution[0]->Fill(res);
857 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"qOverpt", res, pull);
858 qOverptResolution[1]->Fill(res);
859 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"qOverpt", res, pull);
860 qOverptResolution[2]->Fill(res);
861 qOverptPull->Fill(pull);
863 GetRes(recoTkGlbTrack, recoCombinedGlbTrack,
"oneOverpt", res, pull);
864 oneOverptResolution[0]->Fill(res);
865 GetRes(recoCombinedGlbTrack, recoStaGlbTrack,
"oneOverpt", res, pull);
866 oneOverptResolution[1]->Fill(res);
867 GetRes(recoTkGlbTrack, recoStaGlbTrack,
"oneOverpt", res, pull);
868 oneOverptResolution[2]->Fill(res);
869 oneOverptPull->Fill(pull);
877 double bestTrackPt = recoBestTrack->pt();
879 double tunePBestTrackPt = recoTunePBestTrack->pt();
881 double tunePBestTrackRes = (bestTrackPt - tunePBestTrackPt) / bestTrackPt;
883 tunePResolution->Fill(tunePBestTrackRes);
885 oneOverptResolution[3]->Fill(recoCombinedGlbTrack->eta(),
886 (1 / recoTkGlbTrack->pt()) - (1 / recoCombinedGlbTrack->pt()));
887 oneOverptResolution[4]->Fill(recoCombinedGlbTrack->eta(),
888 -(1 / recoStaGlbTrack->pt()) + (1 / recoCombinedGlbTrack->pt()));
889 oneOverptResolution[5]->Fill(recoCombinedGlbTrack->eta(),
890 (1 / recoTkGlbTrack->pt()) - (1 / recoStaGlbTrack->pt()));
891 oneOverptResolution[6]->Fill(recoCombinedGlbTrack->phi(),
892 (1 / recoTkGlbTrack->pt()) - (1 / recoCombinedGlbTrack->pt()));
893 oneOverptResolution[7]->Fill(recoCombinedGlbTrack->phi(),
894 -(1 / recoStaGlbTrack->pt()) + (1 / recoCombinedGlbTrack->pt()));
895 oneOverptResolution[8]->Fill(recoCombinedGlbTrack->phi(),
896 (1 / recoTkGlbTrack->pt()) - (1 / recoStaGlbTrack->pt()));
897 oneOverptResolution[9]->Fill(recoCombinedGlbTrack->pt(),
898 (1 / recoTkGlbTrack->pt()) - (1 / recoCombinedGlbTrack->pt()));
899 oneOverptResolution[10]->Fill(recoCombinedGlbTrack->pt(),
900 -(1 / recoStaGlbTrack->pt()) + (1 / recoCombinedGlbTrack->pt()));
901 oneOverptResolution[11]->Fill(recoCombinedGlbTrack->pt(),
902 (1 / recoTkGlbTrack->pt()) - (1 / recoStaGlbTrack->pt()));
906 double rhGlb = recoCombinedGlbTrack->found();
908 double rhGlb_StaProvenance = 0;
910 double rhGlb_TkProvenance = 0;
913 recHit != recoCombinedGlbTrack->recHitsEnd();
915 if ((*recHit)->isValid()) {
916 DetId id = (*recHit)->geographicalId();
918 rhGlb_StaProvenance++;
920 rhGlb_TkProvenance++;
924 double rhStaGlb = recoStaGlbTrack->recHitsSize();
926 double rhTkGlb = recoTkGlbTrack->found();
928 double rhTkGlb_notValid = recoTkGlbTrack->lost();
931 rhAnalysis[0]->Fill(rhGlb_StaProvenance / rhGlb);
932 rhAnalysis[1]->Fill(rhGlb_TkProvenance / rhGlb);
933 rhAnalysis[2]->Fill(rhGlb_StaProvenance / rhStaGlb);
934 rhAnalysis[3]->Fill(rhGlb_TkProvenance / rhTkGlb);
935 rhAnalysis[4]->Fill(rhGlb / (rhStaGlb + rhTkGlb));
936 rhAnalysis[5]->Fill(rhTkGlb_notValid / rhGlb);
939 if (recoCombinedGlbTrack->charge() > 0)
940 muVStkSytemRotation[0]->
Fill(recoCombinedGlbTrack->pt(), recoTkGlbTrack->pt() / recoCombinedGlbTrack->pt());
942 muVStkSytemRotation[1]->Fill(recoCombinedGlbTrack->pt(), recoTkGlbTrack->pt() / recoCombinedGlbTrack->pt());
945 if (
muon->isTrackerMuon() && !(
muon->isGlobalMuon())) {
946 LogTrace(
metname) <<
"[MuonRecoAnalyzer] The mu is tracker only - filling the histos";
947 if (
muon->isStandAloneMuon())
949 if (!(
muon->isStandAloneMuon()))
955 etaTrack->Fill(recoTrack->eta());
956 thetaTrack->Fill(recoTrack->theta());
957 phiTrack->Fill(recoTrack->phi());
958 chi2OvDFTrack->Fill(recoTrack->normalizedChi2());
959 probchi2Track->Fill(TMath::Prob(recoTrack->chi2(), recoTrack->ndof()));
960 pTrack->Fill(recoTrack->p());
961 ptTrack->Fill(recoTrack->pt());
962 qTrack->Fill(recoTrack->charge());
965 if (
muon->isStandAloneMuon() && !(
muon->isGlobalMuon())) {
966 LogTrace(
metname) <<
"[MuonRecoAnalyzer] The mu is STA only - filling the histos";
967 if (!(
muon->isTrackerMuon()))
973 etaStaTrack->Fill(recoStaTrack->eta());
974 thetaStaTrack->Fill(recoStaTrack->theta());
975 phiStaTrack->Fill(recoStaTrack->phi());
976 chi2OvDFStaTrack->Fill(recoStaTrack->normalizedChi2());
977 probchi2StaTrack->Fill(TMath::Prob(recoStaTrack->chi2(), recoStaTrack->ndof()));
978 pStaTrack->Fill(recoStaTrack->p());
979 ptStaTrack->Fill(recoStaTrack->pt());
980 qStaTrack->Fill(recoStaTrack->charge());
983 if (
muon->isCaloMuon() && !(
muon->isGlobalMuon()) && !(
muon->isTrackerMuon()) && !(
muon->isStandAloneMuon()))
991 if (
muon->isStandAloneMuon()) {
992 etaEfficiency[0]->Fill(recoStaGlbTrack->eta());
993 phiEfficiency[0]->Fill(recoStaGlbTrack->phi());
995 if (
muon->isStandAloneMuon() &&
muon->isGlobalMuon()) {
996 etaEfficiency[1]->Fill(recoStaGlbTrack->eta());
997 phiEfficiency[1]->Fill(recoStaGlbTrack->phi());
1004 double dphi = acos(
cos(track1.
phi() - track2.
phi()));
1005 double deta = track1.
eta() - track2.
eta();
1006 return sqrt(dphi * dphi + deta * deta);
1012 for (
unsigned int i = 0;
i < vc->size(); ++
i) {
1016 for (v1TrackIter = v1TrackBegin; v1TrackIter != v1TrackEnd; v1TrackIter++) {
1017 if (static_cast<unsigned int>(tidx) == v1TrackIter->key())
float chi2LocalPosition
chi2 value for the STA-TK matching of local position
T getUntrackedParameter(std::string const &, T const &) const
bool isNonnull() const
Checks for non-null.
__device__ WorkSpace float chi2Max
float chi2LocalMomentum
chi2 value for the STA-TK matching of local momentum
virtual void setCurrentFolder(std::string const &fullpath)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const std::string metname
float glbKink
value of the kink algorithm applied to the global track
float glbTrackProbability
the tail probability (-ln(P)) of the global fit
double phi() const
azimuthal angle of momentum vector
std::vector< Vertex > VertexCollection
collection of Vertex objects
float trkKink
value of the kink algorithm applied to the inner track stub
float trkRelChi2
chi2 value for the inner track stub with respect to the global track
int trackerLayersWithMeasurement() const
void analyze(const edm::Event &, const edm::EventSetup &) override
Inizialize parameters for histo binning.
int numberOfValidMuonCSCHits() const
int numberOfValidMuonRPCHits() const
double getDeltaR(reco::Track track1, reco::Track track2)
double eta() const
pseudorapidity of momentum vector
virtual void setXTitle(std::string const &title)
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Cos< T >::type cos(const T &t)
float globalDeltaEtaPhi
global delta-Eta-Phi of STA-TK matching
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
void GetRes(reco::TrackRef t1, reco::TrackRef t2, std::string par, float &res, float &pull)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Log< level::Info, false > LogInfo
float staRelChi2
chi2 value for the outer track stub with respect to the global track
int getPv(int tidx, const reco::VertexCollection *vc)
XYZPointD XYZPoint
point in space with cartesian internal representation
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
T getParameter(std::string const &) const
int numberOfValidTrackerHits() const
int numberOfValidMuonGEMHits() const
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
int numberOfValidMuonDTHits() const
int numberOfValidPixelHits() const
int numberOfValidMuonHits() const
~MuonRecoAnalyzer() override
Destructor.
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
int etaBin(const l1t::HGCalMulticluster *cl)
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
MuonRecoAnalyzer(const edm::ParameterSet &)
Constructor.
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)