MultiplicityInConeEstimator Class Template Reference

#include <IsolationEstimators.hh>

Inheritance diagram for MultiplicityInConeEstimator:

Inheritance graph
[legend]

Collaboration diagram for MultiplicityInConeEstimator:

Collaboration graph
[legend]

List of all members.


Detailed Description

template<class T, class C>
class Rivet::MultiplicityInConeEstimator< T, C >

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

Constructor & Destructor Documentation

MultiplicityInConeEstimator ( double  radius,
double  ptmin = 0.0 
) [inline]

Definition at line 91 of file IsolationEstimators.hh.

00092       : _radius(radius), _ptmin(ptmin) {  }


Member Function Documentation

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       }


Member Data Documentation

double _radius [private]

double _ptmin [private]


The documentation for this class was generated from the following file: