CMS 3D CMS Logo

GsfEleTrkPtIsoRhoCut.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 
31 
32 
34 
35 };
36 
39  "GsfEleTrkPtIsoRhoCut");
40 
43  slopeTerm_(params,"slopeTerm"),
44  slopeStart_(params,"slopeStart"),
45  constTerm_(params,"constTerm"),
46  rhoEtStart_(params,"rhoEtStart"),
47  rhoEA_(params,"rhoEA")
48 {
50  contentTags_.emplace("rho",rhoTag);
51 }
52 
54  auto rho = cc.consumes<double>(contentTags_["rho"]);
55  contentTokens_.emplace("rho",rho);
56 }
57 
60 }
61 
62 CutApplicatorBase::result_type
65  const double rho = (*rhoHandle_);
66  const float isolTrkPt = cand->dr03TkSumPt();
67 
68  const float et = cand->et();
69  const float cutValue = et > slopeStart_(cand) ? slopeTerm_(cand)*(et-slopeStart_(cand)) + constTerm_(cand) : constTerm_(cand);
70 
71  const float rhoCutValue = et >= rhoEtStart_(cand) ? rhoEA_(cand)*rho : 0.;
72 
73  return isolTrkPt < cutValue+rhoCutValue;
74 }
75 
77 value(const reco::CandidatePtr& cand) const {
78  reco::GsfElectronPtr ele(cand);
79  return ele->dr03TkSumPt();
80 }
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::EDGetToken > contentTokens_
CandidateType candidateType() const final
bool ev
std::unordered_map< std::string, edm::InputTag > contentTags_
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:547
GsfEleTrkPtIsoRhoCut(const edm::ParameterSet &c)
result_type operator()(const reco::GsfElectronPtr &) const final
et
define resolution functions of each parameter
bool getByLabel(InputTag const &, Handle< T > &) const
Definition: EventBase.h:94
#define DEFINE_EDM_PLUGIN(factory, type, name)