CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RecoTauPiZeroQualityPlugins.cc
Go to the documentation of this file.
1 /*
2  * RecoTauPiZeroStringQuality
3  *
4  * Author: Evan K. Friis, UC Davis
5  *
6  * RecoTau quality plugin that returns the value given by the supplied string
7  * expression. A string cut can additionally be applied. The PiZeros
8  * that fail the cut will be associated with a default value.
9  *
10  *
11  */
12 
15 
18 
19 namespace reco { namespace tau {
20 
22  public:
25  double operator()(const RecoTauPiZero&) const override;
26  private:
29  double failResult_;
30 };
31 
34  selector_(pset.getParameter<std::string>("selection")),
35  function_(pset.getParameter<std::string>("selectionPassFunction")),
36  failResult_(pset.getParameter<double>("selectionFailValue")) {}
37 
39  if(selector_(cand)) {
40  return function_(cand);
41  }
42  else {
43  return failResult_;
44  }
45 }
46 }} // end namespace reco::tau
47 
51  "RecoTauPiZeroStringQuality");
const StringObjectFunction< RecoTauPiZero > function_
double operator()(const RecoTauPiZero &) const override
Return a number indicating the quality of this PiZero.
const StringCutObjectSelector< RecoTauPiZero > selector_
#define DEFINE_EDM_PLUGIN(factory, type, name)