CMS 3D CMS Logo

GsfEleEmHadD1IsoRhoCut.cc
Go to the documentation of this file.
6 
8 
10 public:
12 
13  result_type operator()(const reco::GsfElectronPtr&) const override final;
14 
15  void setConsumes(edm::ConsumesCollector&) override final;
16  void getEventContent(const edm::EventBase&) override final;
17 
18  double value(const reco::CandidatePtr& cand) const override final;
19 
20  CandidateType candidateType() const override final {
21  return ELECTRON;
22  }
23 
24 private:
25  float rhoConstant_;
29 
30 
32 
33 };
34 
37  "GsfEleEmHadD1IsoRhoCut");
38 
41  rhoConstant_(params.getParameter<double>("rhoConstant")),
42  slopeTerm_(params,"slopeTerm"),
43  slopeStart_(params,"slopeStart"),
44  constTerm_(params,"constTerm"){
46  contentTags_.emplace("rho",rhoTag);
47 
48 }
49 
51  auto rho = cc.consumes<double>(contentTags_["rho"]);
52  contentTokens_.emplace("rho",rho);
53 }
54 
57 }
58 
59 CutApplicatorBase::result_type
62  const double rho = (*rhoHandle_);
63 
64  const float isolEmHadDepth1 = cand->dr03EcalRecHitSumEt() + cand->dr03HcalDepth1TowerSumEt();
65 
66  const float et = cand->et();
67  const float cutValue = et > slopeStart_(cand) ? slopeTerm_(cand)*(et-slopeStart_(cand)) + constTerm_(cand) : constTerm_(cand);
68  return isolEmHadDepth1 < cutValue + rhoConstant_*rho;
69 }
70 
72  reco::GsfElectronPtr ele(cand);
73  return ele->dr03EcalRecHitSumEt() + ele->dr03HcalDepth1TowerSumEt();
74 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
result_type operator()(const reco::GsfElectronPtr &) const override final
double value(const reco::CandidatePtr &cand) const override final
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
bool ev
std::unordered_map< std::string, edm::InputTag > contentTags_
virtual double et() const final
transverse energy
edm::Handle< double > rhoHandle_
float dr03HcalDepth1TowerSumEt() const
Definition: GsfElectron.h:545
GsfEleEmHadD1IsoRhoCut(const edm::ParameterSet &c)
void setConsumes(edm::ConsumesCollector &) override final
et
define resolution functions of each parameter
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:544
bool getByLabel(InputTag const &, Handle< T > &) const
Definition: EventBase.h:89
void getEventContent(const edm::EventBase &) override final
#define DEFINE_EDM_PLUGIN(factory, type, name)
CandidateType candidateType() const override final