10 int phiGMT(
int phiAlgo) {
return phiAlgo * 437 /
pow(2, 12); }
12 struct AlgoMuonEtaFix :
public AlgoMuon {
14 unsigned int fixedEta;
25 int aRefLayerLogicNum = omtfConfig->getRefToLogicNumber()[a.
getRefLayer()];
26 int bRefLayerLogicNum = omtfConfig->getRefToLogicNumber()[
b.getRefLayer()];
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() &&
36 else if (a.
getQ() ==
b.getQ() && aRefLayerLogicNum == bRefLayerLogicNum && a.
getDisc() ==
b.getDisc() &&
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) {
57 if ((omtfConfig->fwVersion() >= 6) &&
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;
unsigned int getRefHitNumber() const
Abs< T >::type abs(const T &t)
unsigned int getPatternNumber() const
std::vector< AlgoMuon > select(std::vector< AlgoMuon > refHitCands, int charge=0) override
Power< A, B >::type pow(const A &a, const B &b)