CMS 3D CMS Logo

GsfEleTrkPtIsoRhoCut.cc
Go to the documentation of this file.
7 
9 public:
11 
12  result_type operator()(const reco::GsfElectronPtr&) const final;
13 
15  void getEventContent(const edm::EventBase&) final;
16 
17  double value(const reco::CandidatePtr& cand) const final;
18 
20 
21 private:
27 
29 };
30 
32 
35  slopeTerm_(params, "slopeTerm"),
36  slopeStart_(params, "slopeStart"),
37  constTerm_(params, "constTerm"),
38  rhoEtStart_(params, "rhoEtStart"),
39  rhoEA_(params, "rhoEA") {
41  contentTags_.emplace("rho", rhoTag);
42 }
43 
45  auto rho = cc.consumes<double>(contentTags_["rho"]);
46  contentTokens_.emplace("rho", rho);
47 }
48 
50 
52  const double rho = (*rhoHandle_);
53  const float isolTrkPt = cand->dr03TkSumPt();
54 
55  const float et = cand->et();
56  const float cutValue =
57  et > slopeStart_(cand) ? slopeTerm_(cand) * (et - slopeStart_(cand)) + constTerm_(cand) : constTerm_(cand);
58 
59  const float rhoCutValue = et >= rhoEtStart_(cand) ? rhoEA_(cand) * rho : 0.;
60 
61  return isolTrkPt < cutValue + rhoCutValue;
62 }
63 
65  reco::GsfElectronPtr ele(cand);
66  return ele->dr03TkSumPt();
67 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
double value(const reco::CandidatePtr &cand) const final
std::unordered_map< std::string, edm::InputTag > contentTags_
CandidateType candidateType() const final
bool ev
void getEventContent(const edm::EventBase &) final
double et() const final
transverse energy
edm::Handle< double > rhoHandle_
void setConsumes(edm::ConsumesCollector &) final
float dr03TkSumPt() const
Definition: GsfElectron.h:521
GsfEleTrkPtIsoRhoCut(const edm::ParameterSet &c)
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
result_type operator()(const reco::GsfElectronPtr &) const final
bool getByLabel(InputTag const &, Handle< T > &) const
Definition: EventBase.h:92
#define DEFINE_EDM_PLUGIN(factory, type, name)