9 int phiGMT(
int phiAlgo) {
return phiAlgo*437/
pow(2,12); }
14 std::vector<AlgoMuon> refHitCleanCands;
17 std::sort( refHitCands.rbegin(), refHitCands.rend() );
19 for(std::vector<AlgoMuon>::iterator it1 = refHitCands.begin();
20 it1 != refHitCands.end(); ++it1){
22 for(std::vector<AlgoMuon>::iterator it2 = refHitCleanCands.begin();
23 it2 != refHitCleanCands.end(); ++it2){
27 if (
std::abs( phiGMT(it1->getPhi()) - phiGMT(it2->getPhi()) ) < 8 ) {
33 if(it1->getQ()>0 && !isGhost) refHitCleanCands.push_back(*it1);
36 refHitCleanCands.resize( 3,
AlgoMuon(0,999,9999,0,0,0,0,0) );
38 std::stringstream myStr;
39 bool hasCandidates =
false;
40 for(
unsigned int iRefHit=0;iRefHit<refHitCands.size();++iRefHit){
41 if(refHitCands[iRefHit].getQ()){
46 for(
unsigned int iRefHit=0;iRefHit<refHitCands.size();++iRefHit){
47 if(refHitCands[iRefHit].getQ()) myStr<<
"Ref hit: "<<iRefHit<<
" "<<refHitCands[iRefHit]<<std::endl;
49 myStr<<
"Selected Candidates with charge: "<<charge<<std::endl;
50 for(
unsigned int iCand=0; iCand<refHitCleanCands.size(); ++iCand){
51 myStr<<
"Cand: "<<iCand<<
" "<<refHitCleanCands[iCand]<<std::endl;
54 if(hasCandidates)
edm::LogInfo(
"OMTF Sorter")<<myStr.str();
57 refHitCands = refHitCleanCands;
Abs< T >::type abs(const T &t)
void select(std::vector< AlgoMuon > &refHitCands, int charge=0)
Power< A, B >::type pow(const A &a, const B &b)