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 
RecoTauStringCleanerPlugin(const edm::ParameterSet &, edm::ConsumesCollector &&iC)
const StringObjectFunction< PFTau > function_
double operator()(const PFTauRef &tau) const override
const StringCutObjectSelector< PFTau > selector_
fixed size matrix
#define DEFINE_EDM_PLUGIN(factory, type, name)
def move(src, dest)
Definition: eostools.py:511