CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_4/src/RecoMuon/MuonIsolation/interface/IsolatorByDepositCount.h

Go to the documentation of this file.
00001 #ifndef MuonIsolation_IsolatorByDepositCount_H
00002 #define MuonIsolation_IsolatorByDepositCount_H
00003 
00014 #include "RecoMuon/MuonIsolation/interface/MuIsoBaseIsolator.h"
00015 #include <vector>
00016 
00017 
00018 namespace muonisolation {
00019 class IsolatorByDepositCount : public MuIsoBaseIsolator {
00020 public:
00021   typedef MuIsoBaseIsolator::DepositContainer DepositContainer;
00022 
00023   struct ConeSizeFunction {
00024    virtual float  coneSize( float eta, float pt) const = 0;
00025   };
00026 
00028   IsolatorByDepositCount(float conesize, const std::vector<double>& thresh);
00029   IsolatorByDepositCount(const ConeSizeFunction * conesize, const std::vector<double>& thresh);
00030 
00031   virtual ~IsolatorByDepositCount() {}
00032 
00034   virtual Result result(const DepositContainer& deposits, const edm::Event* = 0) const;
00035 
00036 
00037   void setConeSize(float conesize) { theConeSize = conesize; theConeSizeFunction = 0;} 
00038 
00039   void setConeSize(ConeSizeFunction * conesize) { theConeSizeFunction = conesize; }
00040 
00041 
00043   virtual float coneSize(float eta, float pT) const {
00044     return theConeSizeFunction ? theConeSizeFunction->coneSize(eta,pT) : theConeSize;
00045   }
00046 
00047   virtual ResultType resultType() const { return ISOL_INT_TYPE;}
00048 
00049 
00050 private:
00051   const ConeSizeFunction * theConeSizeFunction;
00052   float theConeSize;
00053   std::vector<double> theDepThresholds;
00054 };
00055 }
00056 
00057 #endif