#include <RecoMuon/MuonIsolation/interface/IsolatorByDepositCount.h>
Public Types | |
typedef MuIsoBaseIsolator::DepositContainer | DepositContainer |
Public Member Functions | |
virtual float | coneSize (float eta, float pT) const |
Get the cone size. | |
IsolatorByDepositCount (const ConeSizeFunction *conesize, const std::vector< double > &thresh) | |
IsolatorByDepositCount (float conesize, const std::vector< double > &thresh) | |
construct with non-default thresholds per deposit | |
virtual Result | result (DepositContainer deposits) const |
Compute the deposit within the cone and return the isolation result. | |
virtual ResultType | resultType () const |
void | setConeSize (ConeSizeFunction *conesize) |
void | setConeSize (float conesize) |
virtual | ~IsolatorByDepositCount () |
Private Attributes | |
float | theConeSize |
const ConeSizeFunction * | theConeSizeFunction |
std::vector< double > | theDepThresholds |
Classes | |
struct | ConeSizeFunction |
Definition at line 19 of file IsolatorByDepositCount.h.
Reimplemented from muonisolation::MuIsoBaseIsolator.
Definition at line 21 of file IsolatorByDepositCount.h.
muonisolation::IsolatorByDepositCount::IsolatorByDepositCount | ( | float | conesize, | |
const std::vector< double > & | thresh | |||
) |
construct with non-default thresholds per deposit
muonisolation::IsolatorByDepositCount::IsolatorByDepositCount | ( | const ConeSizeFunction * | conesize, | |
const std::vector< double > & | thresh | |||
) |
virtual muonisolation::IsolatorByDepositCount::~IsolatorByDepositCount | ( | ) | [inline, virtual] |
virtual float muonisolation::IsolatorByDepositCount::coneSize | ( | float | eta, | |
float | pT | |||
) | const [inline, virtual] |
Get the cone size.
Definition at line 43 of file IsolatorByDepositCount.h.
References muonisolation::IsolatorByDepositCount::ConeSizeFunction::coneSize(), theConeSize, and theConeSizeFunction.
Referenced by result().
00043 { 00044 return theConeSizeFunction ? theConeSizeFunction->coneSize(eta,pT) : theConeSize; 00045 }
MuIsoBaseIsolator::Result IsolatorByDepositCount::result | ( | DepositContainer | deposits | ) | const [virtual] |
Compute the deposit within the cone and return the isolation result.
Definition at line 16 of file IsolatorByDepositCount.cc.
References coneSize(), muonisolation::MuIsoBaseIsolator::DepositAndVetos::dep, reco::IsoDeposit::depositAndCountWithin(), eta, muonisolation::MuIsoBaseIsolator::ISOL_INVALID_TYPE, res, resultType(), theDepThresholds, muonisolation::MuIsoBaseIsolator::Result::valInt, and muonisolation::MuIsoBaseIsolator::DepositAndVetos::vetos.
00016 { 00017 if (deposits.empty()) return Result(resultType()); 00018 if (deposits.size()>1){ return Result(ISOL_INVALID_TYPE); 00019 } 00020 00021 // To determine the threshold, the direction of the cone of the first 00022 // set of deposits is used. 00023 // For algorithms where different cone axis definitions are used 00024 // for different types deposits (eg. HCAL and ECAL deposits for 00025 // calorimeter isolation), the first one is used to determine the threshold 00026 // value! 00027 float eta = deposits.front().dep->eta(); 00028 float pt = deposits.front().dep->candEnergy(); 00029 float dr= coneSize(eta,pt); 00030 DepositAndVetos depVet = deposits.front(); 00031 std::pair<double, int> sumAndCount = depVet.dep->depositAndCountWithin(dr, *depVet.vetos, theDepThresholds.front()); 00032 00033 00034 Result res(resultType()); 00035 res.valInt = sumAndCount.second; 00036 return res; 00037 }
virtual ResultType muonisolation::IsolatorByDepositCount::resultType | ( | ) | const [inline, virtual] |
Implements muonisolation::MuIsoBaseIsolator.
Definition at line 47 of file IsolatorByDepositCount.h.
References muonisolation::MuIsoBaseIsolator::ISOL_INT_TYPE.
Referenced by result().
00047 { return ISOL_INT_TYPE;}
void muonisolation::IsolatorByDepositCount::setConeSize | ( | ConeSizeFunction * | conesize | ) | [inline] |
Definition at line 39 of file IsolatorByDepositCount.h.
References theConeSizeFunction.
00039 { theConeSizeFunction = conesize; }
void muonisolation::IsolatorByDepositCount::setConeSize | ( | float | conesize | ) | [inline] |
Definition at line 37 of file IsolatorByDepositCount.h.
References theConeSize, and theConeSizeFunction.
00037 { theConeSize = conesize; theConeSizeFunction = 0;}
float muonisolation::IsolatorByDepositCount::theConeSize [private] |
Definition at line 52 of file IsolatorByDepositCount.h.
Referenced by coneSize(), and setConeSize().
Definition at line 51 of file IsolatorByDepositCount.h.
Referenced by coneSize(), and setConeSize().
std::vector<double> muonisolation::IsolatorByDepositCount::theDepThresholds [private] |