#include <IsolationEstimators.hh>
Definition at line 89 of file IsolationEstimators.hh.
Public Member Functions | |
MultiplicityInConeEstimator (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 |
MultiplicityInConeEstimator | ( | double | radius, | |
double | ptmin = 0.0 | |||
) | [inline] |
virtual double estimate | ( | const T & | t, | |
const C & | c | |||
) | const [inline, virtual] |
Implements IsolationEstimator.
Definition at line 94 of file IsolationEstimators.hh.
References MultiplicityInConeEstimator::_ptmin, MultiplicityInConeEstimator::_radius, and Rivet::deltaR().
00094 { 00095 double npart = 0; 00096 for (typename C::const_iterator ic = c.begin(); ic != c.end(); ++ic) { 00097 if (ic->momentum().pT() < _ptmin) 00098 continue; 00099 if (deltaR(t.momentum(), ic->momentum()) < _radius) { 00100 npart++; 00101 } 00102 } 00103 return npart; 00104 }
virtual int compare | ( | const IsolationEstimator< T, C > * | other | ) | const [inline, virtual] |
Implements IsolationEstimator.
Definition at line 106 of file IsolationEstimators.hh.
References MultiplicityInConeEstimator::_ptmin, MultiplicityInConeEstimator::_radius, and Rivet::cmp().
00106 { 00107 const MultiplicityInConeEstimator *concreteother = dynamic_cast < const MultiplicityInConeEstimator * >(other); 00108 int ptmincmp = cmp(_ptmin, concreteother->getPtMin()); 00109 if (ptmincmp != 0) 00110 return ptmincmp; 00111 int radcmp = cmp(_radius, concreteother->getRadius()); 00112 if (radcmp != 0) 00113 return radcmp; 00114 return 0; 00115 }
double radius | ( | ) | const [inline] |
Definition at line 117 of file IsolationEstimators.hh.
References MultiplicityInConeEstimator::_radius.
00117 { 00118 return _radius; 00119 }
double ptMin | ( | ) | const [inline] |
Definition at line 121 of file IsolationEstimators.hh.
References MultiplicityInConeEstimator::_ptmin.
00121 { 00122 return _ptmin; 00123 }
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 126 of file IsolationEstimators.hh.
Referenced by MultiplicityInConeEstimator::compare(), MultiplicityInConeEstimator::estimate(), and MultiplicityInConeEstimator::radius().
double _ptmin [private] |
Definition at line 127 of file IsolationEstimators.hh.
Referenced by MultiplicityInConeEstimator::compare(), MultiplicityInConeEstimator::estimate(), and MultiplicityInConeEstimator::ptMin().