10 int phiGMT(
int phiAlgo) {
return phiAlgo * 437 /
pow(2, 12); }
12 struct AlgoMuonEtaFix :
public AlgoMuon {
14 unsigned int fixedEta;
23 if (
a.getRefLayer() == -1 ||
b.getRefLayer() == -1)
27 if (
a.getQ() >
b.getQ())
29 else if (
a.getQ() ==
b.getQ() && aRefLayerLogicNum < bRefLayerLogicNum) {
31 }
else if (
a.getQ() ==
b.getQ() && aRefLayerLogicNum == bRefLayerLogicNum &&
a.getDisc() >
b.getDisc())
33 else if (
a.getQ() ==
b.getQ() && aRefLayerLogicNum == bRefLayerLogicNum &&
a.getDisc() ==
b.getDisc() &&
34 a.getPatternNumber() >
b.getPatternNumber())
36 else if (
a.getQ() ==
b.getQ() && aRefLayerLogicNum == bRefLayerLogicNum &&
a.getDisc() ==
b.getDisc() &&
37 a.getPatternNumber() ==
b.getPatternNumber() &&
a.getRefHitNumber() <
b.getRefHitNumber())
43 std::sort(muonsIN.rbegin(), muonsIN.rend(), customLess);
46 std::vector<AlgoMuonEtaFix> refHitCleanCandsFixedEta;
47 for (
const auto& muIN : muonsIN) {
48 refHitCleanCandsFixedEta.push_back(muIN);
49 auto killIt = refHitCleanCandsFixedEta.end();
53 for (
auto it1 = refHitCleanCandsFixedEta.begin(); it1 != refHitCleanCandsFixedEta.end(); ++it1) {
54 for (
auto it2 =
std::next(it1); it2 != refHitCleanCandsFixedEta.end(); ++it2) {
55 if (
std::abs(phiGMT(it1->getPhi()) - phiGMT(it2->getPhi())) < 8) {
58 ((
abs(it1->getEta()) == 75 ||
abs(it1->getEta()) == 79 ||
abs(it1->getEta()) == 92)) &&
59 ((
abs(it2->getEta()) != 75 &&
abs(it2->getEta()) != 79 &&
abs(it2->getEta()) != 92)))
60 it1->fixedEta = it2->getEta();
64 if (killIt != refHitCleanCandsFixedEta.end())
65 refHitCleanCandsFixedEta.erase(killIt);
69 std::vector<AlgoMuon> refHitCleanCands;
70 for (
const auto&
mu : refHitCleanCandsFixedEta) {
73 refHitCleanCands.push_back(
fixed);
76 refHitCleanCands.resize(3,
AlgoMuon(0, 999, 9999, 0, 0, 0, 0, 0));
92 return refHitCleanCands;