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 final;
14 
16  void getEventContent(const edm::EventBase&) final;
17 
18  double value(const reco::CandidatePtr& cand) const final;
19 
20  CandidateType candidateType() const 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
CandidateType candidateType() const final
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
bool ev
double value(const reco::CandidatePtr &cand) const final
std::unordered_map< std::string, edm::InputTag > contentTags_
edm::Handle< double > rhoHandle_
double et() const final
transverse energy
float dr03HcalDepth1TowerSumEt() const
Definition: GsfElectron.h:545
result_type operator()(const reco::GsfElectronPtr &) const final
void getEventContent(const edm::EventBase &) final
GsfEleEmHadD1IsoRhoCut(const edm::ParameterSet &c)
et
define resolution functions of each parameter
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:544
bool getByLabel(InputTag const &, Handle< T > &) const
Definition: EventBase.h:94
#define DEFINE_EDM_PLUGIN(factory, type, name)
void setConsumes(edm::ConsumesCollector &) final