#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.
|
default constructor
Definition at line 49 of file RangeDefinition.hh. 00049 {}
|
|
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; }
|
|
destructor does nothing
Definition at line 61 of file RangeDefinition.hh. 00061 {}
|
|
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); }
|
|
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 }
|
|
area of the range region
Definition at line 100 of file RangeDefinition.hh. Referenced by fastjet::ClusterSequenceAreaBase::empty_area(). 00100 { return _total_area; }
|
|
textual description of range
Definition at line 103 of file RangeDefinition.hh. 00103 { 00104 std::ostringstream ostr; 00105 ostr << "Range: " << _rapmin << " <= y <= " << _rapmax << ", " 00106 << _phimin << " <= phi <= " << _phimax ; 00107 return ostr.str(); 00108 }
|
|
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().
|
|
return bool according to whether a (rap,phi) point is in range
Definition at line 85 of file RangeDefinition.hh. 00085 { 00086 return ( rap >= _rapmin && 00087 rap <= _rapmax && 00088 phi >= _phimin && 00089 phi <= _phimax ); 00090 }
|
|
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(), 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 }
|
|
Definition at line 120 of file RangeDefinition.hh. |
|
Definition at line 120 of file RangeDefinition.hh. |
|
Definition at line 120 of file RangeDefinition.hh. |
|
Definition at line 120 of file RangeDefinition.hh. |
|
Definition at line 111 of file RangeDefinition.hh. Referenced by _numerical_total_area(). |