15 std::shared_ptr<GlobalCoordsObtainer> &globalcoordsobtainer) {
17 debug_ =
pset.getUntrackedParameter<
bool>(
"debug");
18 clean_chi2_correlation_ =
pset.getUntrackedParameter<
bool>(
"clean_chi2_correlation");
19 useBX_correlation_ =
pset.getUntrackedParameter<
bool>(
"useBX_correlation");
20 allow_confirmation_ =
pset.getUntrackedParameter<
bool>(
"allow_confirmation");
21 dT0_correlate_TP_ =
pset.getUntrackedParameter<
double>(
"dT0_correlate_TP");
22 dBX_correlate_TP_ =
pset.getUntrackedParameter<
int>(
"dBX_correlate_TP");
23 dTanPsi_correlate_TP_ =
pset.getUntrackedParameter<
double>(
"dTanPsi_correlate_TP");
24 minx_match_2digis_ =
pset.getUntrackedParameter<
double>(
"minx_match_2digis");
25 chi2corTh_ =
pset.getUntrackedParameter<
double>(
"chi2corTh");
26 cmssw_for_global_ =
pset.getUntrackedParameter<
bool>(
"cmssw_for_global");
27 geometry_tag_ =
pset.getUntrackedParameter<
std::string>(
"geometry_tag");
30 LogDebug(
"MuonPathAssociator") <<
"MuonPathAssociator: constructor";
35 std::ifstream ifin3(shift_filename_.fullPath());
39 <<
"MuonPathAnalyzerPerSL::MuonPathAnalyzerPerSL() - Cannot find " << shift_filename_.fullPath();
41 while (ifin3.good()) {
42 ifin3 >> rawId >>
shift;
43 shiftinfo_[rawId] =
shift;
47 globalcoordsobtainer_ = globalcoordsobtainer;
52 LogDebug(
"MuonPathAssociator") <<
"MuonPathAssociator: destructor";
60 LogDebug(
"MuonPathAssociator") <<
"MuonPathAssociator::initialiase";
70 std::vector<metaPrimitive> &inMPaths,
71 std::vector<metaPrimitive> &outMPaths) {
72 if (dT0_correlate_TP_)
73 correlateMPaths(digis, inMPaths, outMPaths);
75 outMPaths.insert(outMPaths.end(), inMPaths.begin(), inMPaths.end());
81 LogDebug(
"MuonPathAssociator") <<
"MuonPathAssociator: finish";
85 std::vector<metaPrimitive> &inMPaths,
86 std::vector<metaPrimitive> &outMPaths) {
88 LogDebug(
"MuonPathAssociator") <<
"starting correlation";
90 for (
int wh = -2; wh <= 2; wh++) {
91 for (
int st = 1; st <= 4; st++) {
92 for (
int se = 1; se <= 14; se++) {
93 if (se >= 13 && st != 4)
101 std::vector<metaPrimitive> SL1metaPrimitives;
102 for (
const auto &metaprimitiveIt : inMPaths) {
103 if (metaprimitiveIt.rawId == sl1Id.
rawId())
104 SL1metaPrimitives.push_back(metaprimitiveIt);
108 std::vector<metaPrimitive> SL3metaPrimitives;
109 for (
const auto &metaprimitiveIt : inMPaths) {
110 if (metaprimitiveIt.rawId == sl3Id.
rawId())
111 SL3metaPrimitives.push_back(metaprimitiveIt);
114 if (SL1metaPrimitives.empty() and SL3metaPrimitives.empty())
118 LogDebug(
"MuonPathAssociator") <<
"correlating " << SL1metaPrimitives.size() <<
" metaPrim in SL1 and "
119 << SL3metaPrimitives.size() <<
" in SL3 for " << sl3Id;
121 bool at_least_one_correlation =
false;
122 bool at_least_one_SL1_confirmation =
false;
123 bool at_least_one_SL3_confirmation =
false;
125 bool useFitSL1[SL1metaPrimitives.size()];
126 for (
unsigned int i = 0;
i < SL1metaPrimitives.size();
i++)
127 useFitSL1[
i] =
false;
128 bool useFitSL3[SL3metaPrimitives.size()];
129 for (
unsigned int i = 0;
i < SL3metaPrimitives.size();
i++)
130 useFitSL3[
i] =
false;
133 vector<metaPrimitive> chamberMetaPrimitives;
134 vector<metaPrimitive> confirmedMetaPrimitives;
135 vector<metaPrimitive> normalMetaPrimitives;
138 for (
auto SL1metaPrimitive = SL1metaPrimitives.begin(); SL1metaPrimitive != SL1metaPrimitives.end();
139 ++SL1metaPrimitive, sl1++, sl3 = -1) {
140 if (clean_chi2_correlation_)
141 at_least_one_correlation =
false;
142 for (
auto SL3metaPrimitive = SL3metaPrimitives.begin(); SL3metaPrimitive != SL3metaPrimitives.end();
143 ++SL3metaPrimitive, sl3++) {
144 if (
std::abs(SL1metaPrimitive->tanPhi - SL3metaPrimitive->tanPhi) > dTanPsi_correlate_TP_)
146 if (useBX_correlation_) {
148 round(SL3metaPrimitive->t0 / (
float)
LHC_CLK_FREQ)) > dBX_correlate_TP_)
151 if (
std::abs(SL1metaPrimitive->t0 - SL3metaPrimitive->t0) >= dT0_correlate_TP_)
156 double NewSlope = -999.;
158 long int pos = (PosSL3 + PosSL1) / 2;
161 if (((PosSL3 + PosSL1) % 2 != 0) && (
pos < 0)) {
165 long int difPos_mm_x4 = PosSL3 - PosSL1;
171 double MeanT0 = (SL1metaPrimitive->t0 + SL3metaPrimitive->t0) / 2;
181 if (shift_sl1 < shift_sl3) {
186 int wi[8], tdc[8], lat[8];
187 wi[0] = SL1metaPrimitive->wi1;
188 tdc[0] = SL1metaPrimitive->tdc1;
189 lat[0] = SL1metaPrimitive->lat1;
190 wi[1] = SL1metaPrimitive->wi2;
191 tdc[1] = SL1metaPrimitive->tdc2;
192 lat[1] = SL1metaPrimitive->lat2;
193 wi[2] = SL1metaPrimitive->wi3;
194 tdc[2] = SL1metaPrimitive->tdc3;
195 lat[2] = SL1metaPrimitive->lat3;
196 wi[3] = SL1metaPrimitive->wi4;
197 tdc[3] = SL1metaPrimitive->tdc4;
198 lat[3] = SL1metaPrimitive->lat4;
199 wi[4] = SL3metaPrimitive->wi1;
200 tdc[4] = SL3metaPrimitive->tdc1;
201 lat[4] = SL3metaPrimitive->lat1;
202 wi[5] = SL3metaPrimitive->wi2;
203 tdc[5] = SL3metaPrimitive->tdc2;
204 lat[5] = SL3metaPrimitive->lat2;
205 wi[6] = SL3metaPrimitive->wi3;
206 tdc[6] = SL3metaPrimitive->tdc3;
207 lat[6] = SL3metaPrimitive->lat3;
208 wi[7] = SL3metaPrimitive->wi4;
209 tdc[7] = SL3metaPrimitive->tdc4;
210 lat[7] = SL3metaPrimitive->lat4;
214 long int Z_FACTOR_CORR[8] = {-6, -2, 2, 6, -6, -2, 2, 6};
216 for (
int i = 0;
i < 8;
i++) {
217 int sign = 2 * (
i / 4) - 1;
220 long int sum_A, sum_B;
222 long int shift, slTime;
225 slTime = SL1metaPrimitive->t0;
228 slTime = SL3metaPrimitive->t0;
232 long int wireHorizPos_x4 =
237 pos_mm_x4 = wireHorizPos_x4 - (drift_dist_um_x4 >> 10);
239 pos_mm_x4 = wireHorizPos_x4 + (drift_dist_um_x4 >> 10);
244 chi2 += ((sum_A - sum_B) * (sum_A - sum_B)) >> 2;
250 if (newChi2 > chi2corTh_)
254 useFitSL1[sl1] =
true;
255 useFitSL3[sl3] =
true;
258 if (SL3metaPrimitive->quality ==
LOWQ and SL1metaPrimitive->quality ==
LOWQ)
261 if ((SL3metaPrimitive->quality ==
HIGHQ && SL1metaPrimitive->quality ==
LOWQ)
or
262 (SL1metaPrimitive->quality ==
HIGHQ && SL3metaPrimitive->quality ==
LOWQ))
265 if (SL3metaPrimitive->quality ==
HIGHQ && SL1metaPrimitive->quality ==
HIGHQ)
270 if (cmssw_for_global_) {
272 if (
ChId.station() >= 3)
276 int thisec =
ChId.sector();
281 phi = jm_x_cmssw_global.
phi() -
PHI_CONV * (thisec - 1);
282 double psi = atan(NewSlope);
283 phiB = hasPosRF(
ChId.wheel(),
ChId.sector()) ?
psi - phi : -
psi - phi;
285 auto global_coords = globalcoordsobtainer_->get_global_coordinates(
ChId.rawId(), 0,
pos, tanpsi);
287 phi = global_coords[0];
288 phiB = global_coords[1];
291 if (!clean_chi2_correlation_)
292 outMPaths.emplace_back(
ChId.rawId(),
300 SL1metaPrimitive->wi1,
301 SL1metaPrimitive->tdc1,
302 SL1metaPrimitive->lat1,
303 SL1metaPrimitive->wi2,
304 SL1metaPrimitive->tdc2,
305 SL1metaPrimitive->lat2,
306 SL1metaPrimitive->wi3,
307 SL1metaPrimitive->tdc3,
308 SL1metaPrimitive->lat3,
309 SL1metaPrimitive->wi4,
310 SL1metaPrimitive->tdc4,
311 SL1metaPrimitive->lat4,
312 SL3metaPrimitive->wi1,
313 SL3metaPrimitive->tdc1,
314 SL3metaPrimitive->lat1,
315 SL3metaPrimitive->wi2,
316 SL3metaPrimitive->tdc2,
317 SL3metaPrimitive->lat2,
318 SL3metaPrimitive->wi3,
319 SL3metaPrimitive->tdc3,
320 SL3metaPrimitive->lat3,
321 SL3metaPrimitive->wi4,
322 SL3metaPrimitive->tdc4,
323 SL3metaPrimitive->lat4);
325 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 &&
362 allow_confirmation_ ==
true) {
363 int matched_digis = 0;
364 double minx = minx_match_2digis_;
365 double min2x = minx_match_2digis_;
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());
394 shiftinfo_[wireId.rawId()] + ((*digiIt).time() - SL1metaPrimitive->t0) *
DRIFT_SPEED / 10.;
396 shiftinfo_[wireId.rawId()] - ((*digiIt).time() - SL1metaPrimitive->t0) *
DRIFT_SPEED / 10.;
399 x_wire = x_wire_left;
402 if (
std::abs(x_inSL3 - x_wire) < minx) {
405 next_wire = best_wire;
407 next_layer = best_layer;
410 best_wire = (*digiIt).wire();
411 best_tdc = (*digiIt).time();
412 best_layer = dtLId.
layer();
415 }
else if ((
std::abs(x_inSL3 - x_wire) >= minx) && (
std::abs(x_inSL3 - x_wire) < min2x)) {
417 next_wire = (*digiIt).wire();
418 next_tdc = (*digiIt).time();
419 next_layer = dtLId.
layer();
425 if (matched_digis >= 2 and best_layer != -1 and next_layer != -1) {
427 if (SL1metaPrimitive->quality ==
LOWQ)
443 if (next_layer == 1) {
448 if (next_layer == 2) {
453 if (next_layer == 3) {
458 if (next_layer == 4) {
464 if (best_layer == 1) {
469 if (best_layer == 2) {
474 if (best_layer == 3) {
479 if (best_layer == 4) {
485 if (!clean_chi2_correlation_)
487 SL1metaPrimitive->t0,
489 SL1metaPrimitive->tanPhi,
490 SL1metaPrimitive->phi,
491 SL1metaPrimitive->phiB,
492 SL1metaPrimitive->chi2,
494 SL1metaPrimitive->wi1,
495 SL1metaPrimitive->tdc1,
496 SL1metaPrimitive->lat1,
497 SL1metaPrimitive->wi2,
498 SL1metaPrimitive->tdc2,
499 SL1metaPrimitive->lat2,
500 SL1metaPrimitive->wi3,
501 SL1metaPrimitive->tdc3,
502 SL1metaPrimitive->lat3,
503 SL1metaPrimitive->wi4,
504 SL1metaPrimitive->tdc4,
505 SL1metaPrimitive->lat4,
521 SL1metaPrimitive->t0,
523 SL1metaPrimitive->tanPhi,
524 SL1metaPrimitive->phi,
525 SL1metaPrimitive->phiB,
526 SL1metaPrimitive->chi2,
528 SL1metaPrimitive->wi1,
529 SL1metaPrimitive->tdc1,
530 SL1metaPrimitive->lat1,
531 SL1metaPrimitive->wi2,
532 SL1metaPrimitive->tdc2,
533 SL1metaPrimitive->lat2,
534 SL1metaPrimitive->wi3,
535 SL1metaPrimitive->tdc3,
536 SL1metaPrimitive->lat3,
537 SL1metaPrimitive->wi4,
538 SL1metaPrimitive->tdc4,
539 SL1metaPrimitive->lat4,
553 useFitSL1[sl1] =
true;
554 at_least_one_SL1_confirmation =
true;
563 for (
auto SL3metaPrimitive = SL3metaPrimitives.begin(); SL3metaPrimitive != SL3metaPrimitives.end();
564 ++SL3metaPrimitive, sl3++) {
567 if ((at_least_one_correlation ==
false || clean_chi2_correlation_) &&
568 allow_confirmation_) {
570 int matched_digis = 0;
571 double minx = minx_match_2digis_;
572 double min2x = minx_match_2digis_;
583 for (
const auto &dtLayerId_It : *dtdigis) {
584 const DTLayerId dtLId = dtLayerId_It.first;
587 if (dtSLId.rawId() != sl1Id.
rawId())
590 if (dtLId.
layer() == 4)
592 if (dtLId.
layer() == 3)
594 if (dtLId.
layer() == 2)
596 if (dtLId.
layer() == 1)
598 double x_inSL1 = SL3metaPrimitive->x + SL3metaPrimitive->tanPhi * (
VERT_PHI1_PHI3 - l_shift);
599 for (
auto digiIt = (dtLayerId_It.second).first; digiIt != (dtLayerId_It.second).
second; ++digiIt) {
600 DTWireId wireId(dtLId, (*digiIt).wire());
602 shiftinfo_[wireId.rawId()] + ((*digiIt).time() - SL3metaPrimitive->t0) *
DRIFT_SPEED / 10.;
604 shiftinfo_[wireId.rawId()] - ((*digiIt).time() - SL3metaPrimitive->t0) *
DRIFT_SPEED / 10.;
607 x_wire = x_wire_left;
610 if (
std::abs(x_inSL1 - x_wire) < minx) {
612 next_wire = best_wire;
614 next_layer = best_layer;
617 best_wire = (*digiIt).wire();
618 best_tdc = (*digiIt).time();
619 best_layer = dtLId.
layer();
622 }
else if ((
std::abs(x_inSL1 - x_wire) >= minx) && (
std::abs(x_inSL1 - x_wire) < min2x)) {
624 next_wire = (*digiIt).wire();
625 next_tdc = (*digiIt).time();
626 next_layer = dtLId.
layer();
632 if (matched_digis >= 2 and best_layer != -1 and next_layer != -1) {
634 if (SL3metaPrimitive->quality ==
LOWQ)
650 if (next_layer == 1) {
655 if (next_layer == 2) {
660 if (next_layer == 3) {
665 if (next_layer == 4) {
671 if (best_layer == 1) {
676 if (best_layer == 2) {
681 if (best_layer == 3) {
686 if (best_layer == 4) {
692 if (!clean_chi2_correlation_)
694 SL3metaPrimitive->t0,
696 SL3metaPrimitive->tanPhi,
697 SL3metaPrimitive->phi,
698 SL3metaPrimitive->phiB,
699 SL3metaPrimitive->chi2,
713 SL3metaPrimitive->wi1,
714 SL3metaPrimitive->tdc1,
715 SL3metaPrimitive->lat1,
716 SL3metaPrimitive->wi2,
717 SL3metaPrimitive->tdc2,
718 SL3metaPrimitive->lat2,
719 SL3metaPrimitive->wi3,
720 SL3metaPrimitive->tdc3,
721 SL3metaPrimitive->lat3,
722 SL3metaPrimitive->wi4,
723 SL3metaPrimitive->tdc4,
724 SL3metaPrimitive->lat4,
728 SL3metaPrimitive->t0,
730 SL3metaPrimitive->tanPhi,
731 SL3metaPrimitive->phi,
732 SL3metaPrimitive->phiB,
733 SL3metaPrimitive->chi2,
747 SL3metaPrimitive->wi1,
748 SL3metaPrimitive->tdc1,
749 SL3metaPrimitive->lat1,
750 SL3metaPrimitive->wi2,
751 SL3metaPrimitive->tdc2,
752 SL3metaPrimitive->lat2,
753 SL3metaPrimitive->wi3,
754 SL3metaPrimitive->tdc3,
755 SL3metaPrimitive->lat3,
756 SL3metaPrimitive->wi4,
757 SL3metaPrimitive->tdc4,
758 SL3metaPrimitive->lat4,
760 useFitSL3[sl3] =
true;
761 at_least_one_SL3_confirmation =
true;
766 if (clean_chi2_correlation_) {
768 LogDebug(
"MuonPathAssociator") <<
"Pushing back correlated MPs to the MPs collection";
769 removeSharingFits(chamberMetaPrimitives, outMPaths);
771 if (clean_chi2_correlation_) {
773 LogDebug(
"MuonPathAssociator") <<
"Pushing back confirmed MPs to the complete vector";
774 removeSharingHits(confirmedMetaPrimitives, chamberMetaPrimitives, outMPaths);
778 if (at_least_one_correlation ==
false || clean_chi2_correlation_) {
779 if (debug_ && !at_least_one_correlation)
781 <<
"correlation we found zero correlations, adding both collections as they are to the outMPaths";
784 <<
"correlation sizes:" << SL1metaPrimitives.size() <<
" " << SL3metaPrimitives.size();
785 if (at_least_one_SL1_confirmation ==
false || clean_chi2_correlation_) {
787 for (
auto SL1metaPrimitive = SL1metaPrimitives.begin(); SL1metaPrimitive != SL1metaPrimitives.end();
788 ++SL1metaPrimitive, sl1++) {
795 SL1metaPrimitive->t0,
797 SL1metaPrimitive->tanPhi,
798 SL1metaPrimitive->phi,
799 SL1metaPrimitive->phiB,
800 SL1metaPrimitive->chi2,
801 SL1metaPrimitive->quality,
802 SL1metaPrimitive->wi1,
803 SL1metaPrimitive->tdc1,
804 SL1metaPrimitive->lat1,
805 SL1metaPrimitive->wi2,
806 SL1metaPrimitive->tdc2,
807 SL1metaPrimitive->lat2,
808 SL1metaPrimitive->wi3,
809 SL1metaPrimitive->tdc3,
810 SL1metaPrimitive->lat3,
811 SL1metaPrimitive->wi4,
812 SL1metaPrimitive->tdc4,
813 SL1metaPrimitive->lat4,
838 if (!clean_chi2_correlation_)
839 outMPaths.push_back(newSL1metaPrimitive);
841 normalMetaPrimitives.push_back(newSL1metaPrimitive);
844 if (at_least_one_SL3_confirmation ==
false || clean_chi2_correlation_) {
846 for (
auto SL3metaPrimitive = SL3metaPrimitives.begin(); SL3metaPrimitive != SL3metaPrimitives.end();
847 ++SL3metaPrimitive, sl3++) {
853 SL3metaPrimitive->t0,
855 SL3metaPrimitive->tanPhi,
856 SL3metaPrimitive->phi,
857 SL3metaPrimitive->phiB,
858 SL3metaPrimitive->chi2,
859 SL3metaPrimitive->quality,
872 SL3metaPrimitive->wi1,
873 SL3metaPrimitive->tdc1,
874 SL3metaPrimitive->lat1,
875 SL3metaPrimitive->wi2,
876 SL3metaPrimitive->tdc2,
877 SL3metaPrimitive->lat2,
878 SL3metaPrimitive->wi3,
879 SL3metaPrimitive->tdc3,
880 SL3metaPrimitive->lat3,
881 SL3metaPrimitive->wi4,
882 SL3metaPrimitive->tdc4,
883 SL3metaPrimitive->lat4,
886 if (!clean_chi2_correlation_)
887 outMPaths.push_back(newSL3metaPrimitive);
889 normalMetaPrimitives.push_back(newSL3metaPrimitive);
894 SL1metaPrimitives.clear();
895 SL1metaPrimitives.erase(SL1metaPrimitives.begin(), SL1metaPrimitives.end());
896 SL3metaPrimitives.clear();
897 SL3metaPrimitives.erase(SL3metaPrimitives.begin(), SL3metaPrimitives.end());
899 vector<metaPrimitive> auxMetaPrimitives;
900 if (clean_chi2_correlation_) {
902 LogDebug(
"MuonPathAssociator") <<
"Pushing back normal MPs to the auxiliar vector";
903 removeSharingHits(normalMetaPrimitives, confirmedMetaPrimitives, auxMetaPrimitives);
905 if (clean_chi2_correlation_) {
907 LogDebug(
"MuonPathAssociator") <<
"Pushing back normal MPs to the MPs collection";
908 removeSharingHits(auxMetaPrimitives, chamberMetaPrimitives, outMPaths);
915 std::vector<metaPrimitive> SL2metaPrimitives;
917 for (
int wh = -2; wh <= 2; wh++) {
918 for (
int st = 1; st <= 4; st++) {
919 for (
int se = 1; se <= 14; se++) {
920 if (se >= 13 && st != 4)
927 for (
auto metaprimitiveIt = inMPaths.begin(); metaprimitiveIt != inMPaths.end(); ++metaprimitiveIt)
928 if (metaprimitiveIt->rawId == sl2Id.
rawId()) {
929 SL2metaPrimitives.push_back(*metaprimitiveIt);
931 printmPC(*metaprimitiveIt);
932 outMPaths.push_back(*metaprimitiveIt);
938 LogDebug(
"MuonPathAssociator") <<
"\t etaTP: added " << SL2metaPrimitives.size() <<
"to outMPaths" << std::endl;
940 SL2metaPrimitives.clear();
941 SL2metaPrimitives.erase(SL2metaPrimitives.begin(), SL2metaPrimitives.end());
945 bool useFit[chamberMPaths.size()];
946 for (
unsigned int i = 0;
i < chamberMPaths.size();
i++) {
949 for (
unsigned int i = 0;
i < chamberMPaths.size();
i++) {
951 LogDebug(
"MuonPathAssociator") <<
"Looking at prim" <<
i;
954 for (
unsigned int j =
i + 1;
j < chamberMPaths.size();
j++) {
956 LogDebug(
"MuonPathAssociator") <<
"Comparing with prim " <<
j;
978 printmPC(chamberMPaths[
i]);
979 allMPaths.push_back(chamberMPaths[
i]);
983 LogDebug(
"MuonPathAssociator") <<
"---Swapping chamber---";
987 std::vector<metaPrimitive> &secondMPaths,
988 std::vector<metaPrimitive> &allMPaths) {
989 for (
auto &firstMP : firstMPaths) {
991 LogDebug(
"MuonPathAssociator") <<
"----------------------------------";
993 LogDebug(
"MuonPathAssociator") <<
"Turn for ";
997 for (
auto &secondMP : secondMPaths) {
999 LogDebug(
"MuonPathAssociator") <<
"Comparing with ";
1002 if (!isNotAPrimo(firstMP, secondMP)) {
1008 allMPaths.push_back(firstMP);
1013 LogDebug(
"MuonPathAssociator") <<
"----------------------------------";
1027 if (lay1 && lay2 && lay3 && lay4) {
1028 if (lay5 || lay6 || lay7 || lay8)
1032 }
else if (lay5 && lay6 && lay7 && lay8) {
1033 if (lay1 || lay2 || lay3 || lay4)
1054 return (((!lay1 && !lay2 && !lay3 && !lay4) || hitsSL1 < 3) && ((!lay5 && !lay6 && !lay7 && !lay8) || hitsSL3 < 3));
1060 <<
" " << setw(2) << left << mP.
wi1 <<
" " << setw(2) << left << mP.
wi2 <<
" "
1061 << setw(2) << left << mP.
wi3 <<
" " << setw(2) << left << mP.
wi4 <<
" " << setw(2)
1062 << left << mP.
wi5 <<
" " << setw(2) << left << mP.
wi6 <<
" " << setw(2) << left
1063 << mP.
wi7 <<
" " << setw(2) << left << mP.
wi8 <<
" " << setw(5) << left << mP.
tdc1
1064 <<
" " << setw(5) << left << mP.
tdc2 <<
" " << setw(5) << left << mP.
tdc3 <<
" "
1065 << setw(5) << left << mP.
tdc4 <<
" " << setw(5) << left << mP.
tdc5 <<
" " << setw(5)
1066 << left << mP.
tdc6 <<
" " << setw(5) << left << mP.
tdc7 <<
" " << setw(5) << left
1067 << mP.
tdc8 <<
" " << setw(2) << left << mP.
lat1 <<
" " << setw(2) << left << mP.
lat2
1068 <<
" " << setw(2) << left << mP.
lat3 <<
" " << setw(2) << left << mP.
lat4 <<
" "
1069 << setw(2) << left << mP.
lat5 <<
" " << setw(2) << left << mP.
lat6 <<
" " << setw(2)
1070 << left << mP.
lat7 <<
" " << setw(2) << left << mP.
lat8 <<
" " << setw(10) << right
1071 << mP.
x <<
" " << setw(9) << left << mP.
tanPhi <<
" " << setw(5) << left << mP.
t0
1072 <<
" " << setw(13) << left << mP.
chi2 <<
" \n";