CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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  *
11  */
12 
18 
21 
22 namespace reco::tau {
23 
25  public:
28  return_type operator()(const reco::Jet& jet) const override;
29 
30  private:
32  };
33 
35  : RecoTauPiZeroBuilderPlugin(pset, std::move(iC)),
36  qcuts_(pset.getParameterSet("qualityCuts").getParameterSet("signalQualityCuts")) {}
37 
39  std::vector<CandidatePtr> pfGammaCands = qcuts_.filterCandRefs(pfGammas(jet));
41  output.reserve(pfGammaCands.size());
42 
43  for (auto const& gamma : pfGammaCands) {
44  std::unique_ptr<RecoTauPiZero> piZero(
45  new RecoTauPiZero(0, (*gamma).p4(), (*gamma).vertex(), 22, 1000, true, RecoTauPiZero::kTrivial));
46  piZero->addDaughter(gamma);
47  output.push_back(std::move(piZero));
48  }
49  return output;
50  }
51 
52 } // namespace reco::tau
53 
57  "RecoTauPiZeroTrivialPlugin");
RecoTauPiZeroTrivialPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
Coll filterCandRefs(const Coll &refcoll, bool invert=false) const
Filter a ref vector of Candidates.
Base class for all types of Jets.
Definition: Jet.h:20
ParameterSet const & getParameterSet(ParameterSetID const &id)
def move
Definition: eostools.py:511
std::vector< std::unique_ptr< RecoTauPiZero > > PiZeroVector
#define DEFINE_EDM_PLUGIN(factory, type, name)
return_type operator()(const reco::Jet &jet) const override
Build a collection of piZeros from objects in the input jet.
std::vector< CandidatePtr > pfGammas(const Jet &jet, bool sort=true)
Extract all pfGammas from a PFJet.