10 int phiGMT(
int phiAlgo) {
return phiAlgo*437/
pow(2,12); }
12 struct AlgoMuonEtaFix :
public AlgoMuon {
14 unsigned int fixedEta;
23 int aRefLayerLogicNum = omtfConfig->getRefToLogicNumber()[a.
getRefLayer()];
24 int bRefLayerLogicNum = omtfConfig->getRefToLogicNumber()[
b.getRefLayer()];
25 if(a.
getQ() >
b.getQ())
27 else if(a.
getQ()==
b.getQ() && aRefLayerLogicNum < bRefLayerLogicNum) {
30 else if (a.
getQ()==
b.getQ() && aRefLayerLogicNum == bRefLayerLogicNum && a.
getDisc() >
b.getDisc() )
32 else if (a.
getQ()==
b.getQ() && aRefLayerLogicNum == bRefLayerLogicNum && a.
getDisc() ==
b.getDisc() && a.
getPatternNumber() >
b.getPatternNumber() )
40 std::sort( muonsIN.rbegin(), muonsIN.rend(), customLess);
43 std::vector<AlgoMuonEtaFix> refHitCleanCandsFixedEta;
44 for (
const auto & muIN : muonsIN) {
45 refHitCleanCandsFixedEta.push_back(muIN);
46 auto killIt = refHitCleanCandsFixedEta.end();
50 for (
auto it1 = refHitCleanCandsFixedEta.begin(); it1 != refHitCleanCandsFixedEta.end(); ++it1) {
51 for (
auto it2 =
std::next(it1); it2 != refHitCleanCandsFixedEta.end(); ++it2) {
52 if (
std::abs( phiGMT(it1->getPhi()) - phiGMT(it2->getPhi()) ) < 8 ) {
54 if ( (omtfConfig->fwVersion() >= 6)
55 && ((
abs(it1->getEta())==75 ||
abs(it1->getEta())==79 ||
abs(it1->getEta())==92))
56 && ((
abs(it2->getEta())!=75 &&
abs(it2->getEta())!=79 &&
abs(it2->getEta())!=92)) ) it1->fixedEta=it2->getEta();
60 if (killIt != refHitCleanCandsFixedEta.end()) refHitCleanCandsFixedEta.erase(killIt);
64 std::vector<AlgoMuon> refHitCleanCands;
65 for (
const auto &
mu : refHitCleanCandsFixedEta) {
68 refHitCleanCands.push_back(fixed);
71 refHitCleanCands.resize( 3,
AlgoMuon(0,999,9999,0,0,0,0,0) );
87 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)