32 namespace reco {
namespace tau {
38 double factor =
sqrt(vec.energy()*vec.energy()-mass*mass)/vec.P();
40 vec.px()*factor,vec.py()*factor,vec.pz()*factor,vec.energy());
74 vertexAssociator_(pset.getParameter<edm::
ParameterSet>(
"qualityCuts")) {
76 "stripCandidatesParticleIds");
78 "stripEtaAssociationDistance");
80 "stripPhiAssociationDistance");
97 typedef std::vector<reco::PFCandidatePtr>
PFCandPtrs;
107 typedef std::list<reco::PFCandidatePtr> PFCandPtrList;
108 typedef std::list<reco::PFCandidatePtr>::iterator PFCandPtrListIter;
110 cands.insert(cands.end(), candsVector.begin(), candsVector.end());
112 while (cands.size() > 0) {
120 strip->addDaughter(seed);
123 PFCandPtrListIter stripCand = cands.begin();
124 while(stripCand != cands.end()) {
128 strip->addDaughter(*stripCand);
133 stripCand = cands.erase(stripCand);
140 if (strip->daughterPtr(0).isNonnull())
141 strip->setVertex(strip->daughterPtr(0)->vertex());
142 output.push_back(strip);
149 output.sort(output.begin(), output.end(),
157 for (PiZeroVector::const_iterator
first = output.begin();
159 for (PiZeroVector::const_iterator
second =
first+1;
168 std::auto_ptr<RecoTauPiZero> combinedStrips(
176 first->daughterPtrVector()) {
177 combinedStrips->addDaughter(gamma);
180 second->daughterPtrVector()) {
181 combinedStrips->addDaughter(gamma);
184 if (combinedStrips->daughterPtr(0).isNonnull())
185 combinedStrips->setVertex(combinedStrips->daughterPtr(0)->vertex());
187 stripCombinations.push_back(combinedStrips);
192 output.transfer(output.end(), stripCombinations);
195 return output.release();
T getParameter(std::string const &) const
reco::VertexRef associatedVertex(const PFJet &tau) const
AddFourMomenta p4Builder_
InputIterator takeNElements(const InputIterator &begin, const InputIterator &end, size_t N)
Coll filterRefs(const Coll &refcoll, bool invert=false) const
Filter a ref vector of PFCandidates.
ParameterSet const & getParameterSet(ParameterSetID const &id)
std::vector< reco::PFCandidatePtr > PFCandPtrs
void setEvent(const edm::Event &evt)
Load the vertices from the event.
Jets made from PFObjects.
return_type operator()(const reco::PFJet &jet) const
Build a collection of piZeros from objects in the input jet.
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
U second(std::pair< T, U > const &p)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
virtual ~RecoTauPiZeroStripPlugin()
RecoTauPiZeroStripPlugin(const edm::ParameterSet &pset)
void setPV(const reco::VertexRef &vtx) const
Update the primary vertex.
double phiAssociationDistance_
Container::value_type value_type
std::vector< int > inputPdgIds_
double deltaPhi(double phi1, double phi2)
RecoTauVertexAssociator vertexAssociator_
const edm::Event * evt() const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
virtual void beginEvent()
Hook called at the beginning of the event.
std::auto_ptr< PiZeroVector > return_type
RecoTauQualityCuts qcuts_
boost::ptr_vector< RecoTauPiZero > PiZeroVector
PFCandPtrs::iterator PFCandIter
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
virtual float pt() const GCC11_FINAL
transverse momentum
double etaAssociationDistance_