CMS 3D CMS Logo

MuonRecoAnalyzer.cc
Go to the documentation of this file.
2 
10 
12 
13 #include <string>
14 #include "TMath.h"
15 using namespace std;
16 using namespace edm;
17 
19  parameters = pSet;
20 
21  // Input booleans
22  IsminiAOD = parameters.getParameter<bool>("IsminiAOD");
23  doMVA = parameters.getParameter<bool>("doMVA");
24  // the services:
25  theMuonCollectionLabel_ = consumes<edm::View<reco::Muon> >(parameters.getParameter<edm::InputTag>("MuonCollection"));
26  theVertexLabel_ = consumes<reco::VertexCollection>(pSet.getParameter<InputTag>("inputTagVertex"));
27  theBeamSpotLabel_ = consumes<reco::BeamSpot>(pSet.getParameter<InputTag>("inputTagBeamSpot"));
28  dcsStatusCollection_ =
29  consumes<DcsStatusCollection>(pSet.getUntrackedParameter<std::string>("dcsStatusCollection", "scalersRawToDigi"));
30 
31  ptBin = parameters.getParameter<int>("ptBin");
32  ptMin = parameters.getParameter<double>("ptMin");
33  ptMax = parameters.getParameter<double>("ptMax");
34  pResBin = parameters.getParameter<int>("pResBin");
35  pResMin = parameters.getParameter<double>("pResMin");
36  pResMax = parameters.getParameter<double>("pResMax");
37  rhBin = parameters.getParameter<int>("rhBin");
38  rhMin = parameters.getParameter<double>("rhMin");
39  rhMax = parameters.getParameter<double>("rhMax");
40  pBin = parameters.getParameter<int>("pBin");
41  pMin = parameters.getParameter<double>("pMin");
42  pMax = parameters.getParameter<double>("pMax");
43  chi2Bin = parameters.getParameter<int>("chi2Bin");
44  chi2Min = parameters.getParameter<double>("chi2Min");
45  chi2Max = parameters.getParameter<double>("chi2Max");
46  phiBin = parameters.getParameter<int>("phiBin");
47  phiMin = parameters.getParameter<double>("phiMin");
48  phiMax = parameters.getParameter<double>("phiMax");
49  tunePBin = parameters.getParameter<int>("tunePBin");
50  tunePMax = parameters.getParameter<double>("tunePMax");
51  tunePMin = parameters.getParameter<double>("tunePMin");
52  thetaBin = parameters.getParameter<int>("thetaBin");
53  thetaMin = parameters.getParameter<double>("thetaMin");
54  thetaMax = parameters.getParameter<double>("thetaMax");
55  etaBin = parameters.getParameter<int>("etaBin");
56  etaMin = parameters.getParameter<double>("etaMin");
57  etaMax = parameters.getParameter<double>("etaMax");
58 
59  theFolder = parameters.getParameter<string>("folder");
60 }
61 
64  edm::Run const& /*iRun*/,
65  edm::EventSetup const& /* iSetup */) {
66  ibooker.cd();
67  ibooker.setCurrentFolder(theFolder);
68 
69  muReco = ibooker.book1D("muReco", "muon reconstructed tracks", 6, 1, 7);
70  muReco->setBinLabel(1, "glb+tk+sta");
71  muReco->setBinLabel(2, "glb+sta");
72  muReco->setBinLabel(3, "tk+sta");
73  muReco->setBinLabel(4, "tk");
74  muReco->setBinLabel(5, "sta");
75  muReco->setBinLabel(6, "calo");
76 
77  int binFactor = 4;
78 
80  // monitoring of eta parameter
82  std::string histname = "GlbMuon_";
83  etaGlbTrack.push_back(ibooker.book1D(histname + "Glb_eta", "#eta_{GLB}", etaBin, etaMin, etaMax));
84  etaGlbTrack.push_back(ibooker.book1D(histname + "Tk_eta", "#eta_{TKfromGLB}", etaBin, etaMin, etaMax));
85  etaGlbTrack.push_back(ibooker.book1D(histname + "Sta_eta", "#eta_{STAfromGLB}", etaBin, etaMin, etaMax));
86  etaResolution.push_back(ibooker.book1D(
87  "Res_TkGlb_eta", "#eta_{TKfromGLB} - #eta_{GLB}", etaBin * binFactor, etaMin / 3000, etaMax / 3000));
88  etaResolution.push_back(ibooker.book1D(
89  "Res_GlbSta_eta", "#eta_{GLB} - #eta_{STAfromGLB}", etaBin * binFactor, etaMin / 100, etaMax / 100));
90  etaResolution.push_back(ibooker.book1D(
91  "Res_TkSta_eta", "#eta_{TKfromGLB} - #eta_{STAfromGLB}", etaBin * binFactor, etaMin / 100, etaMax / 100));
92  etaResolution.push_back(ibooker.book2D("ResVsEta_TkGlb_eta",
93  "(#eta_{TKfromGLB} - #eta_{GLB}) vs #eta_{GLB}",
94  etaBin,
95  etaMin,
96  etaMax,
97  etaBin * binFactor,
98  etaMin / 3000,
99  etaMax / 3000));
100  etaResolution.push_back(ibooker.book2D("ResVsEta_GlbSta_eta",
101  "(#eta_{GLB} - #eta_{STAfromGLB}) vs #eta_{GLB}",
102  etaBin,
103  etaMin,
104  etaMax,
105  etaBin * binFactor,
106  etaMin / 100,
107  etaMax / 100));
108  etaResolution.push_back(ibooker.book2D("ResVsEta_TkSta_eta",
109  "(#eta_{TKfromGLB} - #eta_{STAfromGLB}) vs #eta_{TKfromGLB}",
110  etaBin,
111  etaMin,
112  etaMax,
113  etaBin * binFactor,
114  etaMin / 100,
115  etaMax / 100));
116  etaPull = ibooker.book1D("Pull_TkSta_eta", "#eta_{TKfromGLB} - #eta_{GLB} / error", 100, -10, 10);
117  etaTrack = ibooker.book1D("TkMuon_eta", "#eta_{TK}", etaBin, etaMin, etaMax);
118  etaStaTrack = ibooker.book1D("StaMuon_eta", "#eta_{STA}", etaBin, etaMin, etaMax);
119  etaEfficiency.push_back(ibooker.book1D("StaEta", "#eta_{STAfromGLB}", etaBin, etaMin, etaMax));
120  etaEfficiency.push_back(
121  ibooker.book1D("StaEta_ifCombinedAlso", "#eta_{STAfromGLB} if isGlb=true", etaBin, etaMin, etaMax));
122 
124  // monitoring of theta parameter
126  thetaGlbTrack.push_back(ibooker.book1D(histname + "Glb_theta", "#theta_{GLB}", thetaBin, thetaMin, thetaMax));
127  thetaGlbTrack[0]->setAxisTitle("rad");
128  thetaGlbTrack.push_back(ibooker.book1D(histname + "Tk_theta", "#theta_{TKfromGLB}", thetaBin, thetaMin, thetaMax));
129  thetaGlbTrack[1]->setAxisTitle("rad");
130  thetaGlbTrack.push_back(ibooker.book1D(histname + "Sta_theta", "#theta_{STAfromGLB}", thetaBin, thetaMin, thetaMax));
131  thetaGlbTrack[2]->setAxisTitle("rad");
132  thetaResolution.push_back(ibooker.book1D("Res_TkGlb_theta",
133  "#theta_{TKfromGLB} - #theta_{GLB}",
134  thetaBin * binFactor,
135  -(thetaMax / 3000),
136  thetaMax / 3000));
137  thetaResolution[0]->setAxisTitle("rad");
138  thetaResolution.push_back(ibooker.book1D("Res_GlbSta_theta",
139  "#theta_{GLB} - #theta_{STAfromGLB}",
140  thetaBin * binFactor,
141  -(thetaMax / 100),
142  thetaMax / 100));
143  thetaResolution[1]->setAxisTitle("rad");
144  thetaResolution.push_back(ibooker.book1D("Res_TkSta_theta",
145  "#theta_{TKfromGLB} - #theta_{STAfromGLB}",
146  thetaBin * binFactor,
147  -(thetaMax / 100),
148  thetaMax / 100));
149  thetaResolution[2]->setAxisTitle("rad");
150  thetaResolution.push_back(ibooker.book2D("ResVsTheta_TkGlb_theta",
151  "(#theta_{TKfromGLB} - #theta_{GLB}) vs #theta_{GLB}",
152  thetaBin,
153  thetaMin,
154  thetaMax,
155  thetaBin * binFactor,
156  -(thetaMax / 3000),
157  thetaMax / 3000));
158  thetaResolution[3]->setAxisTitle("rad", 1);
159  thetaResolution[3]->setAxisTitle("rad", 2);
160  thetaResolution.push_back(ibooker.book2D("ResVsTheta_GlbSta_theta",
161  "(#theta_{GLB} - #theta_{STAfromGLB}) vs #theta_{GLB}",
162  thetaBin,
163  thetaMin,
164  thetaMax,
165  thetaBin * binFactor,
166  -(thetaMax / 100),
167  thetaMax / 100));
168  thetaResolution[4]->setAxisTitle("rad", 1);
169  thetaResolution[4]->setAxisTitle("rad", 2);
170  thetaResolution.push_back(ibooker.book2D("ResVsTheta_TkSta_theta",
171  "(#theta_{TKfromGLB} - #theta_{STAfromGLB}) vs #theta_{TKfromGLB}",
172  thetaBin,
173  thetaMin,
174  thetaMax,
175  thetaBin * binFactor,
176  -(thetaMax / 100),
177  thetaMax / 100));
178  thetaResolution[5]->setAxisTitle("rad", 1);
179  thetaResolution[5]->setAxisTitle("rad", 2);
180  thetaPull = ibooker.book1D("Pull_TkSta_theta", "#theta_{TKfromGLB} - #theta_{STAfromGLB} / error", 100, -10, 10);
181  thetaTrack = ibooker.book1D("TkMuon_theta", "#theta_{TK}", thetaBin, thetaMin, thetaMax);
182  thetaTrack->setAxisTitle("rad");
183  thetaStaTrack = ibooker.book1D("StaMuon_theta", "#theta_{STA}", thetaBin, thetaMin, thetaMax);
184  thetaStaTrack->setAxisTitle("rad");
185 
186  // monitoring tunePMuonBestTrack Pt
187  tunePResolution = ibooker.book1D(
188  "Res_TuneP_pt", "Pt_{MuonBestTrack}-Pt_{tunePMuonBestTrack}/Pt_{MuonBestTrack}", tunePBin, tunePMin, tunePMax);
189 
190  // monitoring of phi paramater
191  phiGlbTrack.push_back(ibooker.book1D(histname + "Glb_phi", "#phi_{GLB}", phiBin, phiMin, phiMax));
192  phiGlbTrack[0]->setAxisTitle("rad");
193  phiGlbTrack.push_back(ibooker.book1D(histname + "Tk_phi", "#phi_{TKfromGLB}", phiBin, phiMin, phiMax));
194  phiGlbTrack[1]->setAxisTitle("rad");
195  phiGlbTrack.push_back(ibooker.book1D(histname + "Sta_phi", "#phi_{STAfromGLB}", phiBin, phiMin, phiMax));
196  phiGlbTrack[2]->setAxisTitle("rad");
197  phiResolution.push_back(ibooker.book1D(
198  "Res_TkGlb_phi", "#phi_{TKfromGLB} - #phi_{GLB}", phiBin * binFactor, phiMin / 3000, phiMax / 3000));
199  phiResolution[0]->setAxisTitle("rad");
200  phiResolution.push_back(ibooker.book1D(
201  "Res_GlbSta_phi", "#phi_{GLB} - #phi_{STAfromGLB}", phiBin * binFactor, phiMin / 100, phiMax / 100));
202  phiResolution[1]->setAxisTitle("rad");
203  phiResolution.push_back(ibooker.book1D(
204  "Res_TkSta_phi", "#phi_{TKfromGLB} - #phi_{STAfromGLB}", phiBin * binFactor, phiMin / 100, phiMax / 100));
205  phiResolution[2]->setAxisTitle("rad");
206  phiResolution.push_back(ibooker.book2D("ResVsPhi_TkGlb_phi",
207  "(#phi_{TKfromGLB} - #phi_{GLB}) vs #phi_GLB",
208  phiBin,
209  phiMin,
210  phiMax,
211  phiBin * binFactor,
212  phiMin / 3000,
213  phiMax / 3000));
214  phiResolution[3]->setAxisTitle("rad", 1);
215  phiResolution[3]->setAxisTitle("rad", 2);
216  phiResolution.push_back(ibooker.book2D("ResVsPhi_GlbSta_phi",
217  "(#phi_{GLB} - #phi_{STAfromGLB}) vs #phi_{GLB}",
218  phiBin,
219  phiMin,
220  phiMax,
221  phiBin * binFactor,
222  phiMin / 100,
223  phiMax / 100));
224  phiResolution[4]->setAxisTitle("rad", 1);
225  phiResolution[4]->setAxisTitle("rad", 2);
226  phiResolution.push_back(ibooker.book2D("ResVsPhi_TkSta_phi",
227  "(#phi_{TKfromGLB} - #phi_{STAfromGLB}) vs #phi_{TKfromGLB}",
228  phiBin,
229  phiMin,
230  phiMax,
231  phiBin * binFactor,
232  phiMin / 100,
233  phiMax / 100));
234  phiResolution[5]->setAxisTitle("rad", 1);
235  phiResolution[5]->setAxisTitle("rad", 2);
236  phiPull = ibooker.book1D("Pull_TkSta_phi", "#phi_{TKfromGLB} - #phi_{STAfromGLB} / error", 100, -10, 10);
237  phiTrack = ibooker.book1D("TkMuon_phi", "#phi_{TK}", phiBin, phiMin, phiMax);
238  phiTrack->setAxisTitle("rad");
239  phiStaTrack = ibooker.book1D("StaMuon_phi", "#phi_{STA}", phiBin, phiMin, phiMax);
240  phiStaTrack->setAxisTitle("rad");
241  phiEfficiency.push_back(ibooker.book1D("StaPhi", "#phi_{STAfromGLB}", phiBin, phiMin, phiMax));
242  phiEfficiency[0]->setAxisTitle("rad");
243  phiEfficiency.push_back(
244  ibooker.book1D("StaPhi_ifCombinedAlso", "#phi_{STAfromGLB} if the isGlb=true", phiBin, phiMin, phiMax));
245  phiEfficiency[1]->setAxisTitle("rad");
246 
247  // monitoring of the chi2 parameter
248  chi2OvDFGlbTrack.push_back(
249  ibooker.book1D(histname + "Glb_chi2OverDf", "#chi_{2}OverDF_{GLB}", chi2Bin, chi2Min, chi2Max));
250  chi2OvDFGlbTrack.push_back(
251  ibooker.book1D(histname + "Tk_chi2OverDf", "#chi_{2}OverDF_{TKfromGLB}", phiBin, chi2Min, chi2Max));
252  chi2OvDFGlbTrack.push_back(
253  ibooker.book1D(histname + "Sta_chi2OverDf", "#chi_{2}OverDF_{STAfromGLB}", chi2Bin, chi2Min, chi2Max));
254  chi2OvDFTrack = ibooker.book1D("TkMuon_chi2OverDf", "#chi_{2}OverDF_{TK}", chi2Bin, chi2Min, chi2Max);
255  chi2OvDFStaTrack = ibooker.book1D("StaMuon_chi2OverDf", "#chi_{2}OverDF_{STA}", chi2Bin, chi2Min, chi2Max);
256  //--------------------------
257  probchi2GlbTrack.push_back(ibooker.book1D(histname + "Glb_probchi", "Prob #chi_{GLB}", 120, chi2Min, 1.20));
258  probchi2GlbTrack.push_back(ibooker.book1D(histname + "Tk_probchi", "Prob #chi_{TKfromGLB}", 120, chi2Min, 1.20));
259  probchi2GlbTrack.push_back(ibooker.book1D(histname + "Sta_probchi", "Prob #chi_{STAfromGLB}", 120, chi2Min, 1.20));
260  probchi2Track = ibooker.book1D("TkMuon_probchi", "Prob #chi_{TK}", 120, chi2Min, 1.20);
261  probchi2StaTrack = ibooker.book1D("StaMuon_probchi", "Prob #chi_{STA}", 120, chi2Min, 1.20);
262 
263  // monitoring of the momentum
264  pGlbTrack.push_back(ibooker.book1D(histname + "Glb_p", "p_{GLB}", pBin, pMin, pMax));
265  pGlbTrack[0]->setAxisTitle("GeV");
266  pGlbTrack.push_back(ibooker.book1D(histname + "Tk_p", "p_{TKfromGLB}", pBin, pMin, pMax));
267  pGlbTrack[1]->setAxisTitle("GeV");
268  pGlbTrack.push_back(ibooker.book1D(histname + "Sta_p", "p_{STAfromGLB}", pBin, pMin, pMax));
269  pGlbTrack[2]->setAxisTitle("GeV");
270  pTrack = ibooker.book1D("TkMuon_p", "p_{TK}", pBin, pMin, pMax);
271  pTrack->setAxisTitle("GeV");
272  pStaTrack = ibooker.book1D("StaMuon_p", "p_{STA}", pBin, pMin, pMax);
273  pStaTrack->setAxisTitle("GeV");
274 
275  // monitoring of the transverse momentum
276  ptGlbTrack.push_back(ibooker.book1D(histname + "Glb_pt", "pt_{GLB}", ptBin, ptMin, ptMax));
277  ptGlbTrack[0]->setAxisTitle("GeV");
278  ptGlbTrack.push_back(ibooker.book1D(histname + "Tk_pt", "pt_{TKfromGLB}", ptBin, ptMin, ptMax));
279  ptGlbTrack[1]->setAxisTitle("GeV");
280  ptGlbTrack.push_back(ibooker.book1D(histname + "Sta_pt", "pt_{STAfromGLB}", ptBin, ptMin, ptMax));
281  ptGlbTrack[2]->setAxisTitle("GeV");
282  ptTrack = ibooker.book1D("TkMuon_pt", "pt_{TK}", ptBin, ptMin, ptMax);
283  ptTrack->setAxisTitle("GeV");
284  ptStaTrack = ibooker.book1D("StaMuon_pt", "pt_{STA}", ptBin, ptMin, pMax);
285  ptStaTrack->setAxisTitle("GeV");
286 
287  //monitoring of variables needed by the MVA soft muon
288 
289  ptSoftMuonMVA = ibooker.book1D("ptSoftMuonMVA", "pt_{SoftMuon}", 50, 0, 50);
290  deltaRSoftMuonMVA = ibooker.book1D("deltaRSoftMuonMVA", "#Delta R", 50, 0, 5);
291  gNchi2SoftMuonMVA = ibooker.book1D("gNchi2SoftMuonMVA", "gNchi2", 50, 0, 3);
292  vMuHitsSoftMuonMVA = ibooker.book1D("vMuHitsSoftMuonMVA", "vMuHits", 50, 0, 50);
293  mNuStationsSoftMuonMVA = ibooker.book1D("mNuStationsSoftMuonMVA", "mNuStations", 6, 0, 6);
294  dxyRefSoftMuonMVA = ibooker.book1D("dxyRefSoftMuonMVA", "dxyRef", 50, -0.1, 0.1);
295  dzRefSoftMuonMVA = ibooker.book1D("dzRefSoftMuonMVA", "dzRef", 50, -0.1, 0.1);
296  LWHSoftMuonMVA = ibooker.book1D("LWHSoftMuonMVA", "LWH", 20, 0, 20);
297  valPixHitsSoftMuonMVA = ibooker.book1D("valPixHitsSoftMuonMVA", "valPixHits", 8, 0, 8);
298  innerChi2SoftMuonMVA = ibooker.book1D("innerChi2SoftMuonMVA", "innerChi2", 50, 0, 3);
299  outerChi2SoftMuonMVA = ibooker.book1D("outerChi2SoftMuonMVA", "outerChi2", 50, 0, 4);
300  iValFracSoftMuonMVA = ibooker.book1D("iValFracSoftMuonMVA", "iValFrac", 50, 0.5, 1.0);
301  segCompSoftMuonMVA = ibooker.book1D("segCompSoftMuonMVA", "segComp", 50, 0, 1.2);
302  chi2LocMomSoftMuonMVA = ibooker.book1D("chi2LocMomSoftMuonMVA", "chi2LocMom", 50, 0, 40);
303  chi2LocPosSoftMuonMVA = ibooker.book1D("chi2LocPosSoftMuonMVA", "chi2LocPos", 0, 0, 8);
304  glbTrackTailProbSoftMuonMVA = ibooker.book1D("glbTrackTailProbSoftMuonMVA", "glbTrackTailProb", 50, 0, 8);
305  NTrkVHitsSoftMuonMVA = ibooker.book1D("NTrkVHitsSoftMuonMVA", "NTrkVHits", 50, 0, 35);
306  kinkFinderSoftMuonMVA = ibooker.book1D("kinkFinderSoftMuonMVA", "kinkFinder", 50, 0, 30);
307  vRPChitsSoftMuonMVA = ibooker.book1D("vRPChitsSoftMuonMVA", "vRPChits", 50, 0, 50);
308  glbKinkFinderSoftMuonMVA = ibooker.book1D("glbKinkFinderSoftMuonMVA", "glbKinkFinder", 50, 0, 50);
309  glbKinkFinderLogSoftMuonMVA = ibooker.book1D("glbKinkFinderLogSoftMuonMVA", "glbKinkFinderLog", 50, 0, 50);
310  staRelChi2SoftMuonMVA = ibooker.book1D("staRelChi2SoftMuonMVA", "staRelChi2", 50, 0, 2);
311  glbDeltaEtaPhiSoftMuonMVA = ibooker.book1D("glbDeltaEtaPhiSoftMuonMVA", "glbDeltaEtaPhi", 50, 0, 0.15);
312  trkRelChi2SoftMuonMVA = ibooker.book1D("trkRelChi2SoftMuonMVA", "trkRelChi2", 50, 0, 1.2);
313  vDThitsSoftMuonMVA = ibooker.book1D("vDThitsSoftMuonMVA", "vDThits", 50, 0, 50);
314  vCSChitsSoftMuonMVA = ibooker.book1D("vCSChitsSoftMuonMVA", "vCSChits", 50, 0, 50);
315  timeAtIpInOutSoftMuonMVA = ibooker.book1D("timeAtIpInOutSoftMuonMVA", "timeAtIpInOut", 50, -10.0, 10.0);
316  timeAtIpInOutErrSoftMuonMVA = ibooker.book1D("timeAtIpInOutErrSoftMuonMVA", "timeAtIpInOutErr", 50, 0, 3.5);
317  getMuonHitsPerStationSoftMuonMVA =
318  ibooker.book1D("getMuonHitsPerStationSoftMuonMVA", "getMuonHitsPerStation", 6, 0, 6);
319  QprodSoftMuonMVA = ibooker.book1D("QprodSoftMuonMVA", "Qprod", 4, -2, 2);
320 
321  // monitoring of the muon charge
322  qGlbTrack.push_back(ibooker.book1D(histname + "Glb_q", "q_{GLB}", 5, -2.5, 2.5));
323  qGlbTrack.push_back(ibooker.book1D(histname + "Tk_q", "q_{TKfromGLB}", 5, -2.5, 2.5));
324  qGlbTrack.push_back(ibooker.book1D(histname + "Sta_q", "q_{STAformGLB}", 5, -2.5, 2.5));
325  qGlbTrack.push_back(ibooker.book1D(
326  histname + "qComparison", "comparison between q_{GLB} and q_{TKfromGLB}, q_{STAfromGLB}", 8, 0.5, 8.5));
327  qGlbTrack[3]->setBinLabel(1, "qGlb=qSta");
328  qGlbTrack[3]->setBinLabel(2, "qGlb!=qSta");
329  qGlbTrack[3]->setBinLabel(3, "qGlb=qTk");
330  qGlbTrack[3]->setBinLabel(4, "qGlb!=qTk");
331  qGlbTrack[3]->setBinLabel(5, "qSta=qTk");
332  qGlbTrack[3]->setBinLabel(6, "qSta!=qTk");
333  qGlbTrack[3]->setBinLabel(7, "qGlb!=qSta,qGlb!=Tk");
334  qGlbTrack[3]->setBinLabel(8, "qGlb=qSta,qGlb=Tk");
335  qTrack = ibooker.book1D("TkMuon_q", "q_{TK}", 5, -2.5, 2.5);
336  qStaTrack = ibooker.book1D("StaMuon_q", "q_{STA}", 5, -2.5, 2.5);
337 
339  // monitoring of the momentum resolution
340  qOverpResolution.push_back(ibooker.book1D(
341  "Res_TkGlb_qOverp", "(q/p)_{TKfromGLB} - (q/p)_{GLB}", pResBin * binFactor * 2, pResMin / 10, pResMax / 10));
342  qOverpResolution[0]->setAxisTitle("GeV^{-1}");
343  qOverpResolution.push_back(
344  ibooker.book1D("Res_GlbSta_qOverp", "(q/p)_{GLB} - (q/p)_{STAfromGLB}", pResBin * binFactor, pResMin, pResMax));
345  qOverpResolution[1]->setAxisTitle("GeV^{-1}");
346  qOverpResolution.push_back(ibooker.book1D(
347  "Res_TkSta_qOverp", "(q/p)_{TKfromGLB} - (q/p)_{STAfromGLB}", pResBin * binFactor, pResMin, pResMax));
348  qOverpResolution[2]->setAxisTitle("GeV^{-1}");
349  qOverpPull = ibooker.book1D("Pull_TkSta_qOverp", "(q/p)_{TKfromGLB} - (q/p)_{STAfromGLB} / error", 100, -10, 10);
350 
351  oneOverpResolution.push_back(ibooker.book1D(
352  "Res_TkGlb_oneOverp", "(1/p)_{TKfromGLB} - (1/p)_{GLB}", pResBin * binFactor * 2, pResMin / 10, pResMax / 10));
353  oneOverpResolution[0]->setAxisTitle("GeV^{-1}");
354  oneOverpResolution.push_back(
355  ibooker.book1D("Res_GlbSta_oneOverp", "(1/p)_{GLB} - (1/p)_{STAfromGLB}", pResBin * binFactor, pResMin, pResMax));
356  oneOverpResolution[1]->setAxisTitle("GeV^{-1}");
357  oneOverpResolution.push_back(ibooker.book1D(
358  "Res_TkSta_oneOverp", "(q/p)_{TKfromGLB} - (q/p)_{STAfromGLB}", pResBin * binFactor, pResMin, pResMax));
359  oneOverpResolution[2]->setAxisTitle("GeV^{-1}");
360  oneOverpPull = ibooker.book1D("Pull_TkSta_oneOverp", "(1/p)_{TKfromGLB} - (1/p)_{STAfromGLB} / error", 100, -10, 10);
361 
362  qOverptResolution.push_back(ibooker.book1D("Res_TkGlb_qOverpt",
363  "(q/p_{t})_{TKfromGLB} - (q/p_{t})_{GLB}",
364  pResBin * binFactor * 2,
365  pResMin / 10,
366  pResMax / 10));
367  qOverptResolution[0]->setAxisTitle("GeV^{-1}");
368  qOverptResolution.push_back(ibooker.book1D(
369  "Res_GlbSta_qOverpt", "(q/p_{t})_{GLB} - (q/p_{t})_{STAfromGLB}", pResBin * binFactor, pResMin, pResMax));
370  qOverptResolution[1]->setAxisTitle("GeV^{-1}");
371  qOverptResolution.push_back(ibooker.book1D(
372  "Res_TkSta_qOverpt", "(q/p_{t})_{TKfromGLB} - (q/p_{t})_{STAfromGLB}", pResBin * binFactor, pResMin, pResMax));
373  qOverptResolution[2]->setAxisTitle("GeV^{-1}");
374  qOverptPull = ibooker.book1D("Pull_TkSta_qOverpt", "(q/pt)_{TKfromGLB} - (q/pt)_{STAfromGLB} / error", 100, -10, 10);
375 
376  oneOverptResolution.push_back(ibooker.book1D("Res_TkGlb_oneOverpt",
377  "(1/p_{t})_{TKfromGLB} - (1/p_{t})_{GLB}",
378  pResBin * binFactor * 2,
379  pResMin / 10,
380  pResMax / 10));
381  oneOverptResolution[0]->setAxisTitle("GeV^{-1}");
382  oneOverptResolution.push_back(ibooker.book1D(
383  "Res_GlbSta_oneOverpt", "(1/p_{t})_{GLB} - (1/p_{t})_{STAfromGLB}", pResBin * binFactor, pResMin, pResMax));
384  oneOverptResolution[1]->setAxisTitle("GeV^{-1}");
385  oneOverptResolution.push_back(ibooker.book1D(
386  "Res_TkSta_oneOverpt", "(1/p_{t})_{TKfromGLB} - (1/p_{t})_{STAfromGLB}", pResBin * binFactor, pResMin, pResMax));
387  oneOverptResolution[2]->setAxisTitle("GeV^{-1}");
388  oneOverptResolution.push_back(ibooker.book2D("ResVsEta_TkGlb_oneOverpt",
389  "(#eta_{TKfromGLB} - #eta_{GLB}) vs (1/p_{t})_{GLB}",
390  etaBin,
391  etaMin,
392  etaMax,
393  pResBin * binFactor * 2,
394  pResMin / 10,
395  pResMax / 10));
396  oneOverptResolution[3]->setAxisTitle("GeV^{-1}", 2);
397  oneOverptResolution.push_back(ibooker.book2D("ResVsEta_GlbSta_oneOverpt",
398  "(#eta_{GLB} - #eta_{STAfromGLB} vs (1/p_{t})_{GLB}",
399  etaBin,
400  etaMin,
401  etaMax,
402  pResBin * binFactor,
403  pResMin,
404  pResMax));
405  oneOverptResolution[4]->setAxisTitle("GeV^{-1}", 2);
406  oneOverptResolution.push_back(ibooker.book2D("ResVsEta_TkSta_oneOverpt",
407  "(#eta_{TKfromGLB} - #eta_{STAfromGLB}) vs (1/p_{t})_{TKfromGLB}",
408  etaBin,
409  etaMin,
410  etaMax,
411  pResBin * binFactor,
412  pResMin,
413  pResMax));
414  oneOverptResolution[5]->setAxisTitle("GeV^{-1}", 2);
415  oneOverptResolution.push_back(ibooker.book2D("ResVsPhi_TkGlb_oneOverpt",
416  "(#phi_{TKfromGLB} - #phi_{GLB}) vs (1/p_{t})_{GLB}",
417  phiBin,
418  phiMin,
419  phiMax,
420  pResBin * binFactor * 2,
421  pResMin / 10,
422  pResMax / 10));
423  oneOverptResolution[6]->setAxisTitle("rad", 1);
424  oneOverptResolution[6]->setAxisTitle("GeV^{-1}", 2);
425  oneOverptResolution.push_back(ibooker.book2D("ResVsPhi_GlbSta_oneOverpt",
426  "(#phi_{GLB} - #phi_{STAfromGLB} vs (1/p_{t})_{GLB}",
427  phiBin,
428  phiMin,
429  phiMax,
430  pResBin * binFactor,
431  pResMin,
432  pResMax));
433  oneOverptResolution[7]->setAxisTitle("rad", 1);
434  oneOverptResolution[7]->setAxisTitle("GeV^{-1}", 2);
435  oneOverptResolution.push_back(ibooker.book2D("ResVsPhi_TkSta_oneOverpt",
436  "(#phi_{TKfromGLB} - #phi_{STAfromGLB}) vs (1/p_{t})_{TKfromGLB}",
437  phiBin,
438  phiMin,
439  phiMax,
440  pResBin * binFactor,
441  pResMin,
442  pResMax));
443  oneOverptResolution[8]->setAxisTitle("rad", 1);
444  oneOverptResolution[8]->setAxisTitle("GeV^{-1}", 2);
445  oneOverptResolution.push_back(ibooker.book2D("ResVsPt_TkGlb_oneOverpt",
446  "((1/p_{t})_{TKfromGLB} - (1/p_{t})_{GLB}) vs (1/p_{t})_{GLB}",
447  ptBin / 5,
448  ptMin,
449  ptMax / 100,
450  pResBin * binFactor * 2,
451  pResMin / 10,
452  pResMax / 10));
453  oneOverptResolution[9]->setAxisTitle("GeV^{-1}", 1);
454  oneOverptResolution[9]->setAxisTitle("GeV^{-1}", 2);
455  oneOverptResolution.push_back(ibooker.book2D("ResVsPt_GlbSta_oneOverpt",
456  "((1/p_{t})_{GLB} - (1/p_{t})_{STAfromGLB} vs (1/p_{t})_{GLB}",
457  ptBin / 5,
458  ptMin,
459  ptMax / 100,
460  pResBin * binFactor,
461  pResMin,
462  pResMax));
463  oneOverptResolution[10]->setAxisTitle("GeV^{-1}", 1);
464  oneOverptResolution[10]->setAxisTitle("GeV^{-1}", 2);
465  oneOverptResolution.push_back(
466  ibooker.book2D("ResVsPt_TkSta_oneOverpt",
467  "((1/p_{t})_{TKfromGLB} - (1/p_{t})_{STAfromGLB}) vs (1/p_{t})_{TKfromGLB}",
468  ptBin / 5,
469  ptMin,
470  ptMax / 100,
471  pResBin * binFactor,
472  pResMin,
473  pResMax));
474  oneOverptResolution[11]->setAxisTitle("GeV^{-1}", 1);
475  oneOverptResolution[11]->setAxisTitle("GeV^{-1}", 2);
476  oneOverptPull =
477  ibooker.book1D("Pull_TkSta_oneOverpt", "(1/pt)_{TKfromGLB} - (1/pt)_{STAfromGLB} / error", 100, -10, 10);
478 
480  // monitoring of the phi-eta
481  phiVsetaGlbTrack.push_back(ibooker.book2D(
482  histname + "Glb_phiVSeta", "#phi vs #eta (GLB)", etaBin / 2, etaMin, etaMax, phiBin / 2, phiMin, phiMax));
483  phiVsetaGlbTrack.push_back(ibooker.book2D(
484  histname + "Tk_phiVSeta", "#phi vs #eta (TKfromGLB)", etaBin / 2, etaMin, etaMax, phiBin / 2, phiMin, phiMax));
485  phiVsetaGlbTrack.push_back(ibooker.book2D(
486  histname + "Sta_phiVseta", "#phi vs #eta (STAfromGLB)", etaBin / 2, etaMin, etaMax, phiBin / 2, phiMin, phiMax));
487 
488  phiVsetaGlbTrack_badlumi.push_back(ibooker.book2D(
489  histname + "Glb_phiVSeta_badlumi", "#phi vs #eta (GLB)", etaBin / 2, etaMin, etaMax, phiBin / 2, phiMin, phiMax));
490  phiVsetaGlbTrack_badlumi.push_back(ibooker.book2D(histname + "Tk_phiVSeta_badlumi",
491  "#phi vs #eta (TKfromGLB)",
492  etaBin / 2,
493  etaMin,
494  etaMax,
495  phiBin / 2,
496  phiMin,
497  phiMax));
498  phiVsetaGlbTrack_badlumi.push_back(ibooker.book2D(histname + "Sta_phiVseta_badlumi",
499  "#phi vs #eta (STAfromGLB)",
500  etaBin / 2,
501  etaMin,
502  etaMax,
503  phiBin / 2,
504  phiMin,
505  phiMax));
506 
508  // monitoring of the recHits provenance
509  rhAnalysis.push_back(ibooker.book1D("StaRh_Frac_inGlb", "recHits_{STAinGLB} / recHits_{GLB}", rhBin, rhMin, rhMax));
510  rhAnalysis.push_back(ibooker.book1D("TkRh_Frac_inGlb", "recHits_{TKinGLB} / recHits_{GLB}", rhBin, rhMin, rhMax));
511  rhAnalysis.push_back(
512  ibooker.book1D("StaRh_inGlb_Div_RhAssoSta", "recHits_{STAinGLB} / recHits_{STAfromGLB}", rhBin, rhMin, rhMax));
513  rhAnalysis.push_back(
514  ibooker.book1D("TkRh_inGlb_Div_RhAssoTk", "recHits_{TKinGLB} / recHits_{TKfromGLB}", rhBin, rhMin, rhMax));
515  rhAnalysis.push_back(ibooker.book1D(
516  "GlbRh_Div_RhAssoStaTk", "recHits_{GLB} / (recHits_{TKfromGLB}+recHits_{STAfromGLB})", rhBin, rhMin, rhMax));
517  rhAnalysis.push_back(ibooker.book1D("invalidRh_Frac_inTk", "Invalid recHits / rechits_{GLB}", rhBin, rhMin, rhMax));
518 
520  // monitoring of the muon system rotation w.r.t. tracker
521  muVStkSytemRotation.push_back(ibooker.book2D(
522  "muVStkSytemRotation_posMu", "pT_{TK} / pT_{GLB} vs pT_{GLB} for #mu^{+}", 50, 0, 200, 100, 0.8, 1.2));
523  muVStkSytemRotation.push_back(ibooker.book2D(
524  "muVStkSytemRotation_negMu", "pT_{TK} / pT_{GLB} vs pT_{GLB} for #mu^{-}", 50, 0, 200, 100, 0.8, 1.2));
525 }
526 
527 void MuonRecoAnalyzer::GetRes(reco::TrackRef t1, reco::TrackRef t2, string par, float& res, float& pull) {
528  float p1 = 0, p2 = 0, p1e = 1, p2e = 1;
529 
530  if (par == "eta") {
531  p1 = t1->eta();
532  p1e = t1->etaError();
533  p2 = t2->eta();
534  p2e = t2->etaError();
535  } else if (par == "theta") {
536  p1 = t1->theta();
537  p1e = t1->thetaError();
538  p2 = t2->theta();
539  p2e = t2->thetaError();
540  } else if (par == "phi") {
541  p1 = t1->phi();
542  p1e = t1->phiError();
543  p2 = t2->phi();
544  p2e = t2->phiError();
545  } else if (par == "qOverp") {
546  p1 = t1->charge() / t1->p();
547  p1e = t1->qoverpError();
548  p2 = t2->charge() / t2->p();
549  p2e = t2->qoverpError();
550  } else if (par == "oneOverp") {
551  p1 = 1. / t1->p();
552  p1e = t1->qoverpError();
553  p2 = 1. / t2->p();
554  p2e = t2->qoverpError();
555  } else if (par == "qOverpt") {
556  p1 = t1->charge() / t1->pt();
557  p1e = t1->ptError() * p1 * p1;
558  p2 = t2->charge() / t2->pt();
559  p2e = t2->ptError() * p2 * p2;
560  } else if (par == "oneOverpt") {
561  p1 = 1. / t1->pt();
562  p1e = t1->ptError() * p1 * p1;
563  p2 = 1. / t2->pt();
564  p2e = t2->ptError() * p2 * p2;
565  }
566 
567  res = p1 - p2;
568  if (p1e != 0 || p2e != 0)
569  pull = res / sqrt(p1e * p1e + p2e * p2e);
570  else
571  pull = -99;
572  return;
573 }
574 
576  LogTrace(metname) << "[MuonRecoAnalyzer] Analyze the mu";
577 
578  // Take the muon container
580  iEvent.getByToken(theMuonCollectionLabel_, muons);
581 
584  if (doMVA) {
585  iEvent.getByToken(theBeamSpotLabel_, beamSpot);
586  if (!beamSpot.isValid()) {
587  edm::LogInfo("MuonRecoAnalyzer") << "Error: Can't get the beamspot" << endl;
588  doMVA = false;
589  }
590  iEvent.getByToken(theVertexLabel_, vertex);
591  if (!vertex.isValid()) {
592  edm::LogInfo("MuonRecoAnalyzer") << "Error: Can't get the vertex collection" << endl;
593  doMVA = false;
594  }
595  }
596 
597  //In this part we determine if we want to fill the plots for events where the DCS flag was set to bad
599  bool fillBadLumi = false;
600  if (iEvent.getByToken(dcsStatusCollection_, dcsStatus) && dcsStatus.isValid()) {
601  for (auto const& dcsStatusItr : *dcsStatus) {
602  if (!dcsStatusItr.ready(DcsStatus::CSCp))
603  fillBadLumi = true;
604  if (!dcsStatusItr.ready(DcsStatus::CSCm))
605  fillBadLumi = true;
606  if (!dcsStatusItr.ready(DcsStatus::DT0))
607  fillBadLumi = true;
608  if (!dcsStatusItr.ready(DcsStatus::DTp))
609  fillBadLumi = true;
610  if (!dcsStatusItr.ready(DcsStatus::DTm))
611  fillBadLumi = true;
612  if (!dcsStatusItr.ready(DcsStatus::EBp))
613  fillBadLumi = true;
614  if (!dcsStatusItr.ready(DcsStatus::EBm))
615  fillBadLumi = true;
616  if (!dcsStatusItr.ready(DcsStatus::EEp))
617  fillBadLumi = true;
618  if (!dcsStatusItr.ready(DcsStatus::EEm))
619  fillBadLumi = true;
620  if (!dcsStatusItr.ready(DcsStatus::ESp))
621  fillBadLumi = true;
622  if (!dcsStatusItr.ready(DcsStatus::ESm))
623  fillBadLumi = true;
624  if (!dcsStatusItr.ready(DcsStatus::HBHEa))
625  fillBadLumi = true;
626  if (!dcsStatusItr.ready(DcsStatus::HBHEb))
627  fillBadLumi = true;
628  if (!dcsStatusItr.ready(DcsStatus::HBHEc))
629  fillBadLumi = true;
630  if (!dcsStatusItr.ready(DcsStatus::HF))
631  fillBadLumi = true;
632  if (!dcsStatusItr.ready(DcsStatus::HO))
633  fillBadLumi = true;
634  if (!dcsStatusItr.ready(DcsStatus::BPIX))
635  fillBadLumi = true;
636  if (!dcsStatusItr.ready(DcsStatus::FPIX))
637  fillBadLumi = true;
638  if (!dcsStatusItr.ready(DcsStatus::RPC))
639  fillBadLumi = true;
640  if (!dcsStatusItr.ready(DcsStatus::TIBTID))
641  fillBadLumi = true;
642  if (!dcsStatusItr.ready(DcsStatus::TOB))
643  fillBadLumi = true;
644  if (!dcsStatusItr.ready(DcsStatus::TECp))
645  fillBadLumi = true;
646  if (!dcsStatusItr.ready(DcsStatus::TECm))
647  fillBadLumi = true;
648  //if (!dcsStatusItr.ready(DcsStatus::CASTOR)) fillBadLumi = true;
649  }
650  }
651 
652  float res = 0, pull = 0;
653  if (!muons.isValid())
654  return;
655 
656  for (edm::View<reco::Muon>::const_iterator muon = muons->begin(); muon != muons->end(); ++muon) {
657  //Needed for MVA soft muon
658 
659  reco::TrackRef gTrack = muon->globalTrack();
660  reco::TrackRef iTrack = muon->innerTrack();
661  reco::TrackRef oTrack = muon->outerTrack();
662  if (iTrack.isNonnull() && oTrack.isNonnull() && gTrack.isNonnull()) {
663  const reco::HitPattern gHits = gTrack->hitPattern();
664  const reco::HitPattern iHits = iTrack->hitPattern();
665  const reco::MuonQuality muonQuality = muon->combinedQuality();
666  int pvIndex = 0;
667  math::XYZPoint refPoint;
668  if (doMVA) {
669  pvIndex = getPv(iTrack.index(), &(*vertex)); //HFDumpUtitilies
670  if (pvIndex > -1) {
671  refPoint = vertex->at(pvIndex).position();
672  } else {
673  if (beamSpot.isValid()) {
674  refPoint = beamSpot->position();
675  } else {
676  edm::LogInfo("MuonRecoAnalyzer") << "ERROR: No beam sport found!" << endl;
677  }
678  }
679  }
680  ptSoftMuonMVA->Fill(iTrack->eta());
681  deltaRSoftMuonMVA->Fill(getDeltaR(*iTrack, *oTrack));
682  gNchi2SoftMuonMVA->Fill(gTrack->normalizedChi2());
683  vMuHitsSoftMuonMVA->Fill(gHits.numberOfValidMuonHits());
684  mNuStationsSoftMuonMVA->Fill(muon->numberOfMatchedStations());
685  if (doMVA) {
686  dxyRefSoftMuonMVA->Fill(iTrack->dxy(refPoint));
687  dzRefSoftMuonMVA->Fill(iTrack->dz(refPoint));
688  }
689  LWHSoftMuonMVA->Fill(iHits.trackerLayersWithMeasurement());
690  valPixHitsSoftMuonMVA->Fill(iHits.numberOfValidPixelHits());
691  innerChi2SoftMuonMVA->Fill(iTrack->normalizedChi2());
692  outerChi2SoftMuonMVA->Fill(oTrack->normalizedChi2());
693  iValFracSoftMuonMVA->Fill(iTrack->validFraction());
694  //segCompSoftMuonMVA->Fill(reco::Muon::segmentCompatibility(*muon));
695  chi2LocMomSoftMuonMVA->Fill(muonQuality.chi2LocalMomentum);
696  chi2LocPosSoftMuonMVA->Fill(muonQuality.chi2LocalPosition);
697  glbTrackTailProbSoftMuonMVA->Fill(muonQuality.glbTrackProbability);
698  NTrkVHitsSoftMuonMVA->Fill(iHits.numberOfValidTrackerHits());
699  kinkFinderSoftMuonMVA->Fill(muonQuality.trkKink);
700  vRPChitsSoftMuonMVA->Fill(gHits.numberOfValidMuonRPCHits());
701  glbKinkFinderSoftMuonMVA->Fill(muonQuality.glbKink);
702  glbKinkFinderLogSoftMuonMVA->Fill(TMath::Log(2 + muonQuality.glbKink));
703  staRelChi2SoftMuonMVA->Fill(muonQuality.staRelChi2);
704  glbDeltaEtaPhiSoftMuonMVA->Fill(muonQuality.globalDeltaEtaPhi);
705  trkRelChi2SoftMuonMVA->Fill(muonQuality.trkRelChi2);
706  vDThitsSoftMuonMVA->Fill(gHits.numberOfValidMuonDTHits());
707  vCSChitsSoftMuonMVA->Fill(gHits.numberOfValidMuonCSCHits());
708  timeAtIpInOutSoftMuonMVA->Fill(muon->time().timeAtIpInOut);
709  timeAtIpInOutErrSoftMuonMVA->Fill(muon->time().timeAtIpInOutErr);
710  //getMuonHitsPerStationSoftMuonMVA->Fill(gTrack);
711  QprodSoftMuonMVA->Fill((iTrack->charge() * oTrack->charge()));
712  }
713 
714  if (muon->isGlobalMuon()) {
715  LogTrace(metname) << "[MuonRecoAnalyzer] The mu is global - filling the histos";
716  if (muon->isTrackerMuon() && muon->isStandAloneMuon())
717  muReco->Fill(1);
718  if (!(muon->isTrackerMuon()) && muon->isStandAloneMuon())
719  muReco->Fill(2);
720  if (!muon->isStandAloneMuon())
721  LogTrace(metname) << "[MuonRecoAnalyzer] ERROR: the mu is global but not standalone!";
722  // get the track combinig the information from both the Tracker and the Spectrometer
723  reco::TrackRef recoCombinedGlbTrack = muon->combinedMuon();
724 
725  // get the track using only the tracker data
726  reco::TrackRef recoTkGlbTrack = muon->track();
727  // get the track using only the mu spectrometer data
728  reco::TrackRef recoStaGlbTrack = muon->standAloneMuon();
729  etaGlbTrack[0]->Fill(recoCombinedGlbTrack->eta());
730  etaGlbTrack[1]->Fill(recoTkGlbTrack->eta());
731  etaGlbTrack[2]->Fill(recoStaGlbTrack->eta());
732 
733  phiVsetaGlbTrack[0]->Fill(recoCombinedGlbTrack->eta(), recoCombinedGlbTrack->phi());
734  phiVsetaGlbTrack[1]->Fill(recoTkGlbTrack->eta(), recoTkGlbTrack->phi());
735  phiVsetaGlbTrack[2]->Fill(recoStaGlbTrack->eta(), recoStaGlbTrack->phi());
736 
737  if (fillBadLumi) {
738  phiVsetaGlbTrack_badlumi[0]->Fill(recoCombinedGlbTrack->eta(), recoCombinedGlbTrack->phi());
739  phiVsetaGlbTrack_badlumi[1]->Fill(recoTkGlbTrack->eta(), recoTkGlbTrack->phi());
740  phiVsetaGlbTrack_badlumi[2]->Fill(recoStaGlbTrack->eta(), recoStaGlbTrack->phi());
741  }
742 
743  GetRes(recoTkGlbTrack, recoCombinedGlbTrack, "eta", res, pull);
744  etaResolution[0]->Fill(res);
745  GetRes(recoCombinedGlbTrack, recoStaGlbTrack, "eta", res, pull);
746  etaResolution[1]->Fill(res);
747  GetRes(recoTkGlbTrack, recoStaGlbTrack, "eta", res, pull);
748  etaResolution[2]->Fill(res);
749  etaPull->Fill(pull);
750  etaResolution[3]->Fill(recoCombinedGlbTrack->eta(), recoTkGlbTrack->eta() - recoCombinedGlbTrack->eta());
751  etaResolution[4]->Fill(recoCombinedGlbTrack->eta(), -recoStaGlbTrack->eta() + recoCombinedGlbTrack->eta());
752  etaResolution[5]->Fill(recoCombinedGlbTrack->eta(), recoTkGlbTrack->eta() - recoStaGlbTrack->eta());
753 
754  thetaGlbTrack[0]->Fill(recoCombinedGlbTrack->theta());
755  thetaGlbTrack[1]->Fill(recoTkGlbTrack->theta());
756  thetaGlbTrack[2]->Fill(recoStaGlbTrack->theta());
757  GetRes(recoTkGlbTrack, recoCombinedGlbTrack, "theta", res, pull);
758  thetaResolution[0]->Fill(res);
759  GetRes(recoCombinedGlbTrack, recoStaGlbTrack, "theta", res, pull);
760  thetaResolution[1]->Fill(res);
761 
762  GetRes(recoTkGlbTrack, recoStaGlbTrack, "theta", res, pull);
763  thetaResolution[2]->Fill(res);
764  thetaPull->Fill(pull);
765  thetaResolution[3]->Fill(recoCombinedGlbTrack->theta(), recoTkGlbTrack->theta() - recoCombinedGlbTrack->theta());
766  thetaResolution[4]->Fill(recoCombinedGlbTrack->theta(),
767  -recoStaGlbTrack->theta() + recoCombinedGlbTrack->theta());
768  thetaResolution[5]->Fill(recoCombinedGlbTrack->theta(), recoTkGlbTrack->theta() - recoStaGlbTrack->theta());
769 
770  phiGlbTrack[0]->Fill(recoCombinedGlbTrack->phi());
771  phiGlbTrack[1]->Fill(recoTkGlbTrack->phi());
772  phiGlbTrack[2]->Fill(recoStaGlbTrack->phi());
773  GetRes(recoTkGlbTrack, recoCombinedGlbTrack, "phi", res, pull);
774  phiResolution[0]->Fill(res);
775  GetRes(recoCombinedGlbTrack, recoStaGlbTrack, "phi", res, pull);
776  phiResolution[1]->Fill(res);
777  GetRes(recoTkGlbTrack, recoStaGlbTrack, "phi", res, pull);
778  phiResolution[2]->Fill(res);
779  phiPull->Fill(pull);
780  phiResolution[3]->Fill(recoCombinedGlbTrack->phi(), recoTkGlbTrack->phi() - recoCombinedGlbTrack->phi());
781  phiResolution[4]->Fill(recoCombinedGlbTrack->phi(), -recoStaGlbTrack->phi() + recoCombinedGlbTrack->phi());
782  phiResolution[5]->Fill(recoCombinedGlbTrack->phi(), recoTkGlbTrack->phi() - recoStaGlbTrack->phi());
783 
784  chi2OvDFGlbTrack[0]->Fill(recoCombinedGlbTrack->normalizedChi2());
785  chi2OvDFGlbTrack[1]->Fill(recoTkGlbTrack->normalizedChi2());
786  chi2OvDFGlbTrack[2]->Fill(recoStaGlbTrack->normalizedChi2());
787  //-------------------------
788  // double probchi = TMath::Prob(recoCombinedGlbTrack->normalizedChi2(),recoCombinedGlbTrack->ndof());
789  // cout << "rellenando histos."<<endl;
790  probchi2GlbTrack[0]->Fill(TMath::Prob(recoCombinedGlbTrack->chi2(), recoCombinedGlbTrack->ndof()));
791  probchi2GlbTrack[1]->Fill(TMath::Prob(recoTkGlbTrack->chi2(), recoTkGlbTrack->ndof()));
792  probchi2GlbTrack[2]->Fill(TMath::Prob(recoStaGlbTrack->chi2(), recoStaGlbTrack->ndof()));
793  // cout << "rellenados histos."<<endl;
794  //-------------------------
795 
796  pGlbTrack[0]->Fill(recoCombinedGlbTrack->p());
797  pGlbTrack[1]->Fill(recoTkGlbTrack->p());
798  pGlbTrack[2]->Fill(recoStaGlbTrack->p());
799 
800  ptGlbTrack[0]->Fill(recoCombinedGlbTrack->pt());
801  ptGlbTrack[1]->Fill(recoTkGlbTrack->pt());
802  ptGlbTrack[2]->Fill(recoStaGlbTrack->pt());
803 
804  qGlbTrack[0]->Fill(recoCombinedGlbTrack->charge());
805  qGlbTrack[1]->Fill(recoTkGlbTrack->charge());
806  qGlbTrack[2]->Fill(recoStaGlbTrack->charge());
807  if (recoCombinedGlbTrack->charge() == recoStaGlbTrack->charge())
808  qGlbTrack[3]->Fill(1);
809  else
810  qGlbTrack[3]->Fill(2);
811  if (recoCombinedGlbTrack->charge() == recoTkGlbTrack->charge())
812  qGlbTrack[3]->Fill(3);
813  else
814  qGlbTrack[3]->Fill(4);
815  if (recoStaGlbTrack->charge() == recoTkGlbTrack->charge())
816  qGlbTrack[3]->Fill(5);
817  else
818  qGlbTrack[3]->Fill(6);
819  if (recoCombinedGlbTrack->charge() != recoStaGlbTrack->charge() &&
820  recoCombinedGlbTrack->charge() != recoTkGlbTrack->charge())
821  qGlbTrack[3]->Fill(7);
822  if (recoCombinedGlbTrack->charge() == recoStaGlbTrack->charge() &&
823  recoCombinedGlbTrack->charge() == recoTkGlbTrack->charge())
824  qGlbTrack[3]->Fill(8);
825 
826  GetRes(recoTkGlbTrack, recoCombinedGlbTrack, "qOverp", res, pull);
827  qOverpResolution[0]->Fill(res);
828  GetRes(recoCombinedGlbTrack, recoStaGlbTrack, "qOverp", res, pull);
829  qOverpResolution[1]->Fill(res);
830  GetRes(recoTkGlbTrack, recoStaGlbTrack, "qOverp", res, pull);
831  qOverpResolution[2]->Fill(res);
832  qOverpPull->Fill(pull);
833 
834  GetRes(recoTkGlbTrack, recoCombinedGlbTrack, "oneOverp", res, pull);
835  oneOverpResolution[0]->Fill(res);
836  GetRes(recoCombinedGlbTrack, recoStaGlbTrack, "oneOverp", res, pull);
837  oneOverpResolution[1]->Fill(res);
838  GetRes(recoTkGlbTrack, recoStaGlbTrack, "oneOverp", res, pull);
839  oneOverpResolution[2]->Fill(res);
840  oneOverpPull->Fill(pull);
841 
842  GetRes(recoTkGlbTrack, recoCombinedGlbTrack, "qOverpt", res, pull);
843  qOverptResolution[0]->Fill(res);
844  GetRes(recoCombinedGlbTrack, recoStaGlbTrack, "qOverpt", res, pull);
845  qOverptResolution[1]->Fill(res);
846  GetRes(recoTkGlbTrack, recoStaGlbTrack, "qOverpt", res, pull);
847  qOverptResolution[2]->Fill(res);
848  qOverptPull->Fill(pull);
849 
850  GetRes(recoTkGlbTrack, recoCombinedGlbTrack, "oneOverpt", res, pull);
851  oneOverptResolution[0]->Fill(res);
852  GetRes(recoCombinedGlbTrack, recoStaGlbTrack, "oneOverpt", res, pull);
853  oneOverptResolution[1]->Fill(res);
854  GetRes(recoTkGlbTrack, recoStaGlbTrack, "oneOverpt", res, pull);
855  oneOverptResolution[2]->Fill(res);
856  oneOverptPull->Fill(pull);
857 
858  // //--- Test new tunePMuonBestTrack() method from Muon.h
859 
860  reco::TrackRef recoBestTrack = muon->muonBestTrack();
861 
862  reco::TrackRef recoTunePBestTrack = muon->tunePMuonBestTrack();
863 
864  double bestTrackPt = recoBestTrack->pt();
865 
866  double tunePBestTrackPt = recoTunePBestTrack->pt();
867 
868  double tunePBestTrackRes = (bestTrackPt - tunePBestTrackPt) / bestTrackPt;
869 
870  tunePResolution->Fill(tunePBestTrackRes);
871 
872  oneOverptResolution[3]->Fill(recoCombinedGlbTrack->eta(),
873  (1 / recoTkGlbTrack->pt()) - (1 / recoCombinedGlbTrack->pt()));
874  oneOverptResolution[4]->Fill(recoCombinedGlbTrack->eta(),
875  -(1 / recoStaGlbTrack->pt()) + (1 / recoCombinedGlbTrack->pt()));
876  oneOverptResolution[5]->Fill(recoCombinedGlbTrack->eta(),
877  (1 / recoTkGlbTrack->pt()) - (1 / recoStaGlbTrack->pt()));
878  oneOverptResolution[6]->Fill(recoCombinedGlbTrack->phi(),
879  (1 / recoTkGlbTrack->pt()) - (1 / recoCombinedGlbTrack->pt()));
880  oneOverptResolution[7]->Fill(recoCombinedGlbTrack->phi(),
881  -(1 / recoStaGlbTrack->pt()) + (1 / recoCombinedGlbTrack->pt()));
882  oneOverptResolution[8]->Fill(recoCombinedGlbTrack->phi(),
883  (1 / recoTkGlbTrack->pt()) - (1 / recoStaGlbTrack->pt()));
884  oneOverptResolution[9]->Fill(recoCombinedGlbTrack->pt(),
885  (1 / recoTkGlbTrack->pt()) - (1 / recoCombinedGlbTrack->pt()));
886  oneOverptResolution[10]->Fill(recoCombinedGlbTrack->pt(),
887  -(1 / recoStaGlbTrack->pt()) + (1 / recoCombinedGlbTrack->pt()));
888  oneOverptResolution[11]->Fill(recoCombinedGlbTrack->pt(),
889  (1 / recoTkGlbTrack->pt()) - (1 / recoStaGlbTrack->pt()));
890 
891  if (!IsminiAOD) {
892  // valid hits Glb track
893  double rhGlb = recoCombinedGlbTrack->found();
894  // valid hits Glb track from Tracker
895  double rhGlb_StaProvenance = 0;
896  // valid hits Glb track from Sta system
897  double rhGlb_TkProvenance = 0;
898 
899  for (trackingRecHit_iterator recHit = recoCombinedGlbTrack->recHitsBegin();
900  recHit != recoCombinedGlbTrack->recHitsEnd();
901  ++recHit) {
902  if ((*recHit)->isValid()) {
903  DetId id = (*recHit)->geographicalId();
904  if (id.det() == DetId::Muon)
905  rhGlb_StaProvenance++;
906  if (id.det() == DetId::Tracker)
907  rhGlb_TkProvenance++;
908  }
909  }
910  // valid hits Sta track associated to Glb track
911  double rhStaGlb = recoStaGlbTrack->recHitsSize();
912  // valid hits Traker track associated to Glb track
913  double rhTkGlb = recoTkGlbTrack->found();
914  // invalid hits Traker track associated to Glb track
915  double rhTkGlb_notValid = recoTkGlbTrack->lost();
916 
917  // fill the histos
918  rhAnalysis[0]->Fill(rhGlb_StaProvenance / rhGlb);
919  rhAnalysis[1]->Fill(rhGlb_TkProvenance / rhGlb);
920  rhAnalysis[2]->Fill(rhGlb_StaProvenance / rhStaGlb);
921  rhAnalysis[3]->Fill(rhGlb_TkProvenance / rhTkGlb);
922  rhAnalysis[4]->Fill(rhGlb / (rhStaGlb + rhTkGlb));
923  rhAnalysis[5]->Fill(rhTkGlb_notValid / rhGlb);
924  }
925  // aligment plots (mu system w.r.t. tracker rotation)
926  if (recoCombinedGlbTrack->charge() > 0)
927  muVStkSytemRotation[0]->Fill(recoCombinedGlbTrack->pt(), recoTkGlbTrack->pt() / recoCombinedGlbTrack->pt());
928  else
929  muVStkSytemRotation[1]->Fill(recoCombinedGlbTrack->pt(), recoTkGlbTrack->pt() / recoCombinedGlbTrack->pt());
930  }
931 
932  if (muon->isTrackerMuon() && !(muon->isGlobalMuon())) {
933  LogTrace(metname) << "[MuonRecoAnalyzer] The mu is tracker only - filling the histos";
934  if (muon->isStandAloneMuon())
935  muReco->Fill(3);
936  if (!(muon->isStandAloneMuon()))
937  muReco->Fill(4);
938 
939  // get the track using only the tracker data
940  reco::TrackRef recoTrack = muon->track();
941 
942  etaTrack->Fill(recoTrack->eta());
943  thetaTrack->Fill(recoTrack->theta());
944  phiTrack->Fill(recoTrack->phi());
945  chi2OvDFTrack->Fill(recoTrack->normalizedChi2());
946  probchi2Track->Fill(TMath::Prob(recoTrack->chi2(), recoTrack->ndof()));
947  pTrack->Fill(recoTrack->p());
948  ptTrack->Fill(recoTrack->pt());
949  qTrack->Fill(recoTrack->charge());
950  }
951 
952  if (muon->isStandAloneMuon() && !(muon->isGlobalMuon())) {
953  LogTrace(metname) << "[MuonRecoAnalyzer] The mu is STA only - filling the histos";
954  if (!(muon->isTrackerMuon()))
955  muReco->Fill(5);
956 
957  // get the track using only the mu spectrometer data
958  reco::TrackRef recoStaTrack = muon->standAloneMuon();
959 
960  etaStaTrack->Fill(recoStaTrack->eta());
961  thetaStaTrack->Fill(recoStaTrack->theta());
962  phiStaTrack->Fill(recoStaTrack->phi());
963  chi2OvDFStaTrack->Fill(recoStaTrack->normalizedChi2());
964  probchi2StaTrack->Fill(TMath::Prob(recoStaTrack->chi2(), recoStaTrack->ndof()));
965  pStaTrack->Fill(recoStaTrack->p());
966  ptStaTrack->Fill(recoStaTrack->pt());
967  qStaTrack->Fill(recoStaTrack->charge());
968  }
969 
970  if (muon->isCaloMuon() && !(muon->isGlobalMuon()) && !(muon->isTrackerMuon()) && !(muon->isStandAloneMuon()))
971  muReco->Fill(6);
972 
973  //efficiency plots
974 
975  // get the track using only the mu spectrometer data
976  reco::TrackRef recoStaGlbTrack = muon->standAloneMuon();
977 
978  if (muon->isStandAloneMuon()) {
979  etaEfficiency[0]->Fill(recoStaGlbTrack->eta());
980  phiEfficiency[0]->Fill(recoStaGlbTrack->phi());
981  }
982  if (muon->isStandAloneMuon() && muon->isGlobalMuon()) {
983  etaEfficiency[1]->Fill(recoStaGlbTrack->eta());
984  phiEfficiency[1]->Fill(recoStaGlbTrack->phi());
985  }
986  }
987 }
988 
989 //Needed by MVA Soft Muon
991  double dphi = acos(cos(track1.phi() - track2.phi()));
992  double deta = track1.eta() - track2.eta();
993  return sqrt(dphi * dphi + deta * deta);
994 }
995 
996 // ----------------------------------------------------------------------
998  if (vc) {
999  for (unsigned int i = 0; i < vc->size(); ++i) {
1000  reco::Vertex::trackRef_iterator v1TrackIter;
1001  reco::Vertex::trackRef_iterator v1TrackBegin = vc->at(i).tracks_begin();
1002  reco::Vertex::trackRef_iterator v1TrackEnd = vc->at(i).tracks_end();
1003  for (v1TrackIter = v1TrackBegin; v1TrackIter != v1TrackEnd; v1TrackIter++) {
1004  if (static_cast<unsigned int>(tidx) == v1TrackIter->key())
1005  return i;
1006  }
1007  }
1008  }
1009  return -1;
1010 }
muonRecoAnalyzer_cfi.thetaBin
thetaBin
Definition: muonRecoAnalyzer_cfi.py:21
reco::Vertex::trackRef_iterator
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
Definition: Vertex.h:38
PDWG_BPHSkim_cff.muons
muons
Definition: PDWG_BPHSkim_cff.py:47
RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
Handle.h
ALCARECOTkAlBeamHalo_cff.etaMin
etaMin
GeV.
Definition: ALCARECOTkAlBeamHalo_cff.py:32
mps_fire.i
i
Definition: mps_fire.py:355
reco::MuonQuality
Definition: MuonQuality.h:6
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
Muon.h
MessageLogger.h
DcsStatus::TIBTID
Definition: DcsStatus.h:51
DcsStatus.h
etaBin
int etaBin(const l1t::HGCalMulticluster *cl)
Definition: L1EGammaEEProducer.cc:19
DcsStatus::DTm
Definition: DcsStatus.h:46
muon
Definition: MuonCocktails.h:17
edm::Run
Definition: Run.h:45
BeamMonitor_cff.phiBin
phiBin
Definition: BeamMonitor_cff.py:75
MuonRecoAnalyzer.h
reco::MuonQuality::globalDeltaEtaPhi
float globalDeltaEtaPhi
global delta-Eta-Phi of STA-TK matching
Definition: MuonQuality.h:25
edm
HLT enums.
Definition: AlignableModifier.h:19
reco::MuonQuality::trkRelChi2
float trkRelChi2
chi2 value for the inner track stub with respect to the global track
Definition: MuonQuality.h:15
muonRecoAnalyzer_cfi.rhMax
rhMax
Definition: muonRecoAnalyzer_cfi.py:24
DcsStatus::EBm
Definition: DcsStatus.h:35
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
DcsStatus::ESp
Definition: DcsStatus.h:57
muonRecoAnalyzer_cfi.tunePMax
tunePMax
Definition: muonRecoAnalyzer_cfi.py:48
edm::LogInfo
Definition: MessageLogger.h:254
muonRecoAnalyzer_cfi.chi2Min
chi2Min
Definition: muonRecoAnalyzer_cfi.py:34
ptMin
constexpr float ptMin
Definition: PhotonIDValueMapProducer.cc:153
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
reco::MuonQuality::glbTrackProbability
float glbTrackProbability
the tail probability (-ln(P)) of the global fit
Definition: MuonQuality.h:29
muonRecoAnalyzer_cfi.tunePMin
tunePMin
Definition: muonRecoAnalyzer_cfi.py:47
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
reco::MuonQuality::chi2LocalPosition
float chi2LocalPosition
chi2 value for the STA-TK matching of local position
Definition: MuonQuality.h:19
muonRecoAnalyzer_cfi.rhMin
rhMin
Definition: muonRecoAnalyzer_cfi.py:23
HLT_2018_cff.muon
muon
Definition: HLT_2018_cff.py:10349
DcsStatus::EEm
Definition: DcsStatus.h:37
edm::Ref::index
key_type index() const
Definition: Ref.h:253
edm::Handle
Definition: AssociativeIterator.h:50
muonRecoAnalyzer_cfi.ptBin
ptBin
Definition: muonRecoAnalyzer_cfi.py:45
DcsStatus::DT0
Definition: DcsStatus.h:44
muonRecoAnalyzer_cfi.tunePBin
tunePBin
Definition: muonRecoAnalyzer_cfi.py:46
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
edm::Ref< TrackCollection >
parameters
parameters
Definition: BeamSpot_PayloadInspector.cc:14
MuonRecoAnalyzer::GetRes
void GetRes(reco::TrackRef t1, reco::TrackRef t2, std::string par, float &res, float &pull)
Definition: MuonRecoAnalyzer.cc:527
reco::MuonQuality::staRelChi2
float staRelChi2
chi2 value for the outer track stub with respect to the global track
Definition: MuonQuality.h:17
MuonRecoAnalyzer::getPv
int getPv(int tidx, const reco::VertexCollection *vc)
Definition: MuonRecoAnalyzer.cc:997
MuonRecoAnalyzer::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Inizialize parameters for histo binning.
Definition: MuonRecoAnalyzer.cc:575
DetId
Definition: DetId.h:17
reco::HitPattern
Definition: HitPattern.h:147
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Track.h
TrackFwd.h
MuonRecoAnalyzer::getDeltaR
double getDeltaR(reco::Track track1, reco::Track track2)
Definition: MuonRecoAnalyzer.cc:990
AlignmentTrackSelector_cfi.ptMax
ptMax
Definition: AlignmentTrackSelector_cfi.py:12
AlignmentTrackSelector_cfi.pMax
pMax
Definition: AlignmentTrackSelector_cfi.py:14
reco::HitPattern::trackerLayersWithMeasurement
int trackerLayersWithMeasurement() const
Definition: HitPattern.cc:513
DcsStatus::HBHEc
Definition: DcsStatus.h:40
MuonFwd.h
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
AlignmentTrackSelector_cfi.phiMin
phiMin
Definition: AlignmentTrackSelector_cfi.py:18
reco::Track
Definition: Track.h:27
AlignmentTrackSelector_cfi.phiMax
phiMax
Definition: AlignmentTrackSelector_cfi.py:17
p2
double p2[4]
Definition: TauolaWrapper.h:90
DcsStatus::TECm
Definition: DcsStatus.h:54
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
MuonRecoAnalyzer::MuonRecoAnalyzer
MuonRecoAnalyzer(const edm::ParameterSet &)
Constructor.
Definition: MuonRecoAnalyzer.cc:18
MuonRecoAnalyzer::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: MuonRecoAnalyzer.cc:63
DcsStatus::HO
Definition: DcsStatus.h:42
DcsStatus::HBHEa
Definition: DcsStatus.h:38
muonRecoAnalyzer_cfi.rhBin
rhBin
Definition: muonRecoAnalyzer_cfi.py:22
reco::TrackBase::phi
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:620
reco::HitPattern::numberOfValidMuonCSCHits
int numberOfValidMuonCSCHits() const
Definition: HitPattern.h:836
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
muonRecoAnalyzer_cfi.pBin
pBin
Definition: muonRecoAnalyzer_cfi.py:37
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DcsStatus::CSCp
Definition: DcsStatus.h:47
muonRecoAnalyzer_cfi.thetaMin
thetaMin
Definition: muonRecoAnalyzer_cfi.py:22
DcsStatus::CSCm
Definition: DcsStatus.h:48
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
muonRecoAnalyzer_cfi.pResMax
pResMax
Definition: muonRecoAnalyzer_cfi.py:27
edm::ParameterSet
Definition: ParameterSet.h:36
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
DetId::Tracker
Definition: DetId.h:25
reco::MuonQuality::trkKink
float trkKink
value of the kink algorithm applied to the inner track stub
Definition: MuonQuality.h:11
ALCARECOTkAlMinBias_cff.pMin
pMin
GeV.
Definition: ALCARECOTkAlMinBias_cff.py:35
reco::MuonQuality::glbKink
float glbKink
value of the kink algorithm applied to the global track
Definition: MuonQuality.h:13
muonRecoAnalyzer_cfi.pResBin
pResBin
Definition: muonRecoAnalyzer_cfi.py:25
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
reco::TrackBase::eta
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:623
iEvent
int iEvent
Definition: GenABIO.cc:224
muonRecoAnalyzer_cfi.chi2Max
chi2Max
Definition: muonRecoAnalyzer_cfi.py:35
dqm::impl::MonitorElement::setBinLabel
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)
Definition: MonitorElement.cc:771
DcsStatus::EBp
Definition: DcsStatus.h:34
muonRecoAnalyzer_cfi.pResMin
pResMin
Definition: muonRecoAnalyzer_cfi.py:26
p1
double p1[4]
Definition: TauolaWrapper.h:89
muonME0PseudoDigis_cfi.phiResolution
phiResolution
Definition: muonME0PseudoDigis_cfi.py:7
edm::EventSetup
Definition: EventSetup.h:57
DcsStatus::TECp
Definition: DcsStatus.h:53
res
Definition: Electron.h:6
HcalObjRepresent::Fill
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: HcalObjRepresent.h:1053
reco::HitPattern::numberOfValidMuonDTHits
int numberOfValidMuonDTHits() const
Definition: HitPattern.h:832
MuonRecoAnalyzer::~MuonRecoAnalyzer
~MuonRecoAnalyzer() override
Destructor.
Definition: MuonRecoAnalyzer.cc:62
DcsStatus::FPIX
Definition: DcsStatus.h:56
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
DcsStatus::EEp
Definition: DcsStatus.h:36
DcsStatus::TOB
Definition: DcsStatus.h:52
std
Definition: JetResolutionObject.h:76
DcsStatus::HF
Definition: DcsStatus.h:41
muonRecoAnalyzer_cfi.thetaMax
thetaMax
Definition: muonRecoAnalyzer_cfi.py:23
reco::HitPattern::numberOfValidTrackerHits
int numberOfValidTrackerHits() const
Definition: HitPattern.h:788
DcsStatus::BPIX
Definition: DcsStatus.h:55
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
reco::HitPattern::numberOfValidMuonHits
int numberOfValidMuonHits() const
Definition: HitPattern.h:792
ALCARECOTkAlBeamHalo_cff.etaMax
etaMax
Definition: ALCARECOTkAlBeamHalo_cff.py:33
reco::HitPattern::numberOfValidMuonRPCHits
int numberOfValidMuonRPCHits() const
Definition: HitPattern.h:840
dqm::implementation::IBooker
Definition: DQMStore.h:43
edm::View::const_iterator
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
mtdDigitizer_cfi.etaResolution
etaResolution
Definition: mtdDigitizer_cfi.py:70
reco::HitPattern::numberOfValidPixelHits
int numberOfValidPixelHits() const
Definition: HitPattern.h:800
DcsStatus::RPC
Definition: DcsStatus.h:43
muonRecoAnalyzer_cfi.IsminiAOD
IsminiAOD
Definition: muonRecoAnalyzer_cfi.py:11
DcsStatus::HBHEb
Definition: DcsStatus.h:39
DQMOffline_cff.doMVA
doMVA
Definition: DQMOffline_cff.py:106
DetId::Muon
Definition: DetId.h:26
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
DcsStatus::DTp
Definition: DcsStatus.h:45
reco::MuonQuality::chi2LocalMomentum
float chi2LocalMomentum
chi2 value for the STA-TK matching of local momentum
Definition: MuonQuality.h:21
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
MuonEnergy.h
DcsStatus::ESm
Definition: DcsStatus.h:58
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
edm::InputTag
Definition: InputTag.h:15
muonRecoAnalyzer_cfi.chi2Bin
chi2Bin
Definition: muonRecoAnalyzer_cfi.py:33
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:43