53 std::unique_ptr<RecoTauQualityCuts>
qcuts_;
88 typedef std::vector<reco::CandidatePtr>
CandPtrs;
98 std::list<reco::CandidatePtr>
cands;
99 cands.insert(
cands.end(), candsVector.begin(), candsVector.end());
101 while (!
cands.empty()) {
111 auto stripCand =
cands.begin();
112 while (stripCand !=
cands.end()) {
116 strip->addDaughter(*stripCand);
121 stripCand =
cands.erase(stripCand);
128 if (
strip->daughterPtr(0).isNonnull())
129 strip->setVertex(
strip->daughterPtr(0)->vertex());
137 std::sort(
output.begin(),
output.end(), [&](
auto& arg1,
auto& arg2) {
return arg1->pt() > arg2->pt(); });
142 for (PiZeroVector::const_iterator firstIter =
output.begin(); firstIter != end_iter - 1; ++firstIter) {
143 for (PiZeroVector::const_iterator secondIter = firstIter + 1; secondIter != end_iter; ++secondIter) {
144 auto const&
first = *firstIter;
145 auto const&
second = *secondIter;
153 auto combinedStrips =
154 std::make_unique<RecoTauPiZero>(0,
164 for (
auto const&
gamma :
first->daughterPtrVector()) {
165 combinedStrips->addDaughter(
gamma);
167 for (
auto const&
gamma :
second->daughterPtrVector()) {
168 combinedStrips->addDaughter(
gamma);
171 if (combinedStrips->daughterPtr(0).isNonnull())
172 combinedStrips->setVertex(combinedStrips->daughterPtr(0)->vertex());
174 stripCombinations.emplace_back(combinedStrips.release());
178 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_