11 int phiGMT(
int phiAlgo) {
return phiAlgo * 437 /
pow(2, 12); }
13 struct AlgoMuonEtaFix :
public AlgoMuon {
15 unsigned int fixedEta;
24 if (
a.getRefLayer() == -1 ||
b.getRefLayer() == -1)
28 if (
a.getQ() >
b.getQ())
30 else if (
a.getQ() ==
b.getQ() && aRefLayerLogicNum < bRefLayerLogicNum) {
32 }
else if (
a.getQ() ==
b.getQ() && aRefLayerLogicNum == bRefLayerLogicNum &&
a.getDisc() >
b.getDisc())
34 else if (
a.getQ() ==
b.getQ() && aRefLayerLogicNum == bRefLayerLogicNum &&
a.getDisc() ==
b.getDisc() &&
35 a.getPatternNumber() >
b.getPatternNumber())
37 else if (
a.getQ() ==
b.getQ() && aRefLayerLogicNum == bRefLayerLogicNum &&
a.getDisc() ==
b.getDisc() &&
38 a.getPatternNumber() ==
b.getPatternNumber() &&
a.getRefHitNumber() <
b.getRefHitNumber())
44 std::sort(muonsIN.rbegin(), muonsIN.rend(), customLess);
47 std::vector<AlgoMuonEtaFix> refHitCleanCandsFixedEta;
48 for (
const auto& muIN : muonsIN) {
49 refHitCleanCandsFixedEta.push_back(muIN);
50 auto killIt = refHitCleanCandsFixedEta.end();
54 for (
auto it1 = refHitCleanCandsFixedEta.begin(); it1 != refHitCleanCandsFixedEta.end(); ++it1) {
55 for (
auto it2 =
std::next(it1); it2 != refHitCleanCandsFixedEta.end(); ++it2) {
56 if (
std::abs(phiGMT(it1->getPhi()) - phiGMT(it2->getPhi())) < 8) {
59 ((
abs(it1->getEta()) == 75 ||
abs(it1->getEta()) == 79 ||
abs(it1->getEta()) == 92)) &&
60 ((
abs(it2->getEta()) != 75 &&
abs(it2->getEta()) != 79 &&
abs(it2->getEta()) != 92)))
61 it1->fixedEta = it2->getEta();
65 if (killIt != refHitCleanCandsFixedEta.end())
66 refHitCleanCandsFixedEta.erase(killIt);
70 std::vector<AlgoMuon> refHitCleanCands;
71 for (
const auto&
mu : refHitCleanCandsFixedEta) {
74 refHitCleanCands.push_back(
fixed);
77 refHitCleanCands.resize(3,
AlgoMuon(0, 999, 9999, 0, 0, 0, 0, 0));
93 return refHitCleanCands;
float getEta(float r, float z)
unsigned int fwVersion() const
Abs< T >::type abs(const T &t)
const std::vector< int > & getRefToLogicNumber() const
const OMTFConfiguration * omtfConfig
std::vector< AlgoMuon > select(std::vector< AlgoMuon > refHitCands, int charge=0) override