test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 { namespace tau {
19 
21 {
22  public:
25  double operator()(const PFRecoTauChargedHadron&) const;
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 {}
38 
40 {
41  if ( selector_(cand) ) return function_(cand);
42  else return failResult_;
43 }
44 
45 }} // end namespace reco::tau
46 
48 
const StringCutObjectSelector< PFRecoTauChargedHadron > selector_
double operator()(const PFRecoTauChargedHadron &) const
Return a number indicating the quality of this chargedHadron.
#define DEFINE_EDM_PLUGIN(factory, type, name)
const StringObjectFunction< PFRecoTauChargedHadron > function_