CMS 3D CMS Logo

PFCandIsolatorFromDeposit.h
Go to the documentation of this file.
1 #ifndef PFCandIsolatorFromDeposits_H
2 #define PFCandIsolatorFromDeposits_H
3 
7 
13 
17 
18 #include <string>
19 
20 namespace edm {
21  class Event;
22 }
23 namespace edm {
24  class EventSetup;
25 }
26 
28 public:
30 
31  enum Mode { Sum, SumRelative, Sum2, Sum2Relative, Max, MaxRelative, Count, NearestDR };
33 
34  ~PFCandIsolatorFromDeposits() override;
35 
36  void produce(edm::Event &, const edm::EventSetup &) override;
37 
38 private:
39  class SingleDeposit {
40  public:
42  void cleanup();
43  void open(const edm::Event &iEvent, const edm::EventSetup &iSetup);
44  double compute(const reco::CandidateBaseRef &cand);
45  const reco::IsoDepositMap &map() { return *hDeps_; }
46 
47  private:
50  double deltaR_;
52  double weight_;
53 
57  reco::isodeposit::EventDependentAbsVetos evdepVetos_; // note: these are a subset of the above. Don't delete twice!
61 
62  bool isNumber(const std::string &str) const;
63  double toNumber(const std::string &str) const;
64  };
65  // datamembers
66  std::vector<SingleDeposit> sources_;
67 };
68 #endif
bool isNumber(const std::string &str)
std::vector< SingleDeposit > sources_
StringObjectFunction< reco::Candidate > weightExpr_
static void cleanup(const Factory::MakerMap::value_type &v)
Definition: Factory.cc:12
std::vector< EventDependentAbsVeto * > EventDependentAbsVetos
double toNumber(const std::string &str)
int iEvent
Definition: GenABIO.cc:224
reco::isodeposit::EventDependentAbsVetos evdepVetos_
edm::Handle< reco::IsoDepositMap > hDeps_
edm::EDGetTokenT< reco::IsoDepositMap > srcToken_
T Max(T a, T b)
Definition: MathUtil.h:44
def compute(min, max)
HLT enums.
std::vector< AbsVeto * > AbsVetos
Definition: IsoDeposit.h:43
#define str(s)
edm::ValueMap< double > CandDoubleMap