CMS 3D CMS Logo

PhotonHcalOverEcalCut.cc
Go to the documentation of this file.
3 
4 template <bool isBC>
6 public:
9  _hcalOverEcalCutValueEB(c.getParameter<double>("hcalOverEcalCutValueEB")),
10  _hcalOverEcalCutValueEE(c.getParameter<double>("hcalOverEcalCutValueEE")),
11  _barrelCutOff(c.getParameter<double>("barrelCutOff")) {}
12 
13  result_type operator()(const reco::PhotonPtr&) const final;
14 
15  double value(const reco::CandidatePtr& cand) const final;
16 
18 
19 private:
21 };
22 
25 
26 template <bool isBC>
28  const float hcalOverEcalCutValue =
29  (std::abs(cand->superCluster()->eta()) < _barrelCutOff ? _hcalOverEcalCutValueEB : _hcalOverEcalCutValueEE);
30 
31  if constexpr (isBC)
32  return cand->hcalOverEcalBc() < hcalOverEcalCutValue;
33  else
34  return cand->hcalOverEcal() < hcalOverEcalCutValue;
35 }
36 
37 template <bool isBC>
39  reco::PhotonPtr pho(cand);
40  if constexpr (isBC)
41  return pho->hcalOverEcalBc();
42  else
43  return pho->hcalOverEcal();
44 }
PhotonHcalOverEcalCut::value
double value(const reco::CandidatePtr &cand) const final
Definition: PhotonHcalOverEcalCut.cc:38
CutApplicatorBase::PHOTON
Definition: CutApplicatorBase.h:47
PhotonHcalOverEcalCut::PhotonHcalOverEcalCut
PhotonHcalOverEcalCut(const edm::ParameterSet &c)
Definition: PhotonHcalOverEcalCut.cc:7
watchdog.const
const
Definition: watchdog.py:83
PhotonHcalOverEcalCut::_barrelCutOff
const float _barrelCutOff
Definition: PhotonHcalOverEcalCut.cc:20
candidate_functions::CandidateCut::result_type
bool result_type
Definition: CandidateCut.h:11
PhotonHcalOverEcalCut
Definition: PhotonHcalOverEcalCut.cc:5
Photon.h
PhotonHcalOverEcalCut::_hcalOverEcalCutValueEE
const float _hcalOverEcalCutValueEE
Definition: PhotonHcalOverEcalCut.cc:20
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition: PluginFactory.h:124
edm::ParameterSet
Definition: ParameterSet.h:47
CutApplicatorBase::CandidateType
CandidateType
Definition: CutApplicatorBase.h:47
edmplugin::PluginFactory
Definition: PluginFactory.h:34
cand
Definition: decayParser.h:32
PhotonHcalOverEcalCut::_hcalOverEcalCutValueEB
const float _hcalOverEcalCutValueEB
Definition: PhotonHcalOverEcalCut.cc:20
PhotonHcalOverEcalCut::candidateType
CandidateType candidateType() const final
Definition: PhotonHcalOverEcalCut.cc:17
edm::Ptr
Definition: AssociationVector.h:31
CutApplicatorBase
Definition: CutApplicatorBase.h:45
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
CutApplicatorBase.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
PhotonHcalOverEcalCut::operator()
result_type operator()(const reco::PhotonPtr &) const final
Definition: PhotonHcalOverEcalCut.cc:27