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");
StringObjectFunction
Definition: StringObjectFunction.h:16
PFRecoTauChargedHadronPlugins.h
metsig::tau
Definition: SignAlgoResolutions.h:49
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
reco::tau::PFRecoTauChargedHadronStringQuality::function_
const StringObjectFunction< PFRecoTauChargedHadron > function_
Definition: PFRecoTauChargedHadronQualityPlugins.cc:29
reco::PFRecoTauChargedHadron
Definition: PFRecoTauChargedHadron.h:23
reco::tau::PFRecoTauChargedHadronStringQuality
Definition: PFRecoTauChargedHadronQualityPlugins.cc:21
MakerMacros.h
reco::tau::PFRecoTauChargedHadronStringQuality::~PFRecoTauChargedHadronStringQuality
~PFRecoTauChargedHadronStringQuality() override
Definition: PFRecoTauChargedHadronQualityPlugins.cc:24
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition: PluginFactory.h:124
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
edmplugin::PluginFactory
Definition: PluginFactory.h:34
cand
Definition: decayParser.h:32
reco::tau::PFRecoTauChargedHadronStringQuality::PFRecoTauChargedHadronStringQuality
PFRecoTauChargedHadronStringQuality(const edm::ParameterSet &)
Definition: PFRecoTauChargedHadronQualityPlugins.cc:33
std
Definition: JetResolutionObject.h:76
StringCutObjectSelector.h
reco::tau::PFRecoTauChargedHadronQualityPlugin
Definition: PFRecoTauChargedHadronPlugins.h:51
StringCutObjectSelector
Definition: StringCutObjectSelector.h:16
PFRecoTauChargedHadron.h
reco::tau::PFRecoTauChargedHadronStringQuality::operator()
double operator()(const PFRecoTauChargedHadron &) const override
Return a number indicating the quality of this chargedHadron.
Definition: PFRecoTauChargedHadronQualityPlugins.cc:39
reco::tau::PFRecoTauChargedHadronStringQuality::selector_
const StringCutObjectSelector< PFRecoTauChargedHadron > selector_
Definition: PFRecoTauChargedHadronQualityPlugins.cc:28
reco::tau::PFRecoTauChargedHadronStringQuality::failResult_
double failResult_
Definition: PFRecoTauChargedHadronQualityPlugins.cc:30
StringObjectFunction.h
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27