15 #include "boost/bind.hpp" 39 double factor =
sqrt(vec.energy() * vec.energy() - mass *
mass) / vec.P();
54 std::unique_ptr<RecoTauQualityCuts>
qcuts_;
88 typedef std::vector<reco::CandidatePtr>
CandPtrs;
98 typedef std::list<reco::CandidatePtr> CandPtrList;
99 typedef std::list<reco::CandidatePtr>::iterator CandPtrListIter;
101 cands.insert(cands.end(), candsVector.begin(), candsVector.end());
103 while (!cands.empty()) {
110 strip->addDaughter(seed);
113 CandPtrListIter stripCand = cands.begin();
114 while (stripCand != cands.end()) {
118 strip->addDaughter(*stripCand);
123 stripCand = cands.erase(stripCand);
130 if (strip->daughterPtr(0).isNonnull())
131 strip->setVertex(strip->daughterPtr(0)->vertex());
132 output.push_back(strip.get());
145 for (PiZeroVector::const_iterator
first = output.begin();
first != end_iter - 1; ++
first) {
154 std::unique_ptr<RecoTauPiZero> combinedStrips(
165 for (
auto const&
gamma :
first->daughterPtrVector()) {
166 combinedStrips->addDaughter(
gamma);
168 for (
auto const&
gamma :
second->daughterPtrVector()) {
169 combinedStrips->addDaughter(
gamma);
172 if (combinedStrips->daughterPtr(0).isNonnull())
173 combinedStrips->setVertex(combinedStrips->daughterPtr(0)->vertex());
175 stripCombinations.push_back(combinedStrips.get());
180 output.transfer(output.end(), stripCombinations);
183 return output.release();
constexpr double deltaPhi(double phi1, double phi2)
std::vector< CandidatePtr > pfCandidates(const Jet &jet, int particleId, bool sort=true)
T getParameter(std::string const &) const
AddFourMomenta p4Builder_
InputIterator takeNElements(const InputIterator &begin, const InputIterator &end, size_t N)
Base class for all types of Jets.
ParameterSet const & getParameterSet(ParameterSetID const &id)
return_type operator()(const reco::Jet &jet) const override
Build a collection of piZeros from objects in the input jet.
double pt() const final
transverse momentum
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.
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_
RecoTauVertexAssociator vertexAssociator_
const edm::Event * evt() const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
reco::VertexRef associatedVertex(const Jet &jet) const
boost::ptr_vector< RecoTauPiZero > PiZeroVector
math::XYZPoint Point
point in the space
double combinatoricStripMassHypo_
#define DEFINE_EDM_PLUGIN(factory, type, name)
void set(reco::Candidate &c) const
set up a candidate
std::unique_ptr< RecoTauQualityCuts > qcuts_
double etaAssociationDistance_
CandPtrs::iterator CandIter
std::unique_ptr< PiZeroVector > return_type
std::vector< int > inputParticleIds_