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  * $Id $
11  *
12  */
13 
16 
19 
20 namespace reco { namespace tau {
21 
23  public:
26  double operator()(const RecoTauPiZero&) const;
27  private:
30  double failResult_;
31 };
32 
35  selector_(pset.getParameter<std::string>("selection")),
36  function_(pset.getParameter<std::string>("selectionPassFunction")),
37  failResult_(pset.getParameter<double>("selectionFailValue")) {}
38 
40  if(selector_(cand)) {
41  return function_(cand);
42  }
43  else {
44  return failResult_;
45  }
46 }
47 }} // end namespace reco::tau
48 
52  "RecoTauPiZeroStringQuality");
const StringObjectFunction< RecoTauPiZero > function_
const StringCutObjectSelector< RecoTauPiZero > selector_
double operator()(const RecoTauPiZero &) const
Return a number indicating the quality of this PiZero.
#define DEFINE_EDM_PLUGIN(factory, type, name)