53 std::unique_ptr<RecoTauQualityCuts>
qcuts_;
87 typedef std::vector<reco::CandidatePtr>
CandPtrs;
97 std::list<reco::CandidatePtr>
cands;
98 cands.insert(
cands.end(), candsVector.begin(), candsVector.end());
100 while (!
cands.empty()) {
110 auto stripCand =
cands.begin();
111 while (stripCand !=
cands.end()) {
115 strip->addDaughter(*stripCand);
120 stripCand =
cands.erase(stripCand);
127 if (
strip->daughterPtr(0).isNonnull())
128 strip->setVertex(
strip->daughterPtr(0)->vertex());
136 std::sort(
output.begin(),
output.end(), [&](
auto& arg1,
auto& arg2) {
return arg1->pt() > arg2->pt(); });
141 for (PiZeroVector::const_iterator firstIter =
output.begin(); firstIter != end_iter - 1; ++firstIter) {
142 for (PiZeroVector::const_iterator secondIter = firstIter + 1; secondIter != end_iter; ++secondIter) {
143 auto const&
first = *firstIter;
144 auto const&
second = *secondIter;
152 auto combinedStrips =
153 std::make_unique<RecoTauPiZero>(0,
163 for (
auto const&
gamma :
first->daughterPtrVector()) {
164 combinedStrips->addDaughter(
gamma);
166 for (
auto const&
gamma :
second->daughterPtrVector()) {
167 combinedStrips->addDaughter(
gamma);
170 if (combinedStrips->daughterPtr(0).isNonnull())
171 combinedStrips->setVertex(combinedStrips->daughterPtr(0)->vertex());
173 stripCombinations.emplace_back(combinedStrips.release());
177 std::move(stripCombinations.begin(), stripCombinations.end(), std::back_inserter(
output));
constexpr double deltaPhi(double phi1, double phi2)
std::vector< CandidatePtr > pfCandidates(const Jet &jet, int particleId, bool sort=true)
AddFourMomenta p4Builder_
InputIterator takeNElements(const InputIterator &begin, const InputIterator &end, size_t N)
void set(reco::Candidate &c) const
set up a candidate
Base class for all types of Jets.
void setEvent(const edm::Event &evt)
Load the vertices from the event.
RecoTauPiZeroStripPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
~RecoTauPiZeroStripPlugin() override
void beginEvent() override
Hook called at the beginning of the event.
reco::VertexRef associatedVertex(const Jet &jet) const
U second(std::pair< T, U > const &p)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
std::vector< reco::CandidatePtr > CandPtrs
double phiAssociationDistance_
const edm::Event * evt() const
RecoTauVertexAssociator vertexAssociator_
std::vector< std::unique_ptr< RecoTauPiZero > > PiZeroVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
ParameterSet const & getParameterSet(ParameterSetID const &id)
math::XYZPoint Point
point in the space
double combinatoricStripMassHypo_
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::unique_ptr< RecoTauQualityCuts > qcuts_
return_type operator()(const reco::Jet &jet) const override
Build a collection of piZeros from objects in the input jet.
double etaAssociationDistance_
CandPtrs::iterator CandIter
std::vector< int > inputParticleIds_