Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:37:54

0001 #ifndef RecoTauTag_RecoTau_RecoTauPiZeroPlugins_h
0002 #define RecoTauTag_RecoTau_RecoTauPiZeroPlugins_h
0003 
0004 /*
0005  * RecoTauPiZeroPlugins
0006  *
0007  * Author: Evan K. Friis (UC Davis)
0008  *
0009  * Base classes for plugins that construct and rank RecoTauPiZero
0010  * objects from a jet.  The builder plugin has an abstract function
0011  * that takes a PFJet and returns a list of reconstructed photons in
0012  * the jet.
0013  *
0014  * The quality plugin has an abstract function that takes a reference
0015  * to a RecoTauPiZero and returns a double indicating the quality of
0016  * the candidate.  Lower numbers are better.
0017  *
0018  */
0019 
0020 #include <vector>
0021 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
0022 #include "RecoTauTag/RecoTau/interface/RecoTauPluginsCommon.h"
0023 
0024 #include "FWCore/Framework/interface/ConsumesCollector.h"
0025 
0026 namespace reco {
0027   // Forward declarations
0028   class Jet;
0029   class RecoTauPiZero;
0030   namespace tau {
0031 
0032     class RecoTauPiZeroBuilderPlugin : public RecoTauEventHolderPlugin {
0033     public:
0034       // Return a vector of pointers
0035       typedef std::vector<std::unique_ptr<RecoTauPiZero>> PiZeroVector;
0036       typedef PiZeroVector return_type;
0037       explicit RecoTauPiZeroBuilderPlugin(const edm::ParameterSet& pset, edm::ConsumesCollector&& iC)
0038           : RecoTauEventHolderPlugin(pset) {}
0039       ~RecoTauPiZeroBuilderPlugin() override {}
0040       /// Build a collection of piZeros from objects in the input jet
0041       virtual return_type operator()(const Jet&) const = 0;
0042       /// Hook called at the beginning of the event.
0043       void beginEvent() override {}
0044     };
0045 
0046     class RecoTauPiZeroQualityPlugin : public RecoTauNamedPlugin {
0047     public:
0048       explicit RecoTauPiZeroQualityPlugin(const edm::ParameterSet& pset) : RecoTauNamedPlugin(pset) {}
0049       ~RecoTauPiZeroQualityPlugin() override {}
0050       /// Return a number indicating the quality of this PiZero
0051       virtual double operator()(const RecoTauPiZero&) const = 0;
0052     };
0053   }  // namespace tau
0054 }  // namespace reco
0055 
0056 #include "FWCore/PluginManager/interface/PluginFactory.h"
0057 typedef edmplugin::PluginFactory<reco::tau::RecoTauPiZeroQualityPlugin*(const edm::ParameterSet&)>
0058     RecoTauPiZeroQualityPluginFactory;
0059 typedef edmplugin::PluginFactory<reco::tau::RecoTauPiZeroBuilderPlugin*(const edm::ParameterSet&,
0060                                                                         edm::ConsumesCollector&& iC)>
0061     RecoTauPiZeroBuilderPluginFactory;
0062 #endif