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 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 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 PFJet;
31 class PFRecoTauChargedHadron;
32 
33 namespace tau {
34 
36 {
37  public:
38  // Return a vector of pointers
39  typedef boost::ptr_vector<PFRecoTauChargedHadron> ChargedHadronVector;
40  // Storing the result in an auto ptr on function return allows
41  // allows us to safely release the ptr_vector in the virtual function
42  typedef std::auto_ptr<ChargedHadronVector> return_type;
45  {}
48  virtual return_type operator()(const PFJet&) const = 0;
50  virtual void beginEvent() {}
51 };
52 
54 {
55  public:
57  : RecoTauNamedPlugin(pset)
58  {}
61  virtual double operator()(const PFRecoTauChargedHadron&) const = 0;
62 };
63 
64 }} // end namespace reco::tau
65 
67 
70 
71 #endif
edmplugin::PluginFactory< reco::tau::PFRecoTauChargedHadronBuilderPlugin *(const edm::ParameterSet &, edm::ConsumesCollector &&iC)> PFRecoTauChargedHadronBuilderPluginFactory
PFRecoTauChargedHadronQualityPlugin(const edm::ParameterSet &pset)
virtual return_type operator()(const PFJet &) const =0
Build a collection of chargedHadrons from objects in the input jet.
boost::ptr_vector< PFRecoTauChargedHadron > ChargedHadronVector
Jets made from PFObjects.
Definition: PFJet.h:21
edmplugin::PluginFactory< reco::tau::PFRecoTauChargedHadronQualityPlugin *(const edm::ParameterSet &)> PFRecoTauChargedHadronQualityPluginFactory
fixed size matrix
virtual void beginEvent()
Hook called at the beginning of the event.
PFRecoTauChargedHadronBuilderPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)