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 { namespace tau {
23 
25 {
26  public:
29  double operator()(const PFTauRef& tau) const override;
30 
31  private:
34  double failResult_;
35 };
36 
38  : RecoTauCleanerPlugin(pset,std::move(iC)),
39  selector_(pset.getParameter<std::string>("selection")),
40  function_(pset.getParameter<std::string>("selectionPassFunction")),
41  failResult_(pset.getParameter<double>("selectionFailValue"))
42 {}
43 
45 {
46  if ( selector_(*cand) ) return function_(*cand);
47  else return failResult_;
48 }
49 
50 }} // end namespace reco::tau
51 
53 
RecoTauStringCleanerPlugin(const edm::ParameterSet &, edm::ConsumesCollector &&iC)
const StringObjectFunction< PFTau > function_
const StringCutObjectSelector< PFTau > selector_
fixed size matrix
double operator()(const PFTauRef &tau) const override
#define DEFINE_EDM_PLUGIN(factory, type, name)
def move(src, dest)
Definition: eostools.py:510