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 namespace muonisolation {
17  public:
19 
21  virtual ~ConeSizeFunction() = default;
22  virtual float coneSize(float eta, float pt) const = 0;
23  };
24 
26  IsolatorByDeposit(float conesize, const std::vector<double>& weights);
27  IsolatorByDeposit(const ConeSizeFunction* conesize, const std::vector<double>& weights);
28 
30  IsolatorByDeposit(float conesize, const std::vector<double>& weights, const std::vector<double>& thresh);
31  IsolatorByDeposit(const ConeSizeFunction* conesize,
32  const std::vector<double>& weights,
33  const std::vector<double>& thresh);
34 
35  ~IsolatorByDeposit() override {}
36 
38  virtual void setWeights(const std::vector<double>& weights) { theWeights = weights; }
39 
41  Result result(const DepositContainer& deposits, const edm::Event* = nullptr) const override;
42 
44  /* virtual int resultInt(DepositContainer deposits) const; */
45 
46  void setConeSize(float conesize) {
47  theConeSize = conesize;
48  theConeSizeFunction = nullptr;
49  }
50 
51  void setConeSize(ConeSizeFunction* conesize) { theConeSizeFunction = conesize; }
52 
54  virtual float coneSize(float eta, float pT) const {
56  }
57 
58  ResultType resultType() const override { return ISOL_FLOAT_TYPE; }
59 
60  private:
61  // Compute the weighted sum of deposits of different type within dRcone
62  double weightedSum(const DepositContainer& deposits, float dRcone) const;
63 
64  private:
66  float theConeSize;
67  std::vector<double> theWeights;
68  std::vector<double> theDepThresholds;
69  };
70 } // namespace muonisolation
71 
72 #endif
muonisolation::MuIsoBaseIsolator::ISOL_FLOAT_TYPE
Definition: MuIsoBaseIsolator.h:25
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
JetPlusTrackCorrections_cff.dRcone
dRcone
Definition: JetPlusTrackCorrections_cff.py:38
muonisolation::IsolatorByDeposit::setConeSize
void setConeSize(ConeSizeFunction *conesize)
Definition: IsolatorByDeposit.h:51
muonisolation::IsolatorByDeposit::theConeSizeFunction
const ConeSizeFunction * theConeSizeFunction
Definition: IsolatorByDeposit.h:65
muonisolation::IsolatorByDeposit::ConeSizeFunction
Definition: IsolatorByDeposit.h:20
muonisolation::IsolatorByDeposit::weightedSum
double weightedSum(const DepositContainer &deposits, float dRcone) const
Definition: IsolatorByDeposit.cc:45
muonisolation::IsolatorByDeposit
Definition: IsolatorByDeposit.h:16
PVValHelper::eta
Definition: PVValidationHelpers.h:70
PVValHelper::pT
Definition: PVValidationHelpers.h:71
HLT_FULL_cff.weights
weights
Definition: HLT_FULL_cff.py:99207
muonisolation::MuIsoBaseIsolator
Definition: MuIsoBaseIsolator.h:12
muonisolation::IsolatorByDeposit::theConeSize
float theConeSize
Definition: IsolatorByDeposit.h:66
muonisolation::IsolatorByDeposit::ConeSizeFunction::coneSize
virtual float coneSize(float eta, float pt) const =0
muonisolation::MuIsoBaseIsolator::ResultType
ResultType
Definition: MuIsoBaseIsolator.h:25
muonisolation::IsolatorByDeposit::resultType
ResultType resultType() const override
Definition: IsolatorByDeposit.h:58
muonisolation::IsolatorByDeposit::DepositContainer
MuIsoBaseIsolator::DepositContainer DepositContainer
Definition: IsolatorByDeposit.h:18
muonisolation::IsolatorByDeposit::coneSize
virtual float coneSize(float eta, float pT) const
Get the cone size.
Definition: IsolatorByDeposit.h:54
muonisolation::IsolatorByDeposit::IsolatorByDeposit
IsolatorByDeposit(float conesize, const std::vector< double > &weights)
construct with no addtnl thresholds on deposits
Definition: IsolatorByDeposit.cc:7
muonisolation::IsolatorByDeposit::ConeSizeFunction::~ConeSizeFunction
virtual ~ConeSizeFunction()=default
muonisolation::IsolatorByDeposit::~IsolatorByDeposit
~IsolatorByDeposit() override
Definition: IsolatorByDeposit.h:35
muonisolation::IsolatorByDeposit::setWeights
virtual void setWeights(const std::vector< double > &weights)
Set the weights for summing deposits of different types.
Definition: IsolatorByDeposit.h:38
muonisolation
Definition: CandViewExtractor.h:16
GOODCOLL_filter_cfg.thresh
thresh
Definition: GOODCOLL_filter_cfg.py:74
muonisolation::IsolatorByDeposit::theDepThresholds
std::vector< double > theDepThresholds
Definition: IsolatorByDeposit.h:68
muonisolation::IsolatorByDeposit::setConeSize
void setConeSize(float conesize)
Compute the count of deposit within the cone and return the isolation result.
Definition: IsolatorByDeposit.h:46
muonisolation::MuIsoBaseIsolator::DepositContainer
std::vector< DepositAndVetos > DepositContainer
Definition: MuIsoBaseIsolator.h:23
muonisolation::IsolatorByDeposit::result
Result result(const DepositContainer &deposits, const edm::Event *=nullptr) const override
Compute the deposit within the cone and return the isolation result.
Definition: IsolatorByDeposit.cc:25
muonisolation::IsolatorByDeposit::theWeights
std::vector< double > theWeights
Definition: IsolatorByDeposit.h:67
edm::Event
Definition: Event.h:73
CandIsolatorFromDeposits_cfi.deposits
deposits
Definition: CandIsolatorFromDeposits_cfi.py:4
MuIsoBaseIsolator.h