CMS 3D CMS Logo

IsolatorByDeposit.h
Go to the documentation of this file.
1 #ifndef MuonIsolation_IsolatorByDeposit_H
2 #define MuonIsolation_IsolatorByDeposit_H
3 
13 #include <vector>
14 
15 
16 namespace muonisolation {
18 public:
20 
22  virtual ~ConeSizeFunction() = default;
23  virtual float coneSize( float eta, float pt) const = 0;
24  };
25 
27  IsolatorByDeposit(float conesize, const std::vector<double> & weights);
28  IsolatorByDeposit(const ConeSizeFunction * conesize, const std::vector<double> & weights);
29 
31  IsolatorByDeposit(float conesize,
32  const std::vector<double> & weights, const std::vector<double>& thresh);
33  IsolatorByDeposit(const ConeSizeFunction * conesize,
34  const std::vector<double> & weights, const std::vector<double>& thresh);
35 
36  ~IsolatorByDeposit() override {}
37 
39  virtual void setWeights(const std::vector<double>& weights) {theWeights=weights;}
40 
42  Result result(const DepositContainer& deposits, const edm::Event* = nullptr) const override;
43 
45 /* virtual int resultInt(DepositContainer deposits) const; */
46 
47 
48 
49  void setConeSize(float conesize) { theConeSize = conesize; theConeSizeFunction = nullptr;}
50 
51  void setConeSize(ConeSizeFunction * conesize) { theConeSizeFunction = conesize; }
52 
53 
55  virtual float coneSize(float eta, float pT) const {
57  }
58 
59  ResultType resultType() const override { return ISOL_FLOAT_TYPE;}
60 
61 
62 private:
63  // Compute the weighted sum of deposits of different type within dRcone
64  double weightedSum(const DepositContainer& deposits, float dRcone) const;
65 
66 private:
68  float theConeSize;
69  std::vector<double> theWeights;
70  std::vector<double> theDepThresholds;
71 };
72 }
73 
74 #endif
Result result(const DepositContainer &deposits, const edm::Event *=0) const override
Compute the deposit within the cone and return the isolation result.
std::vector< double > theDepThresholds
double weightedSum(const DepositContainer &deposits, float dRcone) const
ResultType resultType() const override
virtual float coneSize(float eta, float pt) const =0
virtual float coneSize(float eta, float pT) const
Get the cone size.
IsolatorByDeposit(float conesize, const std::vector< double > &weights)
construct with no addtnl thresholds on deposits
MuIsoBaseIsolator::DepositContainer DepositContainer
virtual void setWeights(const std::vector< double > &weights)
Set the weights for summing deposits of different types.
void setConeSize(float conesize)
Compute the count of deposit within the cone and return the isolation result.
std::vector< double > theWeights
const ConeSizeFunction * theConeSizeFunction
std::vector< DepositAndVetos > DepositContainer
void setConeSize(ConeSizeFunction *conesize)