10 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(); it1 != refHitCands.end(); ++it1) {
21 for (std::vector<AlgoMuon>::iterator it2 = refHitCleanCands.begin(); it2 != refHitCleanCands.end(); ++it2) {
25 if (
std::abs(phiGMT(it1->getPhi()) - phiGMT(it2->getPhi())) < 8) {
33 if (it1->getQ() > 0 && !isGhost)
34 refHitCleanCands.push_back(*it1);
37 refHitCleanCands.resize(3,
AlgoMuon(0, 999, 9999, 0, 0, 0, 0, 0));
40 std::stringstream myStr;
41 bool hasCandidates =
false;
42 for (
unsigned int iRefHit = 0; iRefHit < refHitCands.size(); ++iRefHit) {
43 if (refHitCands[iRefHit].getQ()) {
48 for (
unsigned int iRefHit = 0; iRefHit < refHitCands.size(); ++iRefHit) {
49 if (refHitCands[iRefHit].getQ())
50 myStr <<
"Ref hit: " << iRefHit <<
" " << refHitCands[iRefHit] << std::endl;
52 myStr <<
"Selected Candidates with charge: " <<
charge << std::endl;
53 for (
unsigned int iCand = 0; iCand < refHitCleanCands.size(); ++iCand) {
54 myStr <<
"Cand: " << iCand <<
" " << refHitCleanCands[iCand] << std::endl;
61 return refHitCleanCands;
std::vector< AlgoMuon > select(std::vector< AlgoMuon > refHitCands, int charge=0) override
Abs< T >::type abs(const T &t)
Log< level::Info, false > LogInfo
Power< A, B >::type pow(const A &a, const B &b)