CMS 3D CMS Logo

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  *
11  */
12 
18 
21 
22 namespace reco::tau {
23 
25  public:
28  return_type operator()(const reco::PFJet& jet) const override;
29  private:
31 };
32 
36  "qualityCuts").getParameterSet("signalQualityCuts")) {}
37 
39  const reco::PFJet& jet) const {
40  std::vector<PFCandidatePtr> pfGammaCands = qcuts_.filterCandRefs(pfGammas(jet));
42  output.reserve(pfGammaCands.size());
43 
44  for(auto const& gamma : pfGammaCands) {
45  std::auto_ptr<RecoTauPiZero> piZero(new RecoTauPiZero(
46  0, (*gamma).p4(), (*gamma).vertex(), 22, 1000, true,
48  piZero->addDaughter(gamma);
49  output.push_back(piZero);
50  }
51  return output.release();
52 }
53 
54 } // end reco::tau
55 
59  "RecoTauPiZeroTrivialPlugin");
RecoTauPiZeroTrivialPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
Coll filterCandRefs(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)
return_type operator()(const reco::PFJet &jet) const override
Build a collection of piZeros from objects in the input jet.
Jets made from PFObjects.
Definition: PFJet.h:21
std::auto_ptr< PiZeroVector > return_type
boost::ptr_vector< RecoTauPiZero > PiZeroVector
#define DEFINE_EDM_PLUGIN(factory, type, name)
def move(src, dest)
Definition: eostools.py:511