CMS 3D CMS Logo

PFRecoTauChargedHadronPlugins.h
Go to the documentation of this file.
1 #ifndef RecoTauTag_RecoTau_PFRecoTauChargedHadronPlugins_h
2 #define RecoTauTag_RecoTau_PFRecoTauChargedHadronPlugins_h
3 
4 /*
5  * PFRecoTauChargedHadronPlugins
6  *
7  * Author: Christian Veelken, LLR
8  *
9  * Base classes for plugins that construct and rank PFRecoTauChargedHadron
10  * objects from a jet. The builder plugin has an abstract function
11  * that takes a Jet 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 PFRecoTauChargedHadron 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 
29  // Forward declarations
30  class Jet;
31  class PFRecoTauChargedHadron;
32 
33  namespace tau {
34 
36  public:
37  // Return a vector of pointers
38  typedef boost::ptr_vector<PFRecoTauChargedHadron> ChargedHadronVector;
39  // Storing the result in an auto ptr on function return allows
40  // allows us to safely release the ptr_vector in the virtual function
41  typedef std::unique_ptr<ChargedHadronVector> return_type;
43  : RecoTauEventHolderPlugin(pset) {}
46  virtual return_type operator()(const Jet&) const = 0;
48  void beginEvent() override {}
49  };
50 
52  public:
56  virtual double operator()(const PFRecoTauChargedHadron&) const = 0;
57  };
58 
59  } // namespace tau
60 } // namespace reco
61 
63 
69 
70 #endif
void beginEvent() override
Hook called at the beginning of the event.
virtual return_type operator()(const Jet &) const =0
Build a collection of chargedHadrons from objects in the input jet.
PFRecoTauChargedHadronQualityPlugin(const edm::ParameterSet &pset)
boost::ptr_vector< PFRecoTauChargedHadron > ChargedHadronVector
Definition: Jet.py:1
edmplugin::PluginFactory< reco::tau::PFRecoTauChargedHadronQualityPlugin *(const edm::ParameterSet &)> PFRecoTauChargedHadronQualityPluginFactory
fixed size matrix
std::unique_ptr< ChargedHadronVector > return_type
PFRecoTauChargedHadronBuilderPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)