19 #include "boost/mpl/vector.hpp"
47 #include "TLorentzVector.h"
54 hGBNmuons_Barrel(nullptr),
55 hSANmuons_Barrel(nullptr),
56 hSimNmuons_Barrel(nullptr),
57 hGBNmuons_Endcap(nullptr),
58 hSANmuons_Endcap(nullptr),
59 hSimNmuons_Endcap(nullptr),
61 hGBNhits_Barrel(nullptr),
62 hGBNhits_Endcap(nullptr),
64 hSANhits_Barrel(nullptr),
65 hSANhits_Endcap(nullptr),
68 hGBChi2_Barrel(nullptr),
69 hSAChi2_Barrel(nullptr),
70 hGBChi2_Endcap(nullptr),
71 hSAChi2_Endcap(nullptr),
75 hGBInvM_Barrel(nullptr),
76 hSAInvM_Barrel(nullptr),
77 hSimInvM_Barrel(nullptr),
78 hGBInvM_Endcap(nullptr),
79 hSAInvM_Endcap(nullptr),
80 hSimInvM_Endcap(nullptr),
81 hGBInvM_Overlap(nullptr),
82 hSAInvM_Overlap(nullptr),
83 hSimInvM_Overlap(nullptr),
87 hSAPTRec_Barrel(nullptr),
88 hGBPTRec_Barrel(nullptr),
89 hSimPT_Barrel(nullptr),
90 hSAPTRec_Endcap(nullptr),
91 hGBPTRec_Endcap(nullptr),
92 hSimPT_Endcap(nullptr),
99 hSimPhivsEta(nullptr),
100 hSAPhivsEta(nullptr),
101 hGBPhivsEta(nullptr),
103 hSAinvPTres(nullptr),
105 hGBinvPTres(nullptr),
106 hSAPTres_Barrel(nullptr),
107 hSAPTres_Endcap(nullptr),
108 hGBPTres_Barrel(nullptr),
109 hGBPTres_Endcap(nullptr),
112 hSAPTDiffvsEta(nullptr),
113 hSAPTDiffvsPhi(nullptr),
114 hGBPTDiffvsEta(nullptr),
115 hGBPTDiffvsPhi(nullptr),
116 hGBinvPTvsEta(nullptr),
117 hGBinvPTvsPhi(nullptr),
118 hSAinvPTvsEta(nullptr),
119 hSAinvPTvsPhi(nullptr),
120 hSAinvPTvsNhits(nullptr),
121 hGBinvPTvsNhits(nullptr),
122 hResidualLocalXDT(nullptr),
123 hResidualLocalPhiDT(nullptr),
124 hResidualLocalThetaDT(nullptr),
125 hResidualLocalYDT(nullptr),
126 hResidualLocalXCSC(nullptr),
127 hResidualLocalPhiCSC(nullptr),
128 hResidualLocalThetaCSC(nullptr),
129 hResidualLocalYCSC(nullptr),
131 hResidualLocalXDT_W(5),
132 hResidualLocalPhiDT_W(5),
133 hResidualLocalThetaDT_W(5),
134 hResidualLocalYDT_W(5),
135 hResidualLocalXCSC_ME(18),
136 hResidualLocalPhiCSC_ME(18),
137 hResidualLocalThetaCSC_ME(18),
138 hResidualLocalYCSC_ME(18),
139 hResidualLocalXDT_MB(20),
140 hResidualLocalPhiDT_MB(20),
141 hResidualLocalThetaDT_MB(20),
142 hResidualLocalYDT_MB(20),
144 hResidualGlobalRPhiDT(nullptr),
145 hResidualGlobalPhiDT(nullptr),
146 hResidualGlobalThetaDT(nullptr),
147 hResidualGlobalZDT(nullptr),
148 hResidualGlobalRPhiCSC(nullptr),
149 hResidualGlobalPhiCSC(nullptr),
150 hResidualGlobalThetaCSC(nullptr),
151 hResidualGlobalRCSC(nullptr),
153 hResidualGlobalRPhiDT_W(5),
154 hResidualGlobalPhiDT_W(5),
155 hResidualGlobalThetaDT_W(5),
156 hResidualGlobalZDT_W(5),
157 hResidualGlobalRPhiCSC_ME(18),
158 hResidualGlobalPhiCSC_ME(18),
159 hResidualGlobalThetaCSC_ME(18),
160 hResidualGlobalRCSC_ME(18),
161 hResidualGlobalRPhiDT_MB(20),
162 hResidualGlobalPhiDT_MB(20),
163 hResidualGlobalThetaDT_MB(20),
164 hResidualGlobalZDT_MB(20),
166 hprofLocalPositionCSC(nullptr),
167 hprofLocalAngleCSC(nullptr),
168 hprofLocalPositionRmsCSC(nullptr),
169 hprofLocalAngleRmsCSC(nullptr),
170 hprofGlobalPositionCSC(nullptr),
171 hprofGlobalAngleCSC(nullptr),
172 hprofGlobalPositionRmsCSC(nullptr),
173 hprofGlobalAngleRmsCSC(nullptr),
174 hprofLocalPositionDT(nullptr),
175 hprofLocalAngleDT(nullptr),
176 hprofLocalPositionRmsDT(nullptr),
177 hprofLocalAngleRmsDT(nullptr),
178 hprofGlobalPositionDT(nullptr),
179 hprofGlobalAngleDT(nullptr),
180 hprofGlobalPositionRmsDT(nullptr),
181 hprofGlobalAngleRmsDT(nullptr),
182 hprofLocalXDT(nullptr),
183 hprofLocalPhiDT(nullptr),
184 hprofLocalThetaDT(nullptr),
185 hprofLocalYDT(nullptr),
186 hprofLocalXCSC(nullptr),
187 hprofLocalPhiCSC(nullptr),
188 hprofLocalThetaCSC(nullptr),
189 hprofLocalYCSC(nullptr),
190 hprofGlobalRPhiDT(nullptr),
191 hprofGlobalPhiDT(nullptr),
192 hprofGlobalThetaDT(nullptr),
193 hprofGlobalZDT(nullptr),
194 hprofGlobalRPhiCSC(nullptr),
195 hprofGlobalPhiCSC(nullptr),
196 hprofGlobalThetaCSC(nullptr),
197 hprofGlobalRCSC(nullptr) {
224 nbins =
pset.getUntrackedParameter<
unsigned int>(
"nbins");
229 edm::LogError(
"MuonAlignmentAnalyzer") <<
"Error in Data Type!!" << std::endl;
264 hGBPhivsEta =
fs->
make<TH2F>(
"GBPhivsEta",
"#phi VS #eta", 100, -2.5, 2.5, 100, -3.1416, 3.1416);
267 hGBPTDiff =
fs->
make<TH1F>(
"GBpTDiff",
"p_{T}^{rec} - p_{T}^{gen} ", 250, -120, 120);
269 fs->
make<TH2F>(
"GBPTDiffvsEta",
"p_{T}^{rec} - p_{T}^{gen} VS #eta", 100, -2.5, 2.5, 250, -120, 120);
271 fs->
make<TH2F>(
"GBPTDiffvsPhi",
"p_{T}^{rec} - p_{T}^{gen} VS #phi", 100, -3.1416, 3.1416, 250, -120, 120);
272 hGBPTres =
fs->
make<TH1F>(
"GBpTRes",
"pT Resolution", 100, -2, 2);
275 hGBinvPTres =
fs->
make<TH1F>(
"GBinvPTRes",
"#sigma (q/p_{T}) Resolution", 100, -2, 2);
276 hGBinvPTvsEta =
fs->
make<TH2F>(
"GBinvPTvsEta",
"#sigma (q/p_{T}) VS #eta", 100, -2.5, 2.5, 100, -2, 2);
277 hGBinvPTvsPhi =
fs->
make<TH2F>(
"GBinvPTvsPhi",
"#sigma (q/p_{T}) VS #phi", 100, -3.1416, 3.1416, 100, -2, 2);
278 hGBinvPTvsNhits =
fs->
make<TH2F>(
"GBinvPTvsNhits",
"#sigma (q/p_{T}) VS Nhits", 100, 0, 100, 100, -2, 2);
303 hSAPhivsEta =
fs->
make<TH2F>(
"SAPhivsEta",
"#phi VS #eta", 100, -2.5, 2.5, 100, -3.1416, 3.1416);
306 hSAPTDiff =
fs->
make<TH1F>(
"SApTDiff",
"p_{T}^{rec} - p_{T}^{gen} ", 250, -120, 120);
308 fs->
make<TH2F>(
"SAPTDiffvsEta",
"p_{T}^{rec} - p_{T}^{gen} VS #eta", 100, -2.5, 2.5, 250, -120, 120);
310 fs->
make<TH2F>(
"SAPTDiffvsPhi",
"p_{T}^{rec} - p_{T}^{gen} VS #phi", 100, -3.1416, 3.1416, 250, -120, 120);
311 hSAPTres =
fs->
make<TH1F>(
"SApTRes",
"pT Resolution", 100, -2, 2);
316 hSAinvPTvsEta =
fs->
make<TH2F>(
"SAinvPTvsEta",
"#sigma (q/p_{T}) VS #eta", 100, -2.5, 2.5, 100, -2, 2);
317 hSAinvPTvsPhi =
fs->
make<TH2F>(
"SAinvPTvsPhi",
"#sigma (q/p_{T}) VS #phi", 100, -3.1416, 3.1416, 100, -2, 2);
318 hSAinvPTvsNhits =
fs->
make<TH2F>(
"SAinvPTvsNhits",
"#sigma (q/p_{T}) VS Nhits", 100, 0, 100, 100, -2, 2);
339 hSimPhivsEta =
fs->
make<TH2F>(
"SimPhivsEta",
"#phi VS #eta", 100, -2.5, 2.5, 100, -3.1416, 3.1416);
389 fs->
make<TH1F>(
"hResidualGlobalThetaDT_W-2",
"hResidualGlobalThetaDT_W-2", 200, -1, 1);
394 fs->
make<TH1F>(
"hResidualGlobalThetaDT_W-1",
"hResidualGlobalThetaDT_W-1", 200, -1, 1);
413 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB-2/1",
"hResidualLocalThetaDT_MB-2/1", 200, -1, 1);
418 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB-2/2",
"hResidualLocalThetaDT_MB-2/2", 200, -1, 1);
423 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB-2/3",
"hResidualLocalThetaDT_MB-2/3", 200, -1, 1);
428 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB-2/4",
"hResidualLocalThetaDT_MB-2/4", 200, -1, 1);
433 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB-1/1",
"hResidualLocalThetaDT_MB-1/1", 200, -1, 1);
438 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB-1/2",
"hResidualLocalThetaDT_MB-1/2", 200, -1, 1);
443 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB-1/3",
"hResidualLocalThetaDT_MB-1/3", 200, -1, 1);
448 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB-1/4",
"hResidualLocalThetaDT_MB-1/4", 200, -1, 1);
453 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB0/1",
"hResidualLocalThetaDT_MB0/1", 200, -1, 1);
458 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB0/2",
"hResidualLocalThetaDT_MB0/2", 200, -1, 1);
462 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB0/3",
"hResidualLocalThetaDT_MB0/3", 200, -1, 1);
468 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB0/4",
"hResidualLocalThetaDT_MB0/4", 200, -1, 1);
473 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB1/1",
"hResidualLocalThetaDT_MB1/1", 200, -1, 1);
478 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB1/2",
"hResidualLocalThetaDT_MB1/2", 200, -1, 1);
483 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB1/3",
"hResidualLocalThetaDT_MB1/3", 200, -1, 1);
488 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB1/4",
"hResidualLocalThetaDT_MB1/4", 200, -1, 1);
493 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB2/1",
"hResidualLocalThetaDT_MB2/1", 200, -1, 1);
498 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB2/2",
"hResidualLocalThetaDT_MB2/2", 200, -1, 1);
503 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB2/3",
"hResidualLocalThetaDT_MB2/3", 200, -1, 1);
508 fs->
make<TH1F>(
"hResidualLocalThetaDT_MB2/4",
"hResidualLocalThetaDT_MB2/4", 200, -1, 1);
511 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB-2/1",
"hResidualGlobalRPhiDT_MB-2/1", 200, -10, 10);
513 fs->
make<TH1F>(
"hResidualGlobalPhiDT_MB-2/1",
"hResidualGlobalPhiDT_MB-2/1", 200, -1, 1);
515 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB-2/1",
"hResidualGlobalThetaDT_MB-2/1", 200, -1, 1);
518 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB-2/2",
"hResidualGlobalRPhiDT_MB-2/2", 200, -10, 10);
520 fs->
make<TH1F>(
"hResidualGlobalPhiDT_MB-2/2",
"hResidualGlobalPhiDT_MB-2/2", 200, -1, 1);
522 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB-2/2",
"hResidualGlobalThetaDT_MB-2/2", 200, -1, 1);
525 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB-2/3",
"hResidualGlobalRPhiDT_MB-2/3", 200, -10, 10);
527 fs->
make<TH1F>(
"hResidualGlobalPhiDT_MB-2/3",
"hResidualGlobalPhiDT_MB-2/3", 200, -1, 1);
529 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB-2/3",
"hResidualGlobalThetaDT_MB-2/3", 200, -1, 1);
532 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB-2/4",
"hResidualGlobalRPhiDT_MB-2/4", 200, -10, 10);
534 fs->
make<TH1F>(
"hResidualGlobalPhiDT_MB-2/4",
"hResidualGlobalPhiDT_MB-2/4", 200, -1, 1);
536 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB-2/4",
"hResidualGlobalThetaDT_MB-2/4", 200, -1, 1);
539 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB-1/1",
"hResidualGlobalRPhiDT_MB-1/1", 200, -10, 10);
541 fs->
make<TH1F>(
"hResidualGlobalPhiDT_MB-1/1",
"hResidualGlobalPhiDT_MB-1/1", 200, -1, 1);
543 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB-1/1",
"hResidualGlobalThetaDT_MB-1/1", 200, -1, 1);
546 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB-1/2",
"hResidualGlobalRPhiDT_MB-1/2", 200, -10, 10);
548 fs->
make<TH1F>(
"hResidualGlobalPhiDT_MB-1/2",
"hResidualGlobalPhiDT_MB-1/2", 200, -1, 1);
550 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB-1/2",
"hResidualGlobalThetaDT_MB-1/2", 200, -1, 1);
553 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB-1/3",
"hResidualGlobalRPhiDT_MB-1/3", 200, -10, 10);
555 fs->
make<TH1F>(
"hResidualGlobalPhiDT_MB-1/3",
"hResidualGlobalPhiDT_MB-1/3", 200, -1, 1);
557 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB-1/3",
"hResidualGlobalThetaDT_MB-1/3", 200, -1, 1);
560 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB-1/4",
"hResidualGlobalRPhiDT_MB-1/4", 200, -10, 10);
562 fs->
make<TH1F>(
"hResidualGlobalPhiDT_MB-1/4",
"hResidualGlobalPhiDT_MB-1/4", 200, -1, 1);
564 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB-1/4",
"hResidualGlobalThetaDT_MB-1/4", 200, -1, 1);
567 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB0/1",
"hResidualGlobalRPhiDT_MB0/1", 200, -10, 10);
570 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB0/1",
"hResidualGlobalThetaDT_MB0/1", 200, -1, 1);
573 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB0/2",
"hResidualGlobalRPhiDT_MB0/2", 200, -10, 10);
576 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB0/2",
"hResidualGlobalThetaDT_MB0/2", 200, -1, 1);
579 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB0/3",
"hResidualGlobalRPhiDT_MB0/3", 200, -10, 10);
581 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB0/3",
"hResidualGlobalThetaDT_MB0/3", 200, -1, 1);
583 fs->
make<TH1F>(
"hResidualGlobalPhiDT_MB0/3",
"hResidualGlobalPhiDT_MB0/3", 200, -1, 1);
586 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB0/4",
"hResidualGlobalRPhiDT_MB0/4", 200, -10, 10);
588 fs->
make<TH1F>(
"hResidualGlobalPhiDT_MB0/4",
"hResidualGlobalPhiDT_MB0/4", 200, -1, 1);
590 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB0/4",
"hResidualGlobalThetaDT_MB0/4", 200, -1, 1);
593 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB1/1",
"hResidualGlobalRPhiDT_MB1/1", 200, -10, 10);
595 fs->
make<TH1F>(
"hResidualGlobalPhiDT_MB1/1",
"hResidualGlobalPhiDT_MB1/1", 200, -1, 1);
597 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB1/1",
"hResidualGlobalThetaDT_MB1/1", 200, -1, 1);
600 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB1/2",
"hResidualGlobalRPhiDT_MB1/2", 200, -10, 10);
602 fs->
make<TH1F>(
"hResidualGlobalPhiDT_MB1/2",
"hResidualGlobalPhiDT_MB1/2", 200, -1, 1);
604 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB1/2",
"hResidualGlobalThetaDT_MB1/2", 200, -1, 1);
607 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB1/3",
"hResidualGlobalRPhiDT_MB1/3", 200, -10, 10);
609 fs->
make<TH1F>(
"hResidualGlobalPhiDT_MB1/3",
"hResidualGlobalPhiDT_MB1/3", 200, -1, 1);
611 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB1/3",
"hResidualGlobalThetaDT_MB1/3", 200, -1, 1);
614 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB1/4",
"hResidualGlobalRPhiDT_MB1/4", 200, -10, 10);
616 fs->
make<TH1F>(
"hResidualGlobalPhiDT_MB1/4",
"hResidualGlobalPhiDT_MB1/4", 200, -1, 1);
618 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB1/4",
"hResidualGlobalThetaDT_MB1/4", 200, -1, 1);
621 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB2/1",
"hResidualGlobalRPhiDT_MB2/1", 200, -10, 10);
623 fs->
make<TH1F>(
"hResidualGlobalPhiDT_MB2/1",
"hResidualGlobalPhiDT_MB2/1", 200, -1, 1);
625 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB2/1",
"hResidualGlobalThetaDT_MB2/1", 200, -1, 1);
628 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB2/2",
"hResidualGlobalRPhiDT_MB2/2", 200, -10, 10);
630 fs->
make<TH1F>(
"hResidualGlobalPhiDT_MB2/2",
"hResidualGlobalPhiDT_MB2/2", 200, -1, 1);
632 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB2/2",
"hResidualGlobalThetaDT_MB2/2", 200, -1, 1);
635 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB2/3",
"hResidualGlobalRPhiDT_MB2/3", 200, -10, 10);
637 fs->
make<TH1F>(
"hResidualGlobalPhiDT_MB2/3",
"hResidualGlobalPhiDT_MB2/3", 200, -1, 1);
639 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB2/3",
"hResidualGlobalThetaDT_MB2/3", 200, -1, 1);
642 fs->
make<TH1F>(
"hResidualGlobalRPhiDT_MB2/4",
"hResidualGlobalRPhiDT_MB2/4", 200, -10, 10);
644 fs->
make<TH1F>(
"hResidualGlobalPhiDT_MB2/4",
"hResidualGlobalPhiDT_MB2/4", 200, -1, 1);
646 fs->
make<TH1F>(
"hResidualGlobalThetaDT_MB2/4",
"hResidualGlobalThetaDT_MB2/4", 200, -1, 1);
652 fs->
make<TH1F>(
"hResidualLocalPhiCSC_ME-4/1",
"hResidualLocalPhiCSC_ME-4/1", 200, -1, 1);
654 fs->
make<TH1F>(
"hResidualLocalThetaCSC_ME-4/1",
"hResidualLocalThetaCSC_ME-4/1", 200, -1, 1);
658 fs->
make<TH1F>(
"hResidualLocalPhiCSC_ME-4/2",
"hResidualLocalPhiCSC_ME-4/2", 200, -1, 1);
660 fs->
make<TH1F>(
"hResidualLocalThetaCSC_ME-4/2",
"hResidualLocalThetaCSC_ME-4/2", 200, -1, 1);
664 fs->
make<TH1F>(
"hResidualLocalPhiCSC_ME-3/1",
"hResidualLocalPhiCSC_ME-3/1", 200, -1, 1);
666 fs->
make<TH1F>(
"hResidualLocalThetaCSC_ME-3/1",
"hResidualLocalThetaCSC_ME-3/1", 200, -1, 1);
670 fs->
make<TH1F>(
"hResidualLocalPhiCSC_ME-3/2",
"hResidualLocalPhiCSC_ME-3/2", 200, -1, 1);
672 fs->
make<TH1F>(
"hResidualLocalThetaCSC_ME-3/2",
"hResidualLocalThetaCSC_ME-3/2", 200, -1, 1);
676 fs->
make<TH1F>(
"hResidualLocalPhiCSC_ME-2/1",
"hResidualLocalPhiCSC_ME-2/1", 200, -1, 1);
678 fs->
make<TH1F>(
"hResidualLocalThetaCSC_ME-2/1",
"hResidualLocalThetaCSC_ME-2/1", 200, -1, 1);
682 fs->
make<TH1F>(
"hResidualLocalPhiCSC_ME-2/2",
"hResidualLocalPhiCSC_ME-2/2", 200, -1, 1);
684 fs->
make<TH1F>(
"hResidualLocalThetaCSC_ME-2/2",
"hResidualLocalThetaCSC_ME-2/2", 200, -1, 1);
688 fs->
make<TH1F>(
"hResidualLocalPhiCSC_ME-1/1",
"hResidualLocalPhiCSC_ME-1/1", 200, -1, 1);
690 fs->
make<TH1F>(
"hResidualLocalThetaCSC_ME-1/1",
"hResidualLocalThetaCSC_ME-1/1", 200, -1, 1);
694 fs->
make<TH1F>(
"hResidualLocalPhiCSC_ME-1/2",
"hResidualLocalPhiCSC_ME-1/2", 200, -1, 1);
696 fs->
make<TH1F>(
"hResidualLocalThetaCSC_ME-1/2",
"hResidualLocalThetaCSC_ME-1/2", 200, -1, 1);
700 fs->
make<TH1F>(
"hResidualLocalPhiCSC_ME-1/3",
"hResidualLocalPhiCSC_ME-1/3", 200, -1, 1);
702 fs->
make<TH1F>(
"hResidualLocalThetaCSC_ME-1/3",
"hResidualLocalThetaCSC_ME-1/3", 200, -1, 1);
707 fs->
make<TH1F>(
"hResidualLocalThetaCSC_ME1/1",
"hResidualLocalThetaCSC_ME1/1", 200, -1, 1);
711 fs->
make<TH1F>(
"hResidualLocalPhiCSC_ME1/2",
"hResidualLocalPhiCSC_ME1/2", 200, -1, 1);
713 fs->
make<TH1F>(
"hResidualLocalThetaCSC_ME1/2",
"hResidualLocalThetaCSC_ME1/2", 200, -1, 1);
717 fs->
make<TH1F>(
"hResidualLocalPhiCSC_ME1/3",
"hResidualLocalPhiCSC_ME1/3", 200, -1, 1);
719 fs->
make<TH1F>(
"hResidualLocalThetaCSC_ME1/3",
"hResidualLocalThetaCSC_ME1/3", 200, -1, 1);
723 fs->
make<TH1F>(
"hResidualLocalPhiCSC_ME2/1",
"hResidualLocalPhiCSC_ME2/1", 200, -1, 1);
725 fs->
make<TH1F>(
"hResidualLocalThetaCSC_ME2/1",
"hResidualLocalThetaCSC_ME2/1", 200, -1, 1);
729 fs->
make<TH1F>(
"hResidualLocalPhiCSC_ME2/2",
"hResidualLocalPhiCSC_ME2/2", 200, -1, 1);
731 fs->
make<TH1F>(
"hResidualLocalThetaCSC_ME2/2",
"hResidualLocalThetaCSC_ME2/2", 200, -1, 1);
735 fs->
make<TH1F>(
"hResidualLocalPhiCSC_ME3/1",
"hResidualLocalPhiCSC_ME3/1", 200, -1, 1);
737 fs->
make<TH1F>(
"hResidualLocalThetaCSC_ME3/1",
"hResidualLocalThetaCSC_ME3/1", 200, -1, 1);
741 fs->
make<TH1F>(
"hResidualLocalPhiCSC_ME3/2",
"hResidualLocalPhiCSC_ME3/2", 200, -1, 1);
743 fs->
make<TH1F>(
"hResidualLocalThetaCSC_ME3/2",
"hResidualLocalThetaCSC_ME3/2", 200, -1, 1);
747 fs->
make<TH1F>(
"hResidualLocalPhiCSC_ME4/1",
"hResidualLocalPhiCSC_ME4/1", 200, -1, 1);
749 fs->
make<TH1F>(
"hResidualLocalThetaCSC_ME4/1",
"hResidualLocalThetaCSC_ME4/1", 200, -1, 1);
753 fs->
make<TH1F>(
"hResidualLocalPhiCSC_ME4/2",
"hResidualLocalPhiCSC_ME4/2", 200, -1, 1);
755 fs->
make<TH1F>(
"hResidualLocalThetaCSC_ME4/2",
"hResidualLocalThetaCSC_ME4/2", 200, -1, 1);
758 fs->
make<TH1F>(
"hResidualGlobalRPhiCSC_ME-4/1",
"hResidualGlobalRPhiCSC_ME-4/1", 200, -10, 10);
760 fs->
make<TH1F>(
"hResidualGlobalPhiCSC_ME-4/1",
"hResidualGlobalPhiCSC_ME-4/1", 200, -1, 1);
762 fs->
make<TH1F>(
"hResidualGlobalThetaCSC_ME-4/1",
"hResidualGlobalThetaCSC_ME-4/1", 200, -1, 1);
764 fs->
make<TH1F>(
"hResidualGlobalRCSC_ME-4/1",
"hResidualGlobalRCSC_ME-4/1", 200, -10, 10);
766 fs->
make<TH1F>(
"hResidualGlobalRPhiCSC_ME-4/2",
"hResidualGlobalRPhiCSC_ME-4/2", 200, -10, 10);
768 fs->
make<TH1F>(
"hResidualGlobalPhiCSC_ME-4/2",
"hResidualGlobalPhiCSC_ME-4/2", 200, -1, 1);
770 fs->
make<TH1F>(
"hResidualGlobalThetaCSC_ME-4/2",
"hResidualGlobalThetaCSC_ME-4/2", 200, -1, 1);
772 fs->
make<TH1F>(
"hResidualGlobalRCSC_ME-4/2",
"hResidualGlobalRCSC_ME-4/2", 200, -10, 10);
774 fs->
make<TH1F>(
"hResidualGlobalRPhiCSC_ME-3/1",
"hResidualGlobalRPhiCSC_ME-3/1", 200, -10, 10);
776 fs->
make<TH1F>(
"hResidualGlobalPhiCSC_ME-3/1",
"hResidualGlobalPhiCSC_ME-3/1", 200, -1, 1);
778 fs->
make<TH1F>(
"hResidualGlobalThetaCSC_ME-3/1",
"hResidualGlobalThetaCSC_ME-3/1", 200, -1, 1);
780 fs->
make<TH1F>(
"hResidualGlobalRCSC_ME-3/1",
"hResidualGlobalRCSC_ME-3/1", 200, -10, 10);
782 fs->
make<TH1F>(
"hResidualGlobalRPhiCSC_ME-3/2",
"hResidualGlobalRPhiCSC_ME-3/2", 200, -10, 10);
784 fs->
make<TH1F>(
"hResidualGlobalPhiCSC_ME-3/2",
"hResidualGlobalPhiCSC_ME-3/2", 200, -1, 1);
786 fs->
make<TH1F>(
"hResidualGlobalThetaCSC_ME-3/2",
"hResidualGlobalThetaCSC_ME-3/2", 200, -1, 1);
788 fs->
make<TH1F>(
"hResidualGlobalRCSC_ME-3/2",
"hResidualGlobalRCSC_ME-3/2", 200, -10, 10);
790 fs->
make<TH1F>(
"hResidualGlobalRPhiCSC_ME-2/1",
"hResidualGlobalRPhiCSC_ME-2/1", 200, -10, 10);
792 fs->
make<TH1F>(
"hResidualGlobalPhiCSC_ME-2/1",
"hResidualGlobalPhiCSC_ME-2/1", 200, -1, 1);
794 fs->
make<TH1F>(
"hResidualGlobalThetaCSC_ME-2/1",
"hResidualGlobalThetaCSC_ME-2/1", 200, -1, 1);
796 fs->
make<TH1F>(
"hResidualGlobalRCSC_ME-2/1",
"hResidualGlobalRCSC_ME-2/1", 200, -10, 10);
798 fs->
make<TH1F>(
"hResidualGlobalRPhiCSC_ME-2/2",
"hResidualGlobalRPhiCSC_ME-2/2", 200, -10, 10);
800 fs->
make<TH1F>(
"hResidualGlobalPhiCSC_ME-2/2",
"hResidualGlobalPhiCSC_ME-2/2", 200, -1, 1);
802 fs->
make<TH1F>(
"hResidualGlobalThetaCSC_ME-2/2",
"hResidualGlobalThetaCSC_ME-2/2", 200, -1, 1);
804 fs->
make<TH1F>(
"hResidualGlobalRCSC_ME-2/2",
"hResidualGlobalRCSC_ME-2/2", 200, -10, 10);
806 fs->
make<TH1F>(
"hResidualGlobalRPhiCSC_ME-1/1",
"hResidualGlobalRPhiCSC_ME-1/1", 200, -10, 10);
808 fs->
make<TH1F>(
"hResidualGlobalPhiCSC_ME-1/1",
"hResidualGlobalPhiCSC_ME-1/1", 200, -1, 1);
810 fs->
make<TH1F>(
"hResidualGlobalThetaCSC_ME-1/1",
"hResidualGlobalThetaCSC_ME-1/1", 200, -1, 1);
812 fs->
make<TH1F>(
"hResidualGlobalRCSC_ME-1/1",
"hResidualGlobalRCSC_ME-1/1", 200, -10, 10);
814 fs->
make<TH1F>(
"hResidualGlobalRPhiCSC_ME-1/2",
"hResidualGlobalRPhiCSC_ME-1/2", 200, -10, 10);
816 fs->
make<TH1F>(
"hResidualGlobalPhiCSC_ME-1/2",
"hResidualGlobalPhiCSC_ME-1/2", 200, -1, 1);
818 fs->
make<TH1F>(
"hResidualGlobalThetaCSC_ME-1/2",
"hResidualGlobalThetaCSC_ME-1/2", 200, -1, 1);
820 fs->
make<TH1F>(
"hResidualGlobalRCSC_ME-1/2",
"hResidualGlobalRCSC_ME-1/2", 200, -10, 10);
822 fs->
make<TH1F>(
"hResidualGlobalRPhiCSC_ME-1/3",
"hResidualGlobalRPhiCSC_ME-1/3", 200, -10, 10);
824 fs->
make<TH1F>(
"hResidualGlobalPhiCSC_ME-1/3",
"hResidualGlobalPhiCSC_ME-1/3", 200, -1, 1);
826 fs->
make<TH1F>(
"hResidualGlobalThetaCSC_ME-1/3",
"hResidualGlobalThetaCSC_ME-1/3", 200, -1, 1);
828 fs->
make<TH1F>(
"hResidualGlobalRCSC_ME-1/3",
"hResidualGlobalRCSC_ME-1/3", 200, -10, 10);
830 fs->
make<TH1F>(
"hResidualGlobalRPhiCSC_ME1/1",
"hResidualGlobalRPhiCSC_ME1/1", 200, -10, 10);
832 fs->
make<TH1F>(
"hResidualGlobalPhiCSC_ME1/1",
"hResidualGlobalPhiCSC_ME1/1", 100, -1, 1);
834 fs->
make<TH1F>(
"hResidualGlobalThetaCSC_ME1/1",
"hResidualGlobalThetaCSC_ME1/1", 200, -1, 1);
837 fs->
make<TH1F>(
"hResidualGlobalRPhiCSC_ME1/2",
"hResidualGlobalRPhiCSC_ME1/2", 200, -10, 10);
839 fs->
make<TH1F>(
"hResidualGlobalPhiCSC_ME1/2",
"hResidualGlobalPhiCSC_ME1/2", 200, -1, 1);
841 fs->
make<TH1F>(
"hResidualGlobalThetaCSC_ME1/2",
"hResidualGlobalThetaCSC_ME1/2", 200, -1, 1);
844 fs->
make<TH1F>(
"hResidualGlobalRPhiCSC_ME1/3",
"hResidualGlobalRPhiCSC_ME1/3", 200, -10, 10);
846 fs->
make<TH1F>(
"hResidualGlobalPhiCSC_ME1/3",
"hResidualGlobalPhiCSC_ME1/3", 200, -1, 1);
848 fs->
make<TH1F>(
"hResidualGlobalThetaCSC_ME1/3",
"hResidualGlobalThetaCSC_ME1/3", 200, -1, 1);
851 fs->
make<TH1F>(
"hResidualGlobalRPhiCSC_ME2/1",
"hResidualGlobalRPhiCSC_ME2/1", 200, -10, 10);
853 fs->
make<TH1F>(
"hResidualGlobalPhiCSC_ME2/1",
"hResidualGlobalPhiCSC_ME2/1", 200, -1, 1);
855 fs->
make<TH1F>(
"hResidualGlobalThetaCSC_ME2/1",
"hResidualGlobalThetaCSC_ME2/1", 200, -1, 1);
858 fs->
make<TH1F>(
"hResidualGlobalRPhiCSC_ME2/2",
"hResidualGlobalRPhiCSC_ME2/2", 200, -10, 10);
860 fs->
make<TH1F>(
"hResidualGlobalPhiCSC_ME2/2",
"hResidualGlobalPhiCSC_ME2/2", 200, -1, 1);
862 fs->
make<TH1F>(
"hResidualGlobalThetaCSC_ME2/2",
"hResidualGlobalThetaCSC_ME2/2", 200, -1, 1);
865 fs->
make<TH1F>(
"hResidualGlobalRPhiCSC_ME3/1",
"hResidualGlobalRPhiCSC_ME3/1", 200, -10, 10);
867 fs->
make<TH1F>(
"hResidualGlobalPhiCSC_ME3/1",
"hResidualGlobalPhiCSC_ME3/1", 200, -1, 1);
869 fs->
make<TH1F>(
"hResidualGlobalThetaCSC_ME3/1",
"hResidualGlobalThetaCSC_ME3/1", 200, -1, 1);
872 fs->
make<TH1F>(
"hResidualGlobalRPhiCSC_ME3/2",
"hResidualGlobalRPhiCSC_ME3/2", 200, -10, 10);
874 fs->
make<TH1F>(
"hResidualGlobalPhiCSC_ME3/2",
"hResidualGlobalPhiCSC_ME3/2", 200, -1, 1);
876 fs->
make<TH1F>(
"hResidualGlobalThetaCSC_ME3/2",
"hResidualGlobalThetaCSC_ME3/2", 200, -1, 1);
879 fs->
make<TH1F>(
"hResidualGlobalRPhiCSC_ME4/1",
"hResidualGlobalRPhiCSC_ME4/1", 200, -10, 10);
881 fs->
make<TH1F>(
"hResidualGlobalPhiCSC_ME4/1",
"hResidualGlobalPhiCSC_ME4/1", 200, -1, 1);
883 fs->
make<TH1F>(
"hResidualGlobalThetaCSC_ME4/1",
"hResidualGlobalThetaCSC_ME4/1", 200, -1, 1);
886 fs->
make<TH1F>(
"hResidualGlobalRPhiCSC_ME4/2",
"hResidualGlobalRPhiCSC_ME4/2", 200, -10, 10);
888 fs->
make<TH1F>(
"hResidualGlobalPhiCSC_ME4/2",
"hResidualGlobalPhiCSC_ME4/2", 200, -1, 1);
890 fs->
make<TH1F>(
"hResidualGlobalThetaCSC_ME4/2",
"hResidualGlobalThetaCSC_ME4/2", 200, -1, 1);
931 "hprofGlobalPositionDT",
"Global DT position (cm) absolute MEAN residuals;Sector;;cm", 14, 0, 14, 40, 0, 40);
933 "hprofGlobalAngleDT",
"Global DT angle (rad) absolute MEAN residuals;Sector;;rad", 14, 0, 14, 40, 0, 40);
935 "hprofGlobalPositionRmsDT",
"Global DT position (cm) RMS residuals;Sector;;rad", 14, 0, 14, 40, 0, 40);
937 "hprofGlobalAngleRmsDT",
"Global DT angle (rad) RMS residuals;Sector;;rad", 14, 0, 14, 40, 0, 40);
939 "hprofLocalPositionDT",
"Local DT position (cm) absolute MEAN residuals;Sector;;cm", 14, 0, 14, 40, 0, 40);
941 "hprofLocalAngleDT",
"Local DT angle (rad) absolute MEAN residuals;Sector;;rad", 14, 0, 14, 40, 0, 40);
943 "hprofLocalPositionRmsDT",
"Local DT position (cm) RMS residuals;Sector;;rad", 14, 0, 14, 40, 0, 40);
945 fs->
make<TH2F>(
"hprofLocalAngleRmsDT",
"Local DT angle (rad) RMS residuals;Sector;;rad", 14, 0, 14, 40, 0, 40);
948 "hprofGlobalPositionCSC",
"Global CSC position (cm) absolute MEAN residuals;Sector;;cm", 36, 0, 36, 36, 0, 36);
950 "hprofGlobalAngleCSC",
"Global CSC angle (rad) absolute MEAN residuals;Sector;;rad", 36, 0, 36, 36, 0, 36);
952 "hprofGlobalPositionRmsCSC",
"Global CSC position (cm) RMS residuals;Sector;;rad", 36, 0, 36, 36, 0, 36);
954 "hprofGlobalAngleRmsCSC",
"Global CSC angle (rad) RMS residuals;Sector;;rad", 36, 0, 36, 36, 0, 36);
956 "hprofLocalPositionCSC",
"Local CSC position (cm) absolute MEAN residuals;Sector;;cm", 36, 0, 36, 36, 0, 36);
958 "hprofLocalAngleCSC",
"Local CSC angle (rad) absolute MEAN residuals;Sector;;rad", 36, 0, 36, 36, 0, 36);
960 "hprofLocalPositionRmsCSC",
"Local CSC position (cm) RMS residuals;Sector;;rad", 36, 0, 36, 36, 0, 36);
962 "hprofLocalAngleRmsCSC",
"Local CSC angle (rad) RMS residuals;Sector;;rad", 36, 0, 36, 36, 0, 36);
965 Float_t labelSize = 0.025;
985 for (
int i = 1;
i < 15;
i++) {
986 snprintf(binLabel,
sizeof(binLabel),
"Sec-%d",
i);
997 for (
int i = 1;
i < 37;
i++) {
998 snprintf(binLabel,
sizeof(binLabel),
"Ch-%d",
i);
1012 edm::LogInfo(
"MuonAlignmentAnalyzer") <<
"----------------- " << std::endl << std::endl;
1050 if (nameHistoLocalX.Contains(
"MB"))
1054 sscanf(nameHistoLocalX,
"ResidualLocalX_W%dMB%1dS%d", &
wheel, &
station, §or);
1057 Int_t nwheel =
wheel + 2;
1062 Int_t xbin = sector + 14 * nstation + 14 * 4 * nwheel;
1064 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%dS%d",
wheel,
station, sector);
1072 Int_t ybin = 1 + nwheel * 8 + nstation * 2;
1074 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_LocalX",
wheel,
station);
1080 if (nameHistoLocalX.Contains(
"ME"))
1099 xbin = 18 * (((Int_t)(xbin / 3)) * 2 + (Int_t)(xbin / 2)) +
chamber;
1103 xbin = 126 + (xbin - 6) * 36 +
chamber;
1105 xbin = 414 + 18 * (((Int_t)(xbin - 13) / 3) * 2 + ((Int_t)(xbin - 13) / 2)) +
chamber;
1124 ybin = 2 * ybin - 1;
1126 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_LocalX",
station,
ring);
1132 if (nameHistoLocalTheta.Contains(
"MB"))
1136 sscanf(nameHistoLocalTheta,
"ResidualLocalTheta_W%dMB%1dS%d", &
wheel, &
station, §or);
1140 Int_t nwheel =
wheel + 2;
1145 Int_t xbin = sector + 14 * nstation + 14 * 4 * nwheel;
1147 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%dS%d",
wheel,
station, sector);
1155 Int_t ybin = 2 + nwheel * 8 + nstation * 2;
1157 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_LocalTheta",
wheel,
station);
1164 if (nameHistoLocalPhi.Contains(
"MB"))
1168 sscanf(nameHistoLocalPhi,
"ResidualLocalPhi_W%dMB%1dS%d", &
wheel, &
station, §or);
1171 Int_t nwheel =
wheel + 2;
1176 Int_t xbin = sector + 14 * nstation + 14 * 4 * nwheel;
1178 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%dS%d",
wheel,
station, sector);
1186 Int_t ybin = 1 + nwheel * 8 + nstation * 2;
1188 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_LocalPhi",
wheel,
station);
1194 if (nameHistoLocalPhi.Contains(
"ME"))
1198 sscanf(nameHistoLocalPhi,
"ResidualLocalPhi_ME%dR%1dC%d", &
station, &
ring, &
chamber);
1213 xbin = 18 * (((Int_t)(xbin / 3)) * 2 + (Int_t)(xbin / 2)) +
chamber;
1217 xbin = 126 + (xbin - 6) * 36 +
chamber;
1219 xbin = 414 + 18 * (((Int_t)(xbin - 13) / 3) * 2 + ((Int_t)(xbin - 13) / 2)) +
chamber;
1238 ybin = 2 * ybin - 1;
1240 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_LocalPhi",
station,
ring);
1246 if (nameHistoLocalTheta.Contains(
"ME"))
1250 sscanf(nameHistoLocalTheta,
"ResidualLocalTheta_ME%dR%1dC%d", &
station, &
ring, &
chamber);
1265 xbin = 18 * (((Int_t)(xbin / 3)) * 2 + (Int_t)(xbin / 2)) +
chamber;
1269 xbin = 126 + (xbin - 6) * 36 +
chamber;
1271 xbin = 414 + 18 * (((Int_t)(xbin - 13) / 3) * 2 + ((Int_t)(xbin - 13) / 2)) +
chamber;
1292 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_LocalTheta",
station,
ring);
1298 if (nameHistoLocalY.Contains(
"MB"))
1302 sscanf(nameHistoLocalY,
"ResidualLocalY_W%dMB%1dS%d", &
wheel, &
station, §or);
1306 Int_t nwheel =
wheel + 2;
1311 Int_t xbin = sector + 14 * nstation + 14 * 4 * nwheel;
1313 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%dS%d",
wheel,
station, sector);
1321 Int_t ybin = 2 + nwheel * 8 + nstation * 2;
1323 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_LocalY",
wheel,
station);
1330 if (nameHistoLocalY.Contains(
"ME"))
1349 xbin = 18 * (((Int_t)(xbin / 3)) * 2 + (Int_t)(xbin / 2)) +
chamber;
1353 xbin = 126 + (xbin - 6) * 36 +
chamber;
1355 xbin = 414 + 18 * (((Int_t)(xbin - 13) / 3) * 2 + ((Int_t)(xbin - 13) / 2)) +
chamber;
1376 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_LocalY",
station,
ring);
1382 if (nameHistoGlobalRPhi.Contains(
"MB"))
1386 sscanf(nameHistoGlobalRPhi,
"ResidualGlobalRPhi_W%dMB%1dS%d", &
wheel, &
station, §or);
1389 Int_t nwheel =
wheel + 2;
1394 Int_t xbin = sector + 14 * nstation + 14 * 4 * nwheel;
1396 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%dS%d",
wheel,
station, sector);
1404 Int_t ybin = 1 + nwheel * 8 + nstation * 2;
1406 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_GlobalRPhi",
wheel,
station);
1412 if (nameHistoGlobalRPhi.Contains(
"ME"))
1416 sscanf(nameHistoGlobalRPhi,
"ResidualGlobalRPhi_ME%dR%1dC%d", &
station, &
ring, &
chamber);
1431 xbin = 18 * (((Int_t)(xbin / 3)) * 2 + (Int_t)(xbin / 2)) +
chamber;
1435 xbin = 126 + (xbin - 6) * 36 +
chamber;
1437 xbin = 414 + 18 * (((Int_t)(xbin - 13) / 3) * 2 + ((Int_t)(xbin - 13) / 2)) +
chamber;
1456 ybin = 2 * ybin - 1;
1458 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_GlobalRPhi",
station,
ring);
1464 if (nameHistoGlobalTheta.Contains(
"MB"))
1468 sscanf(nameHistoGlobalTheta,
"ResidualGlobalTheta_W%dMB%1dS%d", &
wheel, &
station, §or);
1472 Int_t nwheel =
wheel + 2;
1477 Int_t xbin = sector + 14 * nstation + 14 * 4 * nwheel;
1479 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%dS%d",
wheel,
station, sector);
1487 Int_t ybin = 2 + nwheel * 8 + nstation * 2;
1489 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_GlobalTheta",
wheel,
station);
1496 if (nameHistoGlobalPhi.Contains(
"MB"))
1500 sscanf(nameHistoGlobalPhi,
"ResidualGlobalPhi_W%dMB%1dS%d", &
wheel, &
station, §or);
1503 Int_t nwheel =
wheel + 2;
1508 Int_t xbin = sector + 14 * nstation + 14 * 4 * nwheel;
1510 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%dS%d",
wheel,
station, sector);
1518 Int_t ybin = 1 + nwheel * 8 + nstation * 2;
1520 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_GlobalPhi",
wheel,
station);
1526 if (nameHistoGlobalPhi.Contains(
"ME"))
1530 sscanf(nameHistoGlobalPhi,
"ResidualGlobalPhi_ME%dR%1dC%d", &
station, &
ring, &
chamber);
1545 xbin = 18 * (((Int_t)(xbin / 3)) * 2 + (Int_t)(xbin / 2)) +
chamber;
1549 xbin = 126 + (xbin - 6) * 36 +
chamber;
1551 xbin = 414 + 18 * (((Int_t)(xbin - 13) / 3) * 2 + ((Int_t)(xbin - 13) / 2)) +
chamber;
1570 ybin = 2 * ybin - 1;
1572 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_GlobalPhi",
station,
ring);
1578 if (nameHistoGlobalTheta.Contains(
"ME"))
1582 sscanf(nameHistoGlobalTheta,
"ResidualGlobalTheta_ME%dR%1dC%d", &
station, &
ring, &
chamber);
1597 xbin = 18 * (((Int_t)(xbin / 3)) * 2 + (Int_t)(xbin / 2)) +
chamber;
1601 xbin = 126 + (xbin - 6) * 36 +
chamber;
1603 xbin = 414 + 18 * (((Int_t)(xbin - 13) / 3) * 2 + ((Int_t)(xbin - 13) / 2)) +
chamber;
1624 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_GlobalTheta",
station,
ring);
1630 if (nameHistoGlobalRZ.Contains(
"MB"))
1634 sscanf(nameHistoGlobalRZ,
"ResidualGlobalZ_W%dMB%1dS%d", &
wheel, &
station, §or);
1638 Int_t nwheel =
wheel + 2;
1643 Int_t xbin = sector + 14 * nstation + 14 * 4 * nwheel;
1645 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%dS%d",
wheel,
station, sector);
1654 Int_t ybin = 2 + nwheel * 8 + nstation * 2;
1656 snprintf(binLabel,
sizeof(binLabel),
"MB%d/%d_GlobalZ",
wheel,
station);
1663 if (nameHistoGlobalRZ.Contains(
"ME"))
1682 xbin = 18 * (((Int_t)(xbin / 3)) * 2 + (Int_t)(xbin / 2)) +
chamber;
1686 xbin = 126 + (xbin - 6) * 36 +
chamber;
1688 xbin = 414 + 18 * (((Int_t)(xbin - 13) / 3) * 2 + ((Int_t)(xbin - 13) / 2)) +
chamber;
1709 snprintf(binLabel,
sizeof(binLabel),
"ME%d/%d_GlobalR",
station,
ring);
1722 std::vector<double> simPar[4];
1729 int i = 0, ie = 0,
ib = 0;
1733 event.getByLabel(
"g4SimHits",
simTracks);
1735 edm::SimTrackContainer::const_iterator
simTrack;
1738 if (
abs((*simTrack).type()) == 13) {
1740 simPt = (*simTrack).momentum().Pt();
1741 simEta = (*simTrack).momentum().eta();
1742 simPhi = (*simTrack).momentum().phi();
1745 if (fabs(simEta) < 1.04) {
1756 simPar[0].push_back(simPt);
1757 simPar[1].push_back(simEta);
1758 simPar[2].push_back(simPhi);
1759 simPar[3].push_back((*simTrack).charge());
1763 p1 =
GlobalVector((*simTrack).momentum().x(), (*simTrack).momentum().y(), (*simTrack).momentum().z());
1765 p2 =
GlobalVector((*simTrack).momentum().x(), (*simTrack).momentum().y(), (*simTrack).momentum().z());
1773 TLorentzVector mu1(
p1.x(),
p1.y(),
p1.z(),
p1.mag());
1774 TLorentzVector mu2(
p2.x(),
p2.y(),
p2.z(),
p2.mag());
1775 TLorentzVector pair = mu1 + mu2;
1776 double Minv = pair.M();
1778 if (fabs(
p1.eta()) < 1.04 && fabs(
p2.eta()) < 1.04)
1780 else if (fabs(
p1.eta()) >= 1.04 && fabs(
p2.eta()) >= 1.04)
1790 double SArecPt = 0.;
1793 int i = 0, ie = 0,
ib = 0;
1801 reco::TrackCollection::const_iterator staTrack;
1806 SArecPt = (*staTrack).pt();
1807 SAeta = (*staTrack).eta();
1808 SAphi = (*staTrack).phi();
1809 ich = (*staTrack).charge();
1813 hSAChi2->Fill((*staTrack).chi2());
1814 hSANhits->Fill((*staTrack).numberOfValidHits());
1815 if (fabs(SAeta) < 1.04) {
1829 p1 =
GlobalVector((*staTrack).momentum().x(), (*staTrack).momentum().y(), (*staTrack).momentum().z());
1831 p2 =
GlobalVector((*staTrack).momentum().x(), (*staTrack).momentum().y(), (*staTrack).momentum().z());
1834 double candDeltaR = -999.0,
dR;
1836 if (!simPar[0].
empty()) {
1837 for (
unsigned int iSim = 0; iSim < simPar[0].size(); iSim++) {
1838 dR =
deltaR(SAeta, SAphi, simPar[1][iSim], simPar[2][iSim]);
1839 if (candDeltaR < 0 ||
dR < candDeltaR) {
1846 double simPt = simPar[0][iCand];
1847 hSAPTres->Fill((SArecPt - simPt) / simPt);
1848 if (fabs(SAeta) < 1.04)
1857 double ptInvRes = (ich / SArecPt - simPar[3][iCand] / simPt) / (simPar[3][iCand] / simPt);
1874 TLorentzVector mu1(
p1.x(),
p1.y(),
p1.z(),
p1.mag());
1875 TLorentzVector mu2(
p2.x(),
p2.y(),
p2.z(),
p2.mag());
1876 TLorentzVector pair = mu1 + mu2;
1877 double Minv = pair.M();
1879 if (fabs(
p1.eta()) < 1.04 && fabs(
p2.eta()) < 1.04)
1881 else if (fabs(
p1.eta()) >= 1.04 && fabs(
p2.eta()) >= 1.04)
1901 int i = 0, ie = 0,
ib = 0;
1903 reco::TrackCollection::const_iterator glbTrack;
1905 for (glbTrack = glbTracks->begin(); glbTrack != glbTracks->end(); ++glbTrack) {
1908 GBrecPt = (*glbTrack).pt();
1909 GBeta = (*glbTrack).eta();
1910 GBphi = (*glbTrack).phi();
1911 ich = (*glbTrack).charge();
1915 hGBChi2->Fill((*glbTrack).chi2());
1916 hGBNhits->Fill((*glbTrack).numberOfValidHits());
1917 if (fabs(GBeta) < 1.04) {
1931 p1 =
GlobalVector((*glbTrack).momentum().x(), (*glbTrack).momentum().y(), (*glbTrack).momentum().z());
1933 p2 =
GlobalVector((*glbTrack).momentum().x(), (*glbTrack).momentum().y(), (*glbTrack).momentum().z());
1936 double candDeltaR = -999.0,
dR;
1938 if (!simPar[0].
empty()) {
1939 for (
unsigned int iSim = 0; iSim < simPar[0].size(); iSim++) {
1940 dR =
deltaR(GBeta, GBphi, simPar[1][iSim], simPar[2][iSim]);
1941 if (candDeltaR < 0 ||
dR < candDeltaR) {
1948 double simPt = simPar[0][iCand];
1950 hGBPTres->Fill((GBrecPt - simPt) / simPt);
1951 if (fabs(GBeta) < 1.04)
1961 double ptInvRes = (ich / GBrecPt - simPar[3][iCand] / simPt) / (simPar[3][iCand] / simPt);
1978 TLorentzVector mu1(
p1.x(),
p1.y(),
p1.z(),
p1.mag());
1979 TLorentzVector mu2(
p2.x(),
p2.y(),
p2.z(),
p2.mag());
1980 TLorentzVector pair = mu1 + mu2;
1981 double Minv = pair.M();
1983 if (fabs(
p1.eta()) < 1.04 && fabs(
p2.eta()) < 1.04)
1985 else if (fabs(
p1.eta()) >= 1.04 && fabs(
p2.eta()) >= 1.04)
2035 reco::TrackCollection::const_iterator staTrack;
2037 int countPoints = 0;
2043 *staTrack, all4DSegmentsDT, all4DSegmentsCSC, &indexCollectionDT, &indexCollectionCSC, theTrackingGeometry);
2055 for (RecHitVector::iterator rechit = my4DTrack.begin(); rechit != my4DTrack.end(); ++rechit) {
2056 const GeomDet *geomDet = theTrackingGeometry->
idToDet((*rechit)->geographicalId());
2058 const Plane *pDest = dynamic_cast<const Plane *>(&geomDet->
surface());
2059 const Cylinder *cDest = dynamic_cast<const Cylinder *>(&geomDet->
surface());
2061 if (pDest !=
nullptr || cDest !=
nullptr) {
2074 const long rawId = (*rechit)->geographicalId().rawId();
2076 bool newDetector =
true;
2082 if (*myIds == rawId) {
2083 newDetector =
false;
2093 double residualGlobalRPhi = 0, residualGlobalPhi = 0, residualGlobalR = 0, residualGlobalTheta = 0,
2094 residualGlobalZ = 0;
2095 double residualLocalX = 0, residualLocalPhi = 0, residualLocalY = 0, residualLocalTheta = 0;
2103 sector = myChamber.
sector();
2106 residualGlobalRPhi =
2112 residualLocalX = (*rechit)->localPosition().x() - destiny.
localPosition().
x();
2119 residualLocalPhi = atan2(((
RecSegment *)(*rechit))->localDirection().
z(),
2120 ((
RecSegment *)(*rechit))->localDirection().
x()) -
2134 residualLocalY = (*rechit)->localPosition().y() - destiny.
localPosition().
y();
2141 residualLocalTheta = atan2(((
RecSegment *)(*rechit))->localDirection().
z(),
2142 ((
RecSegment *)(*rechit))->localDirection().
y()) -
2175 }
else if (det == 2) {
2185 residualGlobalRPhi =
2191 residualLocalX = (*rechit)->localPosition().x() - destiny.
localPosition().
x();
2198 residualLocalY = (*rechit)->localPosition().y() - destiny.
localPosition().
y();
2205 residualLocalPhi = atan2(((
RecSegment *)(*rechit))->localDirection().
y(),
2206 ((
RecSegment *)(*rechit))->localDirection().
x()) -
2214 residualLocalTheta = atan2(((
RecSegment *)(*rechit))->localDirection().
y(),
2215 ((
RecSegment *)(*rechit))->localDirection().
z()) -
2248 residualGlobalRPhi = 0, residualGlobalPhi = 0, residualGlobalR = 0, residualGlobalTheta = 0,
2249 residualGlobalZ = 0;
2250 residualLocalX = 0, residualLocalPhi = 0, residualLocalY = 0, residualLocalTheta = 0,
2259 double rangeX = 3.0, rangeY = 5.;
2283 char nameOfHistoLocalX[50];
2284 char nameOfHistoLocalTheta[50];
2285 char nameOfHistoLocalY[50];
2286 char nameOfHistoLocalPhi[50];
2287 char nameOfHistoGlobalRPhi[50];
2288 char nameOfHistoGlobalTheta[50];
2289 char nameOfHistoGlobalR[50];
2290 char nameOfHistoGlobalPhi[50];
2291 char nameOfHistoGlobalZ[50];
2294 snprintf(nameOfHistoLocalX,
2295 sizeof(nameOfHistoLocalX),
2296 "ResidualLocalX_W%dMB%1dS%1d",
2300 snprintf(nameOfHistoLocalPhi,
2301 sizeof(nameOfHistoLocalPhi),
2302 "ResidualLocalPhi_W%dMB%1dS%1d",
2306 snprintf(nameOfHistoGlobalRPhi,
2307 sizeof(nameOfHistoGlobalRPhi),
2308 "ResidualGlobalRPhi_W%dMB%1dS%1d",
2312 snprintf(nameOfHistoGlobalPhi,
2313 sizeof(nameOfHistoGlobalPhi),
2314 "ResidualGlobalPhi_W%dMB%1dS%1d",
2318 snprintf(nameOfHistoLocalTheta,
2319 sizeof(nameOfHistoLocalTheta),
2320 "ResidualLocalTheta_W%dMB%1dS%1d",
2324 snprintf(nameOfHistoLocalY,
2325 sizeof(nameOfHistoLocalY),
2326 "ResidualLocalY_W%dMB%1dS%1d",
2330 TH1F *histoLocalY =
fs->
make<TH1F>(nameOfHistoLocalY, nameOfHistoLocalY,
nbins, -rangeY, rangeY);
2332 snprintf(nameOfHistoGlobalTheta,
2333 sizeof(nameOfHistoGlobalTheta),
2334 "ResidualGlobalTheta_W%dMB%1dS%1d",
2338 snprintf(nameOfHistoGlobalZ,
2339 sizeof(nameOfHistoGlobalZ),
2340 "ResidualGlobalZ_W%dMB%1dS%1d",
2344 TH1F *histoGlobalZ =
fs->
make<TH1F>(nameOfHistoGlobalZ, nameOfHistoGlobalZ,
nbins, -rangeY, rangeY);
2347 }
else if (det == 2) {
2348 snprintf(nameOfHistoLocalX,
2349 sizeof(nameOfHistoLocalX),
2350 "ResidualLocalX_ME%dR%1dC%1d",
2354 snprintf(nameOfHistoLocalPhi,
2355 sizeof(nameOfHistoLocalPhi),
2356 "ResidualLocalPhi_ME%dR%1dC%1d",
2360 snprintf(nameOfHistoLocalTheta,
2361 sizeof(nameOfHistoLocalTheta),
2362 "ResidualLocalTheta_ME%dR%1dC%1d",
2366 snprintf(nameOfHistoLocalY,
2367 sizeof(nameOfHistoLocalY),
2368 "ResidualLocalY_ME%dR%1dC%1d",
2372 TH1F *histoLocalY =
fs->
make<TH1F>(nameOfHistoLocalY, nameOfHistoLocalY,
nbins, -rangeY, rangeY);
2374 snprintf(nameOfHistoGlobalRPhi,
2375 sizeof(nameOfHistoGlobalRPhi),
2376 "ResidualGlobalRPhi_ME%dR%1dC%1d",
2380 snprintf(nameOfHistoGlobalPhi,
2381 sizeof(nameOfHistoGlobalPhi),
2382 "ResidualGlobalPhi_ME%dR%1dC%1d",
2386 snprintf(nameOfHistoGlobalTheta,
2387 sizeof(nameOfHistoGlobalTheta),
2388 "ResidualGlobalTheta_ME%dR%1dC%1d",
2392 snprintf(nameOfHistoGlobalR,
2393 sizeof(nameOfHistoGlobalR),
2394 "ResidualGlobalR_ME%dR%1dC%1d",
2398 TH1F *histoGlobalR =
fs->
make<TH1F>(nameOfHistoGlobalR, nameOfHistoGlobalR,
nbins, -rangeY, rangeY);
2403 TH1F *histoLocalX =
fs->
make<TH1F>(nameOfHistoLocalX, nameOfHistoLocalX,
nbins, -rangeX, rangeX);
2404 TH1F *histoGlobalRPhi =
2405 fs->
make<TH1F>(nameOfHistoGlobalRPhi, nameOfHistoGlobalRPhi,
nbins, -rangeX, rangeX);
2406 TH1F *histoLocalPhi =
2408 TH1F *histoGlobalPhi =
2410 TH1F *histoGlobalTheta =
fs->
make<TH1F>(
2412 TH1F *histoLocalTheta =
fs->
make<TH1F>(
2415 histoLocalX->Fill(residualLocalX);
2416 histoLocalPhi->Fill(residualLocalPhi);
2417 histoLocalTheta->Fill(residualLocalTheta);
2418 histoGlobalRPhi->Fill(residualGlobalRPhi);
2419 histoGlobalPhi->Fill(residualGlobalPhi);
2420 histoGlobalTheta->Fill(residualGlobalTheta);
2441 }
else if (det == 2) {
2449 innerTSOS = destiny;
2452 edm::LogError(
"MuonAlignmentAnalyzer") <<
" Error!! Exception in propagator catched" << std::endl;
2479 std::vector<int> positionDT;
2480 std::vector<int> positionCSC;
2494 int NumberOfDTSegment = 0;
2496 for (segmentDT = all4DSegmentsDT->begin(); segmentDT != all4DSegmentsDT->end(); ++segmentDT) {
2498 bool isNewChamber =
true;
2501 for (std::vector<int>::iterator positionIt = positionDT.begin(); positionIt != positionDT.end(); positionIt++) {
2503 if (NumberOfDTSegment == *positionIt)
2504 isNewChamber =
false;
2508 for (std::vector<std::vector<int> >::iterator collect = indexCollectionDT->begin();
2509 collect != indexCollectionDT->end();
2512 for (std::vector<int>::iterator positionIt = (*collect).begin(); positionIt != (*collect).end();
2515 if (NumberOfDTSegment == *positionIt)
2516 isNewChamber =
false;
2522 DTChamberId myChamber((*segmentDT).geographicalId().rawId());
2524 if (myLayer.wheel() == myChamber.wheel() && myLayer.station() == myChamber.station() &&
2525 myLayer.sector() == myChamber.sector()) {
2527 positionDT.push_back(NumberOfDTSegment);
2531 NumberOfDTSegment++;
2538 int NumberOfCSCSegment = 0;
2540 for (segmentCSC = all4DSegmentsCSC->begin(); segmentCSC != all4DSegmentsCSC->end(); segmentCSC++) {
2542 bool isNewChamber =
true;
2545 for (std::vector<int>::iterator positionIt = positionCSC.begin(); positionIt != positionCSC.end();
2548 if (NumberOfCSCSegment == *positionIt)
2549 isNewChamber =
false;
2552 for (std::vector<std::vector<int> >::iterator collect = indexCollectionCSC->begin();
2553 collect != indexCollectionCSC->end();
2556 for (std::vector<int>::iterator positionIt = (*collect).begin(); positionIt != (*collect).end();
2559 if (NumberOfCSCSegment == *positionIt)
2560 isNewChamber =
false;
2565 CSCDetId myChamber((*segmentCSC).geographicalId().rawId());
2567 if (myLayer.chamberId() == myChamber.chamberId()) {
2569 positionCSC.push_back(NumberOfCSCSegment);
2573 NumberOfCSCSegment++;
2578 indexCollectionDT->push_back(positionDT);
2579 indexCollectionCSC->push_back(positionCSC);