1 #ifndef RecoTauTag_RecoTau_RecoTauCrossCleaning_h 2 #define RecoTauTag_RecoTau_RecoTauCrossCleaning_h 4 #include <boost/foreach.hpp> 12 namespace reco {
namespace tau {
namespace xclean {
15 template<
typename PtrIter>
24 initialize(chargedHadronsBegin, chargedHadronsEnd);
27 void initialize(
const PtrIter& chargedHadronsBegin,
const PtrIter& chargedHadronsEnd)
39 output.reserve(input.size());
42 std::set<reco::CandidatePtr> toCheck(daughters.begin(), daughters.end());
43 std::vector<reco::CandidatePtr> cleanDaughters;
44 std::set_difference(toCheck.begin(), toCheck.end(),
toRemove_.begin(),
toRemove_.end(), std::back_inserter(cleanDaughters));
45 if ( cleanDaughters.size() == daughters.size() ) {
47 output.push_back(piZero);
60 output.push_back(newPiZero);
76 template<
typename PtrIter>
85 void initialize(
const PtrIter& particlesBegin,
const PtrIter& particlesEnd)
91 template<
typename AnyPtr>
107 template<
typename PFCandCompatiblePtrType>
109 return ptr->particleId() == id_;
116 template<
typename P1,
typename P2>
122 template<
typename AnyPtr>
124 return (p1_(ptr) && p2_(ptr));
132 template<
typename P1,
typename P2>
std::vector< RecoTauPiZero > PiZeroList
AddFourMomenta p4Builder_
PiZeroList operator()(const std::vector< RecoTauPiZero > &input) const
virtual const daughters & daughterPtrVector() const
references to daughtes
static std::string const input
size_t numberOfDaughters() const override
number of daughters
CrossCleanPtrs(const PtrIter &particlesBegin, const PtrIter &particlesEnd)
std::set< CandidatePtr > toRemove_
void initialize(const PtrIter &chargedHadronsBegin, const PtrIter &chargedHadronsEnd)
std::vector< CandidatePtr > daughters
collection of references to daughters
void clearDaughters()
clear daughter references
CrossCleanPiZeros(const PtrIter &chargedHadronsBegin, const PtrIter &chargedHadronsEnd, int mode=kRemoveChargedAndNeutralDaughterOverlaps)
void addDaughter(const CandidatePtr &)
add a daughter via a reference
PredicateAND(const P1 &p1, const P2 &p2)
void set(reco::Candidate &c) const
set up a candidate
bool operator()(const PFCandCompatiblePtrType &ptr) const
void initialize(const PtrIter &particlesBegin, const PtrIter &particlesEnd)
std::set< reco::CandidatePtr > toRemove_
Transform a pizero to remove given candidates.
FilterPFCandByParticleId(int particleId)
PredicateAND< P1, P2 > makePredicateAND(const P1 &p1, const P2 &p2)