CMS 3D CMS Logo

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 {
20  namespace tau {
21 
23  public:
26  double operator()(const RecoTauPiZero&) const override;
27 
28  private:
31  double failResult_;
32  };
33 
36  selector_(pset.getParameter<std::string>("selection")),
37  function_(pset.getParameter<std::string>("selectionPassFunction")),
38  failResult_(pset.getParameter<double>("selectionFailValue")) {}
39 
41  if (selector_(cand)) {
42  return function_(cand);
43  } else {
44  return failResult_;
45  }
46  }
47  } // namespace tau
48 } // namespace reco
49 
53  "RecoTauPiZeroStringQuality");
double operator()(const RecoTauPiZero &) const override
Return a number indicating the quality of this PiZero.
const StringObjectFunction< RecoTauPiZero > function_
const StringCutObjectSelector< RecoTauPiZero > selector_
fixed size matrix
#define DEFINE_EDM_PLUGIN(factory, type, name)