CMS 3D CMS Logo

RecoTauPiZeroPlugins.h
Go to the documentation of this file.
1 #ifndef RecoTauTag_RecoTau_RecoTauPiZeroPlugins_h
2 #define RecoTauTag_RecoTau_RecoTauPiZeroPlugins_h
3 
4 /*
5  * RecoTauPiZeroPlugins
6  *
7  * Author: Evan K. Friis (UC Davis)
8  *
9  * Base classes for plugins that construct and rank RecoTauPiZero
10  * objects from a jet. The builder plugin has an abstract function
11  * that takes a PFJet and returns a list of reconstructed photons in
12  * the jet.
13  *
14  * The quality plugin has an abstract function that takes a reference
15  * to a RecoTauPiZero and returns a double indicating the quality of
16  * the candidate. Lower numbers are better.
17  *
18  */
19 
20 #include <vector>
21 #include <boost/ptr_container/ptr_vector.hpp>
24 
26 
27 namespace reco {
28  // Forward declarations
29  class Jet;
30  class RecoTauPiZero;
31  namespace tau {
32 
34  public:
35  // Return a vector of pointers
36  typedef boost::ptr_vector<RecoTauPiZero> PiZeroVector;
37  // Storing the result in an auto ptr on function return allows
38  // allows us to safely release the ptr_vector in the virtual function
39  typedef std::unique_ptr<PiZeroVector> return_type;
41  : RecoTauEventHolderPlugin(pset) {}
44  virtual return_type operator()(const Jet&) const = 0;
46  void beginEvent() override{};
47  };
48 
50  public:
54  virtual double operator()(const RecoTauPiZero&) const = 0;
55  };
56  } // namespace tau
57 } // namespace reco
58 
65 #endif
RecoTauPiZeroQualityPlugin(const edm::ParameterSet &pset)
RecoTauPiZeroBuilderPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
Definition: Jet.py:1
edmplugin::PluginFactory< reco::tau::RecoTauPiZeroQualityPlugin *(const edm::ParameterSet &)> RecoTauPiZeroQualityPluginFactory
void beginEvent() override
Hook called at the beginning of the event.
fixed size matrix
boost::ptr_vector< RecoTauPiZero > PiZeroVector
virtual return_type operator()(const Jet &) const =0
Build a collection of piZeros from objects in the input jet.
std::unique_ptr< PiZeroVector > return_type