#include <IsolationEstimators.hh>
Definition at line 45 of file IsolationEstimators.hh.
Public Member Functions | |
PtInConeEstimator (double radius, double ptmin=0.0) | |
virtual double | estimate (const T &t, const C &c) const |
virtual int | compare (const IsolationEstimator< T, C > *other) const |
double | radius () const |
double | ptMin () const |
virtual bool | before (const IsolationEstimator *other) const |
bool | operator< (const IsolationEstimator &other) const |
Private Attributes | |
double | _radius |
double | _ptmin |
PtInConeEstimator | ( | double | radius, | |
double | ptmin = 0.0 | |||
) | [inline] |
virtual double estimate | ( | const T & | t, | |
const C & | c | |||
) | const [inline, virtual] |
Implements IsolationEstimator.
Definition at line 50 of file IsolationEstimators.hh.
References PtInConeEstimator::_ptmin, PtInConeEstimator::_radius, and Rivet::deltaR().
00050 { 00051 double ptsum = 0; 00052 for (typename C::const_iterator ic = c.begin(); ic != c.end(); ++ic) { 00053 if (ic->momentum().pT() < _ptmin) 00054 continue; 00055 if (deltaR(t.momentum(), ic->momentum()) < _radius) { 00056 ptsum += ic->momentum().pT(); 00057 } 00058 } 00059 return ptsum / t.momentum().pT(); 00060 }
virtual int compare | ( | const IsolationEstimator< T, C > * | other | ) | const [inline, virtual] |
Implements IsolationEstimator.
Definition at line 62 of file IsolationEstimators.hh.
References PtInConeEstimator::_ptmin, PtInConeEstimator::_radius, and Rivet::cmp().
00062 { 00063 const PtInConeEstimator *concreteother = dynamic_cast<const PtInConeEstimator*>(other); 00064 int ptmincmp = cmp(_ptmin, concreteother->getPtMin()); 00065 if (ptmincmp != 0) 00066 return ptmincmp; 00067 int radcmp = cmp(_radius, concreteother->getRadius()); 00068 if (radcmp != 0) 00069 return radcmp; 00070 return 0; 00071 }
double radius | ( | ) | const [inline] |
Definition at line 73 of file IsolationEstimators.hh.
References PtInConeEstimator::_radius.
00073 { 00074 return _radius; 00075 }
double ptMin | ( | ) | const [inline] |
Definition at line 77 of file IsolationEstimators.hh.
References PtInConeEstimator::_ptmin.
00077 { 00078 return _ptmin; 00079 }
virtual bool before | ( | const IsolationEstimator< T, C > * | other | ) | const [inline, virtual, inherited] |
Definition at line 26 of file IsolationEstimators.hh.
References IsolationEstimator::compare().
Referenced by IsolationEstimator::operator<().
00026 { 00027 const std::type_info & thisid = typeid(*this); 00028 const std::type_info & otherid = typeid(*other); 00029 if (thisid == otherid) { 00030 return compare(other) < 0; 00031 } else { 00032 return thisid.before(otherid); 00033 } 00034 }
bool operator< | ( | const IsolationEstimator< T, C > & | other | ) | const [inline, inherited] |
Definition at line 36 of file IsolationEstimators.hh.
References IsolationEstimator::before().
00036 { 00037 return this->before(&other); 00038 }
double _radius [private] |
Definition at line 81 of file IsolationEstimators.hh.
Referenced by PtInConeEstimator::compare(), PtInConeEstimator::estimate(), and PtInConeEstimator::radius().
double _ptmin [private] |
Definition at line 82 of file IsolationEstimators.hh.
Referenced by PtInConeEstimator::compare(), PtInConeEstimator::estimate(), and PtInConeEstimator::ptMin().