#include <IsolatorByDepositCount.h>
Classes | |
struct | ConeSizeFunction |
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 (const DepositContainer &deposits, const edm::Event *=0) const |
Compute the deposit within the cone and return the isolation result. | |
virtual ResultType | resultType () const |
void | setConeSize (float conesize) |
void | setConeSize (ConeSizeFunction *conesize) |
virtual | ~IsolatorByDepositCount () |
Private Attributes | |
float | theConeSize |
const ConeSizeFunction * | theConeSizeFunction |
std::vector< double > | theDepThresholds |
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] |
Definition at line 31 of file IsolatorByDepositCount.h.
{}
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().
{ return theConeSizeFunction ? theConeSizeFunction->coneSize(eta,pT) : theConeSize; }
MuIsoBaseIsolator::Result IsolatorByDepositCount::result | ( | const DepositContainer & | deposits, |
const edm::Event * | = 0 |
||
) | const [virtual] |
Compute the deposit within the cone and return the isolation result.
Implements muonisolation::MuIsoBaseIsolator.
Definition at line 16 of file IsolatorByDepositCount.cc.
References coneSize(), muonisolation::MuIsoBaseIsolator::DepositAndVetos::dep, reco::IsoDeposit::depositAndCountWithin(), eta(), muonisolation::MuIsoBaseIsolator::ISOL_INVALID_TYPE, resultType(), theDepThresholds, muonisolation::MuIsoBaseIsolator::Result::valInt, and muonisolation::MuIsoBaseIsolator::DepositAndVetos::vetos.
{ if (deposits.empty()) return Result(resultType()); if (deposits.size()>1){ return Result(ISOL_INVALID_TYPE); } // To determine the threshold, the direction of the cone of the first // set of deposits is used. // For algorithms where different cone axis definitions are used // for different types deposits (eg. HCAL and ECAL deposits for // calorimeter isolation), the first one is used to determine the threshold // value! float eta = deposits.front().dep->eta(); float pt = deposits.front().dep->candEnergy(); float dr= coneSize(eta,pt); DepositAndVetos depVet = deposits.front(); std::pair<double, int> sumAndCount = depVet.dep->depositAndCountWithin(dr, *depVet.vetos, theDepThresholds.front()); Result res(resultType()); res.valInt = sumAndCount.second; return res; }
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().
{ return ISOL_INT_TYPE;}
void muonisolation::IsolatorByDepositCount::setConeSize | ( | ConeSizeFunction * | conesize | ) | [inline] |
Definition at line 39 of file IsolatorByDepositCount.h.
References theConeSizeFunction.
{ theConeSizeFunction = conesize; }
void muonisolation::IsolatorByDepositCount::setConeSize | ( | float | conesize | ) | [inline] |
Definition at line 37 of file IsolatorByDepositCount.h.
References theConeSize, and theConeSizeFunction.
{ 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] |
Definition at line 53 of file IsolatorByDepositCount.h.
Referenced by result().