1 #ifndef RecoTauTag_RecoTau_RecoTauCrossCleaning_h 2 #define RecoTauTag_RecoTau_RecoTauCrossCleaning_h 13 template <
typename PtrIter>
19 const PtrIter& chargedHadronsEnd,
22 initialize(chargedHadronsBegin, chargedHadronsEnd);
25 void initialize(
const PtrIter& chargedHadronsBegin,
const PtrIter& chargedHadronsEnd) {
36 for (
auto const& piZero :
input) {
39 std::vector<reco::CandidatePtr> cleanDaughters;
41 toCheck.begin(), toCheck.end(),
toRemove_.begin(),
toRemove_.end(), std::back_inserter(cleanDaughters));
42 if (cleanDaughters.size() ==
daughters.size()) {
50 for (
auto const& ptr : cleanDaughters) {
57 output.push_back(newPiZero);
73 template <
typename PtrIter>
80 void initialize(
const PtrIter& particlesBegin,
const PtrIter& particlesEnd) {
85 template <
typename AnyPtr>
102 template <
typename PFCandCompatiblePtrType>
104 return ptr->particleId() ==
id_;
115 template <
typename CandCompatiblePtrType>
125 template <
typename P1,
typename P2>
130 template <
typename AnyPtr>
132 return (
p1_(ptr) &&
p2_(ptr));
141 template <
typename P1,
typename P2>
std::vector< RecoTauPiZero > PiZeroList
void set(reco::Candidate &c) const
set up a candidate
bool operator()(const PFCandCompatiblePtrType &ptr) const
AddFourMomenta p4Builder_
bool operator()(const AnyPtr &ptr) const
FilterCandByAbsPdgId(int pdgId)
static std::string const input
CrossCleanPtrs(const PtrIter &particlesBegin, const PtrIter &particlesEnd)
Abs< T >::type abs(const T &t)
std::set< CandidatePtr > toRemove_
virtual void clearDaughters()
clear daughter references
void initialize(const PtrIter &chargedHadronsBegin, const PtrIter &chargedHadronsEnd)
std::vector< CandidatePtr > daughters
collection of references to daughters
size_t numberOfDaughters() const override
number of daughters
bool operator()(const AnyPtr &ptr) const
PiZeroList operator()(const std::vector< RecoTauPiZero > &input) const
CrossCleanPiZeros(const PtrIter &chargedHadronsBegin, const PtrIter &chargedHadronsEnd, int mode=kRemoveChargedAndNeutralDaughterOverlaps)
bool operator()(const CandCompatiblePtrType &ptr) const
void addDaughter(const CandidatePtr &)
add a daughter via a reference
PredicateAND(const P1 &p1, const P2 &p2)
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)