1 #ifndef RecoTauTag_RecoTau_RecoTauCleaningTools_h
2 #define RecoTauTag_RecoTau_RecoTauCleaningTools_h
8 template<
typename RankingList,
typename Type>
10 public std::binary_function<Type, Type, bool> {
18 typename RankingList::const_iterator ranker =
rankers_.begin();
20 double aResult = (*ranker)(
a);
21 double bResult = (*ranker)(
b);
22 if (aResult != bResult)
23 return (aResult < bResult);
33 template<
typename Container,
class OverlapFunction>
35 typedef typename Container::const_iterator Iterator;
38 OverlapFunction overlapChecker;
39 for (Iterator candidate = dirty.begin(); candidate != dirty.end();
43 for (Iterator cleaned = clean.begin();
44 cleaned != clean.end() && !
overlaps; ++cleaned) {
45 overlaps = overlapChecker(*candidate, *cleaned);
49 clean.insert(clean.end(), *candidate);
58 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)