#include <RangeDefinition.hh>
Public Member Functions | |
RangeDefinition () | |
default constructor | |
RangeDefinition (double rapmax) | |
constructor for a range definition given by |y|<rapmax | |
virtual | ~RangeDefinition () |
destructor does nothing | |
RangeDefinition (double rapmin, double rapmax, double phimin=0.0, double phimax=twopi) | |
constructor for a range definition given by rapmin <= y <= rapmax, phimin <= phi <= phimax | |
bool | is_in_range (const PseudoJet &jet) const |
return bool according to whether the jet is within the given range | |
virtual bool | is_in_range (double rap, double phi) const |
return bool according to whether a (rap,phi) point is in range | |
virtual void | get_rap_limits (double &rapmin, double &rapmax) const |
return the minimal and maximal rapidity of this range; remember to replace this if you write a derived class with more complex ranges; | |
virtual double | area () const |
area of the range region | |
virtual std::string | description () const |
textual description of range | |
Protected Member Functions | |
void | _numerical_total_area (double rapmax, int npoints) |
calculate, and set in _total_area, the area with a numerical test takes a reasonable time with rapmax = 10, npoints = 100 | |
Protected Attributes | |
double | _total_area |
Private Attributes | |
double | _rapmin |
double | _rapmax |
double | _phimin |
double | _phimax |
Definition at line 46 of file RangeDefinition.hh.
fastjet::RangeDefinition::RangeDefinition | ( | ) | [inline] |
fastjet::RangeDefinition::RangeDefinition | ( | double | rapmax | ) | [inline] |
constructor for a range definition given by |y|<rapmax
Definition at line 52 of file RangeDefinition.hh.
References twopi.
00052 { 00053 assert ( rapmax > 0.0 ); 00054 _rapmax = rapmax; 00055 _rapmin = -rapmax; 00056 _phimin = 0.0; 00057 _phimax = twopi; 00058 _total_area = 2.0*rapmax*twopi; }
virtual fastjet::RangeDefinition::~RangeDefinition | ( | ) | [inline, virtual] |
fastjet::RangeDefinition::RangeDefinition | ( | double | rapmin, | |
double | rapmax, | |||
double | phimin = 0.0 , |
|||
double | phimax = twopi | |||
) | [inline] |
constructor for a range definition given by rapmin <= y <= rapmax, phimin <= phi <= phimax
Definition at line 65 of file RangeDefinition.hh.
00066 { 00067 assert ( rapmin < rapmax); 00068 assert ( phimin < phimax); 00069 assert ( phimin >= 0.0 ); 00070 _rapmax = rapmax; 00071 _rapmin = rapmin; 00072 _phimin = phimin; 00073 _phimax = phimax; 00074 _total_area = (_rapmax - _rapmin)*(_phimax - _phimin); }
bool fastjet::RangeDefinition::is_in_range | ( | const PseudoJet & | jet | ) | const [inline] |
return bool according to whether the jet is within the given range
Definition at line 78 of file RangeDefinition.hh.
References fastjet::PseudoJet::phi(), and fastjet::PseudoJet::rap().
Referenced by _numerical_total_area(), fastjet::ClusterSequenceAreaBase::empty_area(), fastjet::ClusterSequenceActiveAreaExplicitGhosts::empty_area(), fastjet::ClusterSequenceActiveArea::empty_area(), fastjet::ClusterSequenceAreaBase::get_median_rho_and_sigma(), fastjet::ClusterSequenceActiveArea::n_empty_jets(), and fastjet::ClusterSequenceAreaBase::parabolic_pt_per_unit_area().
00078 { 00079 double rap = jet.rap(); 00080 double phi = jet.phi(); 00081 return is_in_range(rap,phi); 00082 }
virtual bool fastjet::RangeDefinition::is_in_range | ( | double | rap, | |
double | phi | |||
) | const [inline, virtual] |
virtual void fastjet::RangeDefinition::get_rap_limits | ( | double & | rapmin, | |
double & | rapmax | |||
) | const [inline, virtual] |
return the minimal and maximal rapidity of this range; remember to replace this if you write a derived class with more complex ranges;
Definition at line 94 of file RangeDefinition.hh.
Referenced by fastjet::ClusterSequenceArea::_warn_if_range_unsuitable().
virtual double fastjet::RangeDefinition::area | ( | ) | const [inline, virtual] |
area of the range region
Definition at line 100 of file RangeDefinition.hh.
Referenced by fastjet::ClusterSequenceAreaBase::empty_area().
00100 { return _total_area; }
virtual std::string fastjet::RangeDefinition::description | ( | ) | const [inline, virtual] |
void fastjet::RangeDefinition::_numerical_total_area | ( | double | rapmax, | |
int | npoints | |||
) | [protected] |
calculate, and set in _total_area, the area with a numerical test takes a reasonable time with rapmax = 10, npoints = 100
.rapmax,0..2pi) are contained in the range; it takes a reasonable time with rapmax = 10, npoints = 100.
Definition at line 39 of file RangeDefinition.cc.
References _total_area, is_in_range(), and fastjet::twopi.
00039 { 00040 00041 int count = 0; 00042 double deltaphi = twopi/double(npoints); 00043 double deltarap = 2.0*rapmax/double(npoints); 00044 double phi = 0.0; 00045 for(int i = 0; i < npoints; i++) { 00046 double rap = -rapmax; 00047 for (int j = 0; j < npoints; j++) { 00048 if ( is_in_range(rap,phi) ) { count++; } 00049 rap += deltarap; 00050 } 00051 phi += deltaphi; 00052 } 00053 00054 _total_area = double(count)/double(npoints*npoints)*2.0*twopi*rapmax; 00055 }
double fastjet::RangeDefinition::_total_area [protected] |
double fastjet::RangeDefinition::_rapmin [private] |
Definition at line 120 of file RangeDefinition.hh.
double fastjet::RangeDefinition::_rapmax [private] |
Definition at line 120 of file RangeDefinition.hh.
double fastjet::RangeDefinition::_phimin [private] |
Definition at line 120 of file RangeDefinition.hh.
double fastjet::RangeDefinition::_phimax [private] |
Definition at line 120 of file RangeDefinition.hh.