CMS 3D CMS Logo

RecoTauStringCleanerPlugin.cc
Go to the documentation of this file.
1 /*
2  * =====================================================================================
3  * Filename: RecoTauStringCleanerPlugin.cc
4  *
5  * Description: Rank taus by a string function. There are three arguments,
6  * a binary [selection] string, an expression to return if that
7  * selection passes, and value to return if the selection
8  * fails.
9  * Created: 11/11/2010 11:09:52
10  *
11  * Author: Evan K. Friis (UC Davis), evan.klose.friis@cern.ch
12  * =====================================================================================
13  */
14 
18 
21 
22 namespace reco {
23  namespace tau {
24 
26  public:
29  double operator()(const PFTauRef& tau) const override;
30 
31  private:
34  double failResult_;
35  };
36 
39  selector_(pset.getParameter<std::string>("selection")),
40  function_(pset.getParameter<std::string>("selectionPassFunction")),
41  failResult_(pset.getParameter<double>("selectionFailValue")) {}
42 
44  if (selector_(*cand))
45  return function_(*cand);
46  else
47  return failResult_;
48  }
49 
50  } // namespace tau
51 } // namespace reco
52 
54 
PFTauFwd.h
StringObjectFunction< PFTau >
reco::tau::RecoTauStringCleanerPlugin::function_
const StringObjectFunction< PFTau > function_
Definition: RecoTauStringCleanerPlugin.cc:33
metsig::tau
Definition: SignAlgoResolutions.h:49
reco::tau::RecoTauStringCleanerPlugin::RecoTauStringCleanerPlugin
RecoTauStringCleanerPlugin(const edm::ParameterSet &, edm::ConsumesCollector &&iC)
Definition: RecoTauStringCleanerPlugin.cc:37
reco::tau::RecoTauStringCleanerPlugin::failResult_
double failResult_
Definition: RecoTauStringCleanerPlugin.cc:34
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::Ref< PFTauCollection >
MakerMacros.h
reco::tau::RecoTauStringCleanerPlugin::~RecoTauStringCleanerPlugin
~RecoTauStringCleanerPlugin() override
Definition: RecoTauStringCleanerPlugin.cc:28
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition: PluginFactory.h:124
reco::tau::RecoTauStringCleanerPlugin::operator()
double operator()(const PFTauRef &tau) const override
Definition: RecoTauStringCleanerPlugin.cc:43
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
edmplugin::PluginFactory
Definition: PluginFactory.h:34
cand
Definition: decayParser.h:32
reco::tau::RecoTauStringCleanerPlugin::selector_
const StringCutObjectSelector< PFTau > selector_
Definition: RecoTauStringCleanerPlugin.cc:32
reco::tau::RecoTauStringCleanerPlugin
Definition: RecoTauStringCleanerPlugin.cc:25
RecoTauBuilderPlugins.h
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
StringCutObjectSelector.h
StringCutObjectSelector< PFTau >
PFTau.h
reco::tau::RecoTauCleanerPlugin
Definition: RecoTauBuilderPlugins.h:116
StringObjectFunction.h
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27