CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  public:
28  double operator()(const PFTauRef& tau) const;
29  private:
32  double failResult_;
33 };
34 
36  const edm::ParameterSet& pset): RecoTauCleanerPlugin(pset),
37  selector_(pset.getParameter<std::string>("selection")),
38  function_(pset.getParameter<std::string>("selectionPassFunction")),
39  failResult_(pset.getParameter<double>("selectionFailValue")) {}
40 
42  if(selector_(*cand))
43  return function_(*cand);
44  else
45  return failResult_;
46 }
47 
48 }} // end namespace reco::tau
49 
53  "RecoTauStringCleanerPlugin");
const StringObjectFunction< PFTau > function_
RecoTauStringCleanerPlugin(const edm::ParameterSet &)
const StringCutObjectSelector< PFTau > selector_
double operator()(const PFTauRef &tau) const
#define DEFINE_EDM_PLUGIN(factory, type, name)