CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RecoTauPiZeroTrivialPlugin.cc
Go to the documentation of this file.
1 /*
2  * RecoTauPiZeroTrivialPlugin
3  *
4  * Author: Evan K. Friis (UC Davis)
5  *
6  * Given an input PFJet, produces collection of trivial 'un-merged' PiZero
7  * RecoTauPiZeros. Each PiZero is composed of only one photon from
8  * the jet.
9  *
10  * $Id $
11  *
12  */
13 
19 
22 
23 #include <boost/foreach.hpp>
24 
25 namespace reco { namespace tau {
26 
28  public:
29  explicit RecoTauPiZeroTrivialPlugin(const edm::ParameterSet& pset);
31  return_type operator()(const reco::PFJet& jet) const;
32  private:
34 };
35 
38  qcuts_(pset.getParameterSet(
39  "qualityCuts").getParameterSet("signalQualityCuts")) {}
40 
42  const reco::PFJet& jet) const {
43  std::vector<PFCandidatePtr> pfGammaCands = qcuts_.filterRefs(pfGammas(jet));
45  output.reserve(pfGammaCands.size());
46 
47  BOOST_FOREACH(const PFCandidatePtr& gamma, pfGammaCands) {
48  std::auto_ptr<RecoTauPiZero> piZero(new RecoTauPiZero(
49  0, (*gamma).p4(), (*gamma).vertex(), 22, 1000, true,
51  piZero->addDaughter(gamma);
52  output.push_back(piZero);
53  }
54  return output.release();
55 }
56 
57 }} // end reco::tau
58 
62  "RecoTauPiZeroTrivialPlugin");
RecoTauPiZeroTrivialPlugin(const edm::ParameterSet &pset)
return_type operator()(const reco::PFJet &jet) const
Build a collection of piZeros from objects in the input jet.
Coll filterRefs(const Coll &refcoll, bool invert=false) const
Filter a ref vector of PFCandidates.
std::vector< PFCandidatePtr > pfGammas(const PFJet &jet, bool sort=true)
Extract all pfGammas from a PFJet.
ParameterSet const & getParameterSet(ParameterSetID const &id)
Jets made from PFObjects.
Definition: PFJet.h:22
std::auto_ptr< PiZeroVector > return_type
boost::ptr_vector< RecoTauPiZero > PiZeroVector
#define DEFINE_EDM_PLUGIN(factory, type, name)