15 std::shared_ptr<GlobalCoordsObtainer> &globalcoordsobtainer)
16 : debug_(
pset.getUntrackedParameter<
bool>(
"debug")),
17 clean_chi2_correlation_(
pset.getParameter<
bool>(
"clean_chi2_correlation")),
18 useBX_correlation_(
pset.getParameter<
bool>(
"useBX_correlation")),
19 allow_confirmation_(
pset.getParameter<
bool>(
"allow_confirmation")),
20 dT0_correlate_TP_(
pset.getParameter<double>(
"dT0_correlate_TP")),
21 dBX_correlate_TP_(
pset.getParameter<
int>(
"dBX_correlate_TP")),
22 dTanPsi_correlate_TP_(
pset.getParameter<double>(
"dTanPsi_correlate_TP")),
23 minx_match_2digis_(
pset.getParameter<double>(
"minx_match_2digis")),
24 chi2corTh_(
pset.getParameter<double>(
"chi2corTh")) {
28 LogDebug(
"MuonPathAssociator") <<
"MuonPathAssociator: constructor";
39 while (ifin3.good()) {
50 LogDebug(
"MuonPathAssociator") <<
"MuonPathAssociator: destructor";
58 LogDebug(
"MuonPathAssociator") <<
"MuonPathAssociator::initialiase";
67 std::vector<metaPrimitive> &inMPaths,
68 std::vector<metaPrimitive> &outMPaths) {
72 outMPaths.insert(outMPaths.end(), inMPaths.begin(), inMPaths.end());
78 LogDebug(
"MuonPathAssociator") <<
"MuonPathAssociator: finish";
82 std::vector<metaPrimitive> &inMPaths,
83 std::vector<metaPrimitive> &outMPaths) {
85 LogDebug(
"MuonPathAssociator") <<
"starting correlation";
87 for (
int wh = -2; wh <= 2; wh++) {
88 for (
int st = 1; st <= 4; st++) {
89 for (
int se = 1; se <= 14; se++) {
90 if (se >= 13 && st != 4)
98 std::vector<metaPrimitive> SL1metaPrimitives;
99 for (
const auto &metaprimitiveIt : inMPaths) {
100 if (metaprimitiveIt.rawId == sl1Id.
rawId())
101 SL1metaPrimitives.push_back(metaprimitiveIt);
105 std::vector<metaPrimitive> SL3metaPrimitives;
106 for (
const auto &metaprimitiveIt : inMPaths) {
107 if (metaprimitiveIt.rawId == sl3Id.
rawId())
108 SL3metaPrimitives.push_back(metaprimitiveIt);
111 if (SL1metaPrimitives.empty() and SL3metaPrimitives.empty())
115 LogDebug(
"MuonPathAssociator") <<
"correlating " << SL1metaPrimitives.size() <<
" metaPrim in SL1 and " 116 << SL3metaPrimitives.size() <<
" in SL3 for " << sl3Id;
118 bool at_least_one_correlation =
false;
119 bool at_least_one_SL1_confirmation =
false;
120 bool at_least_one_SL3_confirmation =
false;
122 bool useFitSL1[SL1metaPrimitives.size()];
123 for (
unsigned int i = 0;
i < SL1metaPrimitives.size();
i++)
124 useFitSL1[
i] =
false;
125 bool useFitSL3[SL3metaPrimitives.size()];
126 for (
unsigned int i = 0;
i < SL3metaPrimitives.size();
i++)
127 useFitSL3[
i] =
false;
130 vector<metaPrimitive> chamberMetaPrimitives;
131 vector<metaPrimitive> confirmedMetaPrimitives;
132 vector<metaPrimitive> normalMetaPrimitives;
135 for (
auto SL1metaPrimitive = SL1metaPrimitives.begin(); SL1metaPrimitive != SL1metaPrimitives.end();
136 ++SL1metaPrimitive, sl1++, sl3 = -1) {
138 at_least_one_correlation =
false;
139 for (
auto SL3metaPrimitive = SL3metaPrimitives.begin(); SL3metaPrimitive != SL3metaPrimitives.end();
140 ++SL3metaPrimitive, sl3++) {
153 double NewSlope = -999.;
155 long int pos = (PosSL3 + PosSL1) / 2;
158 if (((PosSL3 + PosSL1) % 2 != 0) && (
pos < 0)) {
162 long int difPos_mm_x4 = PosSL3 - PosSL1;
168 double MeanT0 = (SL1metaPrimitive->t0 + SL3metaPrimitive->t0) / 2;
178 if (shift_sl1 < shift_sl3) {
183 int wi[8], tdc[8],
lat[8];
184 wi[0] = SL1metaPrimitive->wi1;
185 tdc[0] = SL1metaPrimitive->tdc1;
186 lat[0] = SL1metaPrimitive->lat1;
187 wi[1] = SL1metaPrimitive->wi2;
188 tdc[1] = SL1metaPrimitive->tdc2;
189 lat[1] = SL1metaPrimitive->lat2;
190 wi[2] = SL1metaPrimitive->wi3;
191 tdc[2] = SL1metaPrimitive->tdc3;
192 lat[2] = SL1metaPrimitive->lat3;
193 wi[3] = SL1metaPrimitive->wi4;
194 tdc[3] = SL1metaPrimitive->tdc4;
195 lat[3] = SL1metaPrimitive->lat4;
196 wi[4] = SL3metaPrimitive->wi1;
197 tdc[4] = SL3metaPrimitive->tdc1;
198 lat[4] = SL3metaPrimitive->lat1;
199 wi[5] = SL3metaPrimitive->wi2;
200 tdc[5] = SL3metaPrimitive->tdc2;
201 lat[5] = SL3metaPrimitive->lat2;
202 wi[6] = SL3metaPrimitive->wi3;
203 tdc[6] = SL3metaPrimitive->tdc3;
204 lat[6] = SL3metaPrimitive->lat3;
205 wi[7] = SL3metaPrimitive->wi4;
206 tdc[7] = SL3metaPrimitive->tdc4;
207 lat[7] = SL3metaPrimitive->lat4;
211 long int Z_FACTOR_CORR[8] = {-6, -2, 2, 6, -6, -2, 2, 6};
213 for (
int i = 0;
i < 8;
i++) {
214 int sign = 2 * (
i / 4) - 1;
217 long int sum_A, sum_B;
219 long int shift, slTime;
222 slTime = SL1metaPrimitive->t0;
225 slTime = SL3metaPrimitive->t0;
229 long int wireHorizPos_x4 =
234 pos_mm_x4 = wireHorizPos_x4 - (drift_dist_um_x4 >> 10);
236 pos_mm_x4 = wireHorizPos_x4 + (drift_dist_um_x4 >> 10);
241 chi2 += ((sum_A - sum_B) * (sum_A - sum_B)) >> 2;
251 useFitSL1[sl1] =
true;
252 useFitSL3[sl3] =
true;
255 if (SL3metaPrimitive->quality ==
LOWQ and SL1metaPrimitive->quality ==
LOWQ)
258 if ((SL3metaPrimitive->quality ==
HIGHQ && SL1metaPrimitive->quality ==
LOWQ)
or 259 (SL1metaPrimitive->quality ==
HIGHQ && SL3metaPrimitive->quality ==
LOWQ))
262 if (SL3metaPrimitive->quality ==
HIGHQ && SL1metaPrimitive->quality ==
HIGHQ)
267 double phi_cmssw = -999.;
268 double phiB_cmssw = -999.;
270 if (
ChId.station() >= 3)
274 int thisec =
ChId.sector();
279 phi_cmssw = jm_x_cmssw_global.
phi() -
PHI_CONV * (thisec - 1);
280 double psi = atan(NewSlope);
284 phi = global_coords[0];
285 phiB = global_coords[1];
288 outMPaths.emplace_back(
ChId.rawId(),
298 SL1metaPrimitive->wi1,
299 SL1metaPrimitive->tdc1,
300 SL1metaPrimitive->lat1,
301 SL1metaPrimitive->wi2,
302 SL1metaPrimitive->tdc2,
303 SL1metaPrimitive->lat2,
304 SL1metaPrimitive->wi3,
305 SL1metaPrimitive->tdc3,
306 SL1metaPrimitive->lat3,
307 SL1metaPrimitive->wi4,
308 SL1metaPrimitive->tdc4,
309 SL1metaPrimitive->lat4,
310 SL3metaPrimitive->wi1,
311 SL3metaPrimitive->tdc1,
312 SL3metaPrimitive->lat1,
313 SL3metaPrimitive->wi2,
314 SL3metaPrimitive->tdc2,
315 SL3metaPrimitive->lat2,
316 SL3metaPrimitive->wi3,
317 SL3metaPrimitive->tdc3,
318 SL3metaPrimitive->lat3,
319 SL3metaPrimitive->wi4,
320 SL3metaPrimitive->tdc4,
321 SL3metaPrimitive->lat4);
323 chamberMetaPrimitives.emplace_back(
ChId.rawId(),
333 SL1metaPrimitive->wi1,
334 SL1metaPrimitive->tdc1,
335 SL1metaPrimitive->lat1,
336 SL1metaPrimitive->wi2,
337 SL1metaPrimitive->tdc2,
338 SL1metaPrimitive->lat2,
339 SL1metaPrimitive->wi3,
340 SL1metaPrimitive->tdc3,
341 SL1metaPrimitive->lat3,
342 SL1metaPrimitive->wi4,
343 SL1metaPrimitive->tdc4,
344 SL1metaPrimitive->lat4,
345 SL3metaPrimitive->wi1,
346 SL3metaPrimitive->tdc1,
347 SL3metaPrimitive->lat1,
348 SL3metaPrimitive->wi2,
349 SL3metaPrimitive->tdc2,
350 SL3metaPrimitive->lat2,
351 SL3metaPrimitive->wi3,
352 SL3metaPrimitive->tdc3,
353 SL3metaPrimitive->lat3,
354 SL3metaPrimitive->wi4,
355 SL3metaPrimitive->tdc4,
356 SL3metaPrimitive->lat4);
358 at_least_one_correlation =
true;
361 if (at_least_one_correlation ==
false &&
363 int matched_digis = 0;
375 for (
const auto &dtLayerId_It : *dtdigis) {
376 const DTLayerId dtLId = dtLayerId_It.first;
379 if (dtSLId.rawId() != sl3Id.
rawId())
382 if (dtLId.
layer() == 4)
384 else if (dtLId.
layer() == 3)
386 else if (dtLId.
layer() == 2)
388 else if (dtLId.
layer() == 1)
390 double x_inSL3 = SL1metaPrimitive->x - SL1metaPrimitive->tanPhi * (
VERT_PHI1_PHI3 + l_shift);
391 for (
auto digiIt = (dtLayerId_It.second).first; digiIt != (dtLayerId_It.second).
second; ++digiIt) {
392 DTWireId wireId(dtLId, (*digiIt).wire());
393 if ((*digiIt).time() < SL1metaPrimitive->t0)
401 x_wire = x_wire_left;
404 if (
std::abs(x_inSL3 - x_wire) < minx) {
409 if (dtLId.
layer() != best_layer) {
411 next_wire = best_wire;
413 next_layer = best_layer;
416 best_wire = (*digiIt).wire();
417 best_tdc = (*digiIt).time();
418 best_layer = dtLId.
layer();
421 }
else if (dtLId.
layer() ==
423 best_wire = (*digiIt).wire();
424 best_tdc = (*digiIt).time();
425 best_layer = dtLId.
layer();
428 }
else if ((
std::abs(x_inSL3 - x_wire) >= minx) && (
std::abs(x_inSL3 - x_wire) < min2x)) {
430 if (dtLId.
layer() == best_layer)
436 else if (dtLId.
layer() != next_layer)
441 next_wire = (*digiIt).wire();
442 next_tdc = (*digiIt).time();
443 next_layer = dtLId.
layer();
448 if (matched_digis >= 2 and best_layer != -1 and next_layer != -1) {
450 if (SL1metaPrimitive->quality ==
LOWQ)
466 if (next_layer == 1) {
471 if (next_layer == 2) {
476 if (next_layer == 3) {
481 if (next_layer == 4) {
487 if (best_layer == 1) {
492 if (best_layer == 2) {
497 if (best_layer == 3) {
502 if (best_layer == 4) {
510 SL1metaPrimitive->t0,
512 SL1metaPrimitive->tanPhi,
513 SL1metaPrimitive->phi,
514 SL1metaPrimitive->phiB,
515 SL1metaPrimitive->phi_cmssw,
516 SL1metaPrimitive->phiB_cmssw,
517 SL1metaPrimitive->chi2,
519 SL1metaPrimitive->wi1,
520 SL1metaPrimitive->tdc1,
521 SL1metaPrimitive->lat1,
522 SL1metaPrimitive->wi2,
523 SL1metaPrimitive->tdc2,
524 SL1metaPrimitive->lat2,
525 SL1metaPrimitive->wi3,
526 SL1metaPrimitive->tdc3,
527 SL1metaPrimitive->lat3,
528 SL1metaPrimitive->wi4,
529 SL1metaPrimitive->tdc4,
530 SL1metaPrimitive->lat4,
546 SL1metaPrimitive->t0,
548 SL1metaPrimitive->tanPhi,
549 SL1metaPrimitive->phi,
550 SL1metaPrimitive->phiB,
551 SL1metaPrimitive->phi_cmssw,
552 SL1metaPrimitive->phiB_cmssw,
553 SL1metaPrimitive->chi2,
555 SL1metaPrimitive->wi1,
556 SL1metaPrimitive->tdc1,
557 SL1metaPrimitive->lat1,
558 SL1metaPrimitive->wi2,
559 SL1metaPrimitive->tdc2,
560 SL1metaPrimitive->lat2,
561 SL1metaPrimitive->wi3,
562 SL1metaPrimitive->tdc3,
563 SL1metaPrimitive->lat3,
564 SL1metaPrimitive->wi4,
565 SL1metaPrimitive->tdc4,
566 SL1metaPrimitive->lat4,
580 useFitSL1[sl1] =
true;
581 at_least_one_SL1_confirmation =
true;
590 for (
auto SL3metaPrimitive = SL3metaPrimitives.begin(); SL3metaPrimitive != SL3metaPrimitives.end();
591 ++SL3metaPrimitive, sl3++) {
597 int matched_digis = 0;
610 for (
const auto &dtLayerId_It : *dtdigis) {
611 const DTLayerId dtLId = dtLayerId_It.first;
614 if (dtSLId.rawId() != sl1Id.
rawId())
617 if (dtLId.
layer() == 4)
619 if (dtLId.
layer() == 3)
621 if (dtLId.
layer() == 2)
623 if (dtLId.
layer() == 1)
625 double x_inSL1 = SL3metaPrimitive->x + SL3metaPrimitive->tanPhi * (
VERT_PHI1_PHI3 - l_shift);
626 for (
auto digiIt = (dtLayerId_It.second).first; digiIt != (dtLayerId_It.second).
second; ++digiIt) {
627 DTWireId wireId(dtLId, (*digiIt).wire());
628 if ((*digiIt).time() < SL3metaPrimitive->t0)
636 x_wire = x_wire_left;
639 if (
std::abs(x_inSL1 - x_wire) < minx) {
644 if (dtLId.
layer() != best_layer) {
646 next_wire = best_wire;
648 next_layer = best_layer;
651 best_wire = (*digiIt).wire();
652 best_tdc = (*digiIt).time();
653 best_layer = dtLId.
layer();
656 }
else if (dtLId.
layer() ==
658 best_wire = (*digiIt).wire();
659 best_tdc = (*digiIt).time();
660 best_layer = dtLId.
layer();
663 }
else if ((
std::abs(x_inSL1 - x_wire) >= minx) && (
std::abs(x_inSL1 - x_wire) < min2x)) {
665 if (dtLId.
layer() == best_layer)
671 else if (dtLId.
layer() != next_layer)
676 next_wire = (*digiIt).wire();
677 next_tdc = (*digiIt).time();
678 next_layer = dtLId.
layer();
683 if (matched_digis >= 2 and best_layer != -1 and next_layer != -1) {
685 if (SL3metaPrimitive->quality ==
LOWQ)
701 if (next_layer == 1) {
706 if (next_layer == 2) {
711 if (next_layer == 3) {
716 if (next_layer == 4) {
722 if (best_layer == 1) {
727 if (best_layer == 2) {
732 if (best_layer == 3) {
737 if (best_layer == 4) {
745 SL3metaPrimitive->t0,
747 SL3metaPrimitive->tanPhi,
748 SL3metaPrimitive->phi,
749 SL3metaPrimitive->phiB,
750 SL3metaPrimitive->phi_cmssw,
751 SL3metaPrimitive->phiB_cmssw,
752 SL3metaPrimitive->chi2,
766 SL3metaPrimitive->wi1,
767 SL3metaPrimitive->tdc1,
768 SL3metaPrimitive->lat1,
769 SL3metaPrimitive->wi2,
770 SL3metaPrimitive->tdc2,
771 SL3metaPrimitive->lat2,
772 SL3metaPrimitive->wi3,
773 SL3metaPrimitive->tdc3,
774 SL3metaPrimitive->lat3,
775 SL3metaPrimitive->wi4,
776 SL3metaPrimitive->tdc4,
777 SL3metaPrimitive->lat4,
781 SL3metaPrimitive->t0,
783 SL3metaPrimitive->tanPhi,
784 SL3metaPrimitive->phi,
785 SL3metaPrimitive->phiB,
786 SL3metaPrimitive->phi_cmssw,
787 SL3metaPrimitive->phiB_cmssw,
788 SL3metaPrimitive->chi2,
802 SL3metaPrimitive->wi1,
803 SL3metaPrimitive->tdc1,
804 SL3metaPrimitive->lat1,
805 SL3metaPrimitive->wi2,
806 SL3metaPrimitive->tdc2,
807 SL3metaPrimitive->lat2,
808 SL3metaPrimitive->wi3,
809 SL3metaPrimitive->tdc3,
810 SL3metaPrimitive->lat3,
811 SL3metaPrimitive->wi4,
812 SL3metaPrimitive->tdc4,
813 SL3metaPrimitive->lat4,
815 useFitSL3[sl3] =
true;
816 at_least_one_SL3_confirmation =
true;
823 LogDebug(
"MuonPathAssociator") <<
"Pushing back correlated MPs to the MPs collection";
828 LogDebug(
"MuonPathAssociator") <<
"Pushing back confirmed MPs to the complete vector";
834 if (
debug_ && !at_least_one_correlation)
836 <<
"correlation we found zero correlations, adding both collections as they are to the outMPaths";
839 <<
"correlation sizes:" << SL1metaPrimitives.size() <<
" " << SL3metaPrimitives.size();
842 for (
auto SL1metaPrimitive = SL1metaPrimitives.begin(); SL1metaPrimitive != SL1metaPrimitives.end();
843 ++SL1metaPrimitive, sl1++) {
850 SL1metaPrimitive->t0,
852 SL1metaPrimitive->tanPhi,
853 SL1metaPrimitive->phi,
854 SL1metaPrimitive->phiB,
855 SL1metaPrimitive->phi_cmssw,
856 SL1metaPrimitive->phiB_cmssw,
857 SL1metaPrimitive->chi2,
858 SL1metaPrimitive->quality,
859 SL1metaPrimitive->wi1,
860 SL1metaPrimitive->tdc1,
861 SL1metaPrimitive->lat1,
862 SL1metaPrimitive->wi2,
863 SL1metaPrimitive->tdc2,
864 SL1metaPrimitive->lat2,
865 SL1metaPrimitive->wi3,
866 SL1metaPrimitive->tdc3,
867 SL1metaPrimitive->lat3,
868 SL1metaPrimitive->wi4,
869 SL1metaPrimitive->tdc4,
870 SL1metaPrimitive->lat4,
896 outMPaths.push_back(newSL1metaPrimitive);
898 normalMetaPrimitives.push_back(newSL1metaPrimitive);
903 for (
auto SL3metaPrimitive = SL3metaPrimitives.begin(); SL3metaPrimitive != SL3metaPrimitives.end();
904 ++SL3metaPrimitive, sl3++) {
910 SL3metaPrimitive->t0,
912 SL3metaPrimitive->tanPhi,
913 SL3metaPrimitive->phi,
914 SL3metaPrimitive->phiB,
915 SL3metaPrimitive->phi_cmssw,
916 SL3metaPrimitive->phiB_cmssw,
917 SL3metaPrimitive->chi2,
918 SL3metaPrimitive->quality,
931 SL3metaPrimitive->wi1,
932 SL3metaPrimitive->tdc1,
933 SL3metaPrimitive->lat1,
934 SL3metaPrimitive->wi2,
935 SL3metaPrimitive->tdc2,
936 SL3metaPrimitive->lat2,
937 SL3metaPrimitive->wi3,
938 SL3metaPrimitive->tdc3,
939 SL3metaPrimitive->lat3,
940 SL3metaPrimitive->wi4,
941 SL3metaPrimitive->tdc4,
942 SL3metaPrimitive->lat4,
946 outMPaths.push_back(newSL3metaPrimitive);
948 normalMetaPrimitives.push_back(newSL3metaPrimitive);
953 SL1metaPrimitives.clear();
954 SL1metaPrimitives.erase(SL1metaPrimitives.begin(), SL1metaPrimitives.end());
955 SL3metaPrimitives.clear();
956 SL3metaPrimitives.erase(SL3metaPrimitives.begin(), SL3metaPrimitives.end());
958 vector<metaPrimitive> auxMetaPrimitives;
961 LogDebug(
"MuonPathAssociator") <<
"Pushing back normal MPs to the auxiliar vector";
962 removeSharingHits(normalMetaPrimitives, confirmedMetaPrimitives, auxMetaPrimitives);
966 LogDebug(
"MuonPathAssociator") <<
"Pushing back normal MPs to the MPs collection";
974 std::vector<metaPrimitive> SL2metaPrimitives;
976 for (
int wh = -2; wh <= 2; wh++) {
977 for (
int st = 1; st <= 4; st++) {
978 for (
int se = 1; se <= 14; se++) {
979 if (se >= 13 && st != 4)
986 for (
auto metaprimitiveIt = inMPaths.begin(); metaprimitiveIt != inMPaths.end(); ++metaprimitiveIt)
987 if (metaprimitiveIt->rawId == sl2Id.
rawId()) {
988 SL2metaPrimitives.push_back(*metaprimitiveIt);
991 outMPaths.push_back(*metaprimitiveIt);
997 LogDebug(
"MuonPathAssociator") <<
"\t etaTP: added " << SL2metaPrimitives.size() <<
"to outMPaths" << std::endl;
999 SL2metaPrimitives.clear();
1000 SL2metaPrimitives.erase(SL2metaPrimitives.begin(), SL2metaPrimitives.end());
1004 bool useFit[chamberMPaths.size()];
1005 for (
unsigned int i = 0;
i < chamberMPaths.size();
i++) {
1008 for (
unsigned int i = 0;
i < chamberMPaths.size();
i++) {
1010 LogDebug(
"MuonPathAssociator") <<
"Looking at prim" <<
i;
1013 for (
unsigned int j =
i + 1;
j < chamberMPaths.size();
j++) {
1015 LogDebug(
"MuonPathAssociator") <<
"Comparing with prim " <<
j;
1038 allMPaths.push_back(chamberMPaths[
i]);
1042 LogDebug(
"MuonPathAssociator") <<
"---Swapping chamber---";
1046 std::vector<metaPrimitive> &secondMPaths,
1047 std::vector<metaPrimitive> &allMPaths) {
1048 for (
auto &firstMP : firstMPaths) {
1050 LogDebug(
"MuonPathAssociator") <<
"----------------------------------";
1052 LogDebug(
"MuonPathAssociator") <<
"Turn for ";
1056 for (
auto &secondMP : secondMPaths) {
1058 LogDebug(
"MuonPathAssociator") <<
"Comparing with ";
1067 allMPaths.push_back(firstMP);
1072 LogDebug(
"MuonPathAssociator") <<
"----------------------------------";
1086 if (lay1 && lay2 && lay3 && lay4) {
1087 if (lay5 || lay6 || lay7 || lay8)
1091 }
else if (lay5 && lay6 && lay7 && lay8) {
1092 if (lay1 || lay2 || lay3 || lay4)
1113 return (((!lay1 && !lay2 && !lay3 && !lay4) || hitsSL1 < 3) && ((!lay5 && !lay6 && !lay7 && !lay8) || hitsSL3 < 3));
1119 <<
" " << setw(2) << left << mP.
wi1 <<
" " << setw(2) << left << mP.
wi2 <<
" " 1120 << setw(2) << left << mP.
wi3 <<
" " << setw(2) << left << mP.
wi4 <<
" " << setw(2)
1121 << left << mP.
wi5 <<
" " << setw(2) << left << mP.
wi6 <<
" " << setw(2) << left
1122 << mP.
wi7 <<
" " << setw(2) << left << mP.
wi8 <<
" " << setw(5) << left << mP.
tdc1 1123 <<
" " << setw(5) << left << mP.
tdc2 <<
" " << setw(5) << left << mP.
tdc3 <<
" " 1124 << setw(5) << left << mP.
tdc4 <<
" " << setw(5) << left << mP.
tdc5 <<
" " << setw(5)
1125 << left << mP.
tdc6 <<
" " << setw(5) << left << mP.
tdc7 <<
" " << setw(5) << left
1126 << mP.
tdc8 <<
" " << setw(2) << left << mP.
lat1 <<
" " << setw(2) << left << mP.
lat2 1127 <<
" " << setw(2) << left << mP.
lat3 <<
" " << setw(2) << left << mP.
lat4 <<
" " 1128 << setw(2) << left << mP.
lat5 <<
" " << setw(2) << left << mP.
lat6 <<
" " << setw(2)
1129 << left << mP.
lat7 <<
" " << setw(2) << left << mP.
lat8 <<
" " << setw(10) << right
1130 << mP.
x <<
" " << setw(9) << left << mP.
tanPhi <<
" " << setw(5) << left << mP.
t0 1131 <<
" " << setw(13) << left << mP.
chi2 <<
" \n";
bool isNotAPrimo(cmsdt::metaPrimitive first, cmsdt::metaPrimitive second)
int station() const
Return the station number.
constexpr int CH_CENTER_TO_MID_SL_X2
Point3DBase< Scalar, LocalTag > LocalPoint
int superLayer() const
Return the superlayer number.
constexpr int DRIFT_SPEED_X4
void correlateMPaths(edm::Handle< DTDigiCollection > digis, std::vector< cmsdt::metaPrimitive > &inMPaths, std::vector< cmsdt::metaPrimitive > &outMPaths)
std::string fullPath() const
Geom::Phi< T > phi() const
double dTanPsi_correlate_TP_
std::map< int, float > shiftinfo_
edm::FileInPath shift_filename_
void run(edm::Event &iEvent, const edm::EventSetup &iEventSetup, edm::Handle< DTDigiCollection > digis, std::vector< cmsdt::metaPrimitive > &inMPaths, std::vector< cmsdt::metaPrimitive > &outMPaths)
constexpr int VERT_PHI1_PHI3_INV
std::map< std::string, int, std::less< std::string > > psi
std::shared_ptr< GlobalCoordsObtainer > globalcoordsobtainer_
constexpr int CELL_LENGTH
constexpr int CELL_SEMILENGTH
U second(std::pair< T, U > const &p)
void removeSharingHits(std::vector< cmsdt::metaPrimitive > &firstMPaths, std::vector< cmsdt::metaPrimitive > &secondMPaths, std::vector< cmsdt::metaPrimitive > &allMPaths)
constexpr int INCREASED_RES_SLOPE_POW
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
constexpr float Z_SHIFT_MB4
Abs< T >::type abs(const T &t)
constexpr int CELL_HEIGHT
constexpr double X_POS_L4
void printmPC(cmsdt::metaPrimitive mP)
bool clean_chi2_correlation_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
constexpr double PHI_CONV
constexpr uint32_t rawId() const
get the raw id
constexpr int NUM_LAYERS_2SL
constexpr float VERT_PHI1_PHI3
bool shareFit(cmsdt::metaPrimitive first, cmsdt::metaPrimitive second)
constexpr int LHC_CLK_FREQ
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomH_
int layer() const
Return the layer number.
void initialise(const edm::EventSetup &iEventSetup)
bool hasPosRF(int wh, int sec)
int wheel() const
Return the wheel number.
static unsigned int const shift
double minx_match_2digis_
DTGeometry const * dtGeo_
constexpr int INCREASED_RES_POS_POW
void removeSharingFits(std::vector< cmsdt::metaPrimitive > &chamberMPaths, std::vector< cmsdt::metaPrimitive > &allMPaths)
MuonPathAssociator(const edm::ParameterSet &pset, edm::ConsumesCollector &iC, std::shared_ptr< GlobalCoordsObtainer > &globalcoordsobtainer)
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
Power< A, B >::type pow(const A &a, const B &b)
constexpr float DRIFT_SPEED
constexpr double X_POS_L3
constexpr int INCREASED_RES_POS