fastjet 2.4.5
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
fastjet::CircularRange Class Reference

#include <CircularRange.hh>

Inheritance diagram for fastjet::CircularRange:
Inheritance graph
[legend]
Collaboration diagram for fastjet::CircularRange:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CircularRange ()
 constructor
 CircularRange (const fastjet::PseudoJet &jet, double distance)
 initialise CircularRange with a jet
 CircularRange (double rap, double phi, double distance)
 initialise CircularRange with a (rap,phi) point
 CircularRange (double distance)
 initialise CircularRange with just the radius parameter
virtual ~CircularRange ()
 destructor
virtual std::string description () const
 return description of range
virtual bool is_localizable () const
 returns true since this range is localizable (i.e.
virtual bool is_in_range (double rap, double phi) const
 return bool according to whether (rap,phi) is in range
virtual void get_rap_limits (double &rapmin, double &rapmax) const
 return the minimal and maximal rapidity of this range

Private Member Functions

void _set_invalid_rapphi ()
 set internal phi so as to mark things as invalid
bool _rapphi_are_valid () const
 true if rap,phi are valid (tests only phi)

Private Attributes

double _distance

Static Private Attributes

static const double _invalid_phi = -1000.0
 value for phi that marks it as invalid

Detailed Description

Definition at line 40 of file CircularRange.hh.


Constructor & Destructor Documentation

fastjet::CircularRange::CircularRange ( ) [inline]

constructor

Definition at line 43 of file CircularRange.hh.

fastjet::CircularRange::CircularRange ( const fastjet::PseudoJet jet,
double  distance 
) [inline]

initialise CircularRange with a jet

Definition at line 46 of file CircularRange.hh.

References fastjet::PseudoJet::phi(), fastjet::pi, and fastjet::PseudoJet::rap().

                                                               {
                _distance = distance;
                _rapjet = jet.rap();
                _phijet = jet.phi();
                _total_area = fastjet::pi*_distance*_distance;  }
fastjet::CircularRange::CircularRange ( double  rap,
double  phi,
double  distance 
) [inline]

initialise CircularRange with a (rap,phi) point

Definition at line 53 of file CircularRange.hh.

References fastjet::d0::inline_maths::phi(), and fastjet::pi.

fastjet::CircularRange::CircularRange ( double  distance) [inline]

initialise CircularRange with just the radius parameter

Definition at line 60 of file CircularRange.hh.

References fastjet::pi.

virtual fastjet::CircularRange::~CircularRange ( ) [inline, virtual]

destructor

Definition at line 66 of file CircularRange.hh.

{}

Member Function Documentation

bool fastjet::CircularRange::_rapphi_are_valid ( ) const [inline, private]

true if rap,phi are valid (tests only phi)

Definition at line 103 of file CircularRange.hh.

{return _phijet != _invalid_phi;}
void fastjet::CircularRange::_set_invalid_rapphi ( ) [inline, private]

set internal phi so as to mark things as invalid

Definition at line 101 of file CircularRange.hh.

virtual std::string fastjet::CircularRange::description ( ) const [inline, virtual]

return description of range

Reimplemented from fastjet::RangeDefinition.

Definition at line 69 of file CircularRange.hh.

                                               {
    std::ostringstream ostr;
    ostr << "CircularRange: within distance "<< _distance << " of given jet or point." ;
    return ostr.str(); }
virtual void fastjet::CircularRange::get_rap_limits ( double &  rapmin,
double &  rapmax 
) const [inline, virtual]

return the minimal and maximal rapidity of this range

Reimplemented from fastjet::RangeDefinition.

Definition at line 91 of file CircularRange.hh.

                                                                             {
     rapmin = _rapjet - _distance;
     rapmax = _rapjet + _distance; }
virtual bool fastjet::CircularRange::is_in_range ( double  rap,
double  phi 
) const [inline, virtual]

return bool according to whether (rap,phi) is in range

Reimplemented from fastjet::RangeDefinition.

Definition at line 79 of file CircularRange.hh.

References fastjet::d0::inline_maths::phi(), fastjet::pi, and twopi.

                                                                {
     if (! _rapphi_are_valid()) {
       throw Error("Circular range used without a center having being defined (use set_position())");
     }
     double deltaphi = _phijet - phi;
     if ( deltaphi > pi) { deltaphi -= twopi; }
     else if ( deltaphi < -pi) { deltaphi += twopi; }
     bool inrange = ( (rap-_rapjet)*(rap-_rapjet) +
                deltaphi*deltaphi <= _distance*_distance );
     return inrange; }
virtual bool fastjet::CircularRange::is_localizable ( ) const [inline, virtual]

returns true since this range is localizable (i.e.

set_position does something meaningful)

Reimplemented from fastjet::RangeDefinition.

Definition at line 76 of file CircularRange.hh.

{ return true; }

Member Data Documentation

Definition at line 96 of file CircularRange.hh.

const double fastjet::CircularRange::_invalid_phi = -1000.0 [static, private]

value for phi that marks it as invalid

Definition at line 99 of file CircularRange.hh.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines