CMS 3D CMS Logo

PFRecoTauChargedHadronQualityPlugins.cc
Go to the documentation of this file.
1 /*
2  * PFRecoTauChargedHadronStringQuality
3  *
4  * Author: Christian Veelken, LLR
5  *
6  * RecoTau quality plugin that returns the value given by the supplied string
7  * expression. A string cut can additionally be applied. ChargedHadrons
8  * that fail the cut will be associated with a default value.
9  *
10  */
11 
14 
17 
18 namespace reco {
19  namespace tau {
20 
22  public:
25  double operator()(const PFRecoTauChargedHadron&) const override;
26 
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  else
43  return failResult_;
44  }
45 
46  } // namespace tau
47 } // namespace reco
48 
50 
53  "PFRecoTauChargedHadronStringQuality");
double operator()(const PFRecoTauChargedHadron &) const override
Return a number indicating the quality of this chargedHadron.
const StringCutObjectSelector< PFRecoTauChargedHadron > selector_
fixed size matrix
#define DEFINE_EDM_PLUGIN(factory, type, name)
const StringObjectFunction< PFRecoTauChargedHadron > function_