CMS 3D CMS Logo

muonisolation::IsolatorByDepositCount Class Reference

#include <RecoMuon/MuonIsolation/interface/IsolatorByDepositCount.h>

Inheritance diagram for muonisolation::IsolatorByDepositCount:

muonisolation::MuIsoBaseIsolator

List of all members.

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 ConeSizeFunctiontheConeSizeFunction
std::vector< double > theDepThresholds

Classes

struct  ConeSizeFunction


Detailed Description

Definition at line 19 of file IsolatorByDepositCount.h.


Member Typedef Documentation

typedef MuIsoBaseIsolator::DepositContainer muonisolation::IsolatorByDepositCount::DepositContainer

Reimplemented from muonisolation::MuIsoBaseIsolator.

Definition at line 21 of file IsolatorByDepositCount.h.


Constructor & Destructor Documentation

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.

00031 {}


Member Function Documentation

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;} 


Member Data Documentation

float muonisolation::IsolatorByDepositCount::theConeSize [private]

Definition at line 52 of file IsolatorByDepositCount.h.

Referenced by coneSize(), and setConeSize().

const ConeSizeFunction* muonisolation::IsolatorByDepositCount::theConeSizeFunction [private]

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().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:49:13 2009 for CMSSW by  doxygen 1.5.4