1 #ifndef RecoTauTag_RecoTau_RecoTauCleaningTools_h
2 #define RecoTauTag_RecoTau_RecoTauCleaningTools_h
9 template<
typename RankingList,
typename Type>
11 public std::binary_function<Type, Type, bool> {
19 typename RankingList::const_iterator ranker =
rankers_.begin();
21 double aResult = (*ranker)(
a);
22 double bResult = (*ranker)(
b);
23 if (aResult != bResult)
24 return (aResult < bResult);
34 template<
typename Container,
class OverlapFunction>
36 typedef typename Container::const_iterator
Iterator;
39 OverlapFunction overlapChecker;
40 for (Iterator candidate = dirty.begin(); candidate != dirty.end();
44 for (Iterator cleaned = clean.begin();
45 cleaned != clean.end() && !
overlaps; ++cleaned) {
46 overlaps = overlapChecker(*candidate, *cleaned);
50 clean.insert(clean.end(), *candidate);
59 return a.pt() > b.pt();
bool operator()(const T &a, const T &b) const
EcalChannelStatus Container
const RankingList & rankers_
RecoTauLexicographicalRanking(const RankingList &rankers)
bool operator()(const Type &a, const Type &b) const
Container cleanOverlaps(const Container &dirty)