10 int phiGMT(
int phiAlgo) {
return phiAlgo*437/
pow(2,12); }
12 struct AlgoMuonEtaFix :
public AlgoMuon {
14 unsigned int fixedEta;
26 int aRefLayerLogicNum = omtfConfig->getRefToLogicNumber()[a.
getRefLayer()];
27 int bRefLayerLogicNum = omtfConfig->getRefToLogicNumber()[
b.getRefLayer()];
28 if(a.
getQ() >
b.getQ())
30 else if(a.
getQ()==
b.getQ() && aRefLayerLogicNum < bRefLayerLogicNum) {
33 else if (a.
getQ()==
b.getQ() && aRefLayerLogicNum == bRefLayerLogicNum && a.
getDisc() >
b.getDisc() )
35 else if (a.
getQ()==
b.getQ() && aRefLayerLogicNum == bRefLayerLogicNum && a.
getDisc() ==
b.getDisc() && a.
getPatternNumber() >
b.getPatternNumber() )
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)) ) it1->fixedEta=it2->getEta();
63 if (killIt != refHitCleanCandsFixedEta.end()) refHitCleanCandsFixedEta.erase(killIt);
67 std::vector<AlgoMuon> refHitCleanCands;
68 for (
const auto &
mu : refHitCleanCandsFixedEta) {
71 refHitCleanCands.push_back(fixed);
74 refHitCleanCands.resize( 3,
AlgoMuon(0,999,9999,0,0,0,0,0) );
90 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)