9 int phiGMT(
int phiAlgo) {
return phiAlgo*437/
pow(2,12); }
16 if(a.
getQ() >
b.getQ())
18 else if(a.
getQ()==
b.getQ() && aRefLayerLogicNum < bRefLayerLogicNum) {
21 else if (a.
getQ()==
b.getQ() && aRefLayerLogicNum == bRefLayerLogicNum && a.
getDisc() >
b.getDisc() )
23 else if (a.
getQ()==
b.getQ() && aRefLayerLogicNum == bRefLayerLogicNum && a.
getDisc() ==
b.getDisc() && a.
getPatternNumber() >
b.getPatternNumber() )
49 std::vector<AlgoMuon> refHitCleanCands;
52 std::sort( refHitCands.rbegin(), refHitCands.rend(), customLess );
54 for(std::vector<AlgoMuon>::iterator it1 = refHitCands.begin();
55 it1 != refHitCands.end(); ++it1){
57 for(std::vector<AlgoMuon>::iterator it2 = refHitCleanCands.begin();
58 it2 != refHitCleanCands.end(); ++it2){
62 if (
std::abs( phiGMT(it1->getPhi()) - phiGMT(it2->getPhi()) ) < 8 ) {
70 if(it1->getQ()>0 && !isGhost) refHitCleanCands.push_back(*it1);
73 refHitCleanCands.resize( 3,
AlgoMuon(0,999,9999,0,0,0,0,0) );
77 std::stringstream myStr;
78 bool hasCandidates =
false;
79 for(
unsigned int iRefHit=0;iRefHit<refHitCands.size();++iRefHit){
80 if(refHitCands[iRefHit].getQ()){
85 for(
unsigned int iRefHit=0;iRefHit<refHitCands.size();++iRefHit){
86 if(refHitCands[iRefHit].getQ()) myStr<<
"Ref hit: "<<iRefHit<<
" "<<refHitCands[iRefHit]<<std::endl;
88 myStr<<
"Selected Candidates with charge: "<<charge<<std::endl;
89 for(
unsigned int iCand=0; iCand<refHitCleanCands.size(); ++iCand){
90 myStr<<
"Cand: "<<iCand<<
" "<<refHitCleanCands[iCand]<<std::endl;
93 if(hasCandidates)
edm::LogInfo(
"OMTF Sorter")<<myStr.str();
96 return refHitCleanCands;
unsigned int getRefHitNumber() const
Abs< T >::type abs(const T &t)
const OMTFConfiguration * omtfConfig
const std::vector< int > & getRefToLogicNumber() const
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)