32#ifndef __FASTJET_CIRCULARRANGE_HH__ 
   33#define __FASTJET_CIRCULARRANGE_HH__ 
   35#include "fastjet/RangeDefinition.hh" 
   36#include "fastjet/Error.hh" 
   37#include "fastjet/internal/deprecated.hh" 
   41#warning This file includes fastjet/CircularRange.hh, \ 
   42a deprecated FastJet header provided only for backward compatibility. \ 
   43This is not guaranteed to work in future releases of FastJet. \ 
   44From FastJet 3.0 onwards, please consider using Selector, defined in \ 
   45fastjet/Selector.hh, instead of RangeDefinition and, in particular, \ 
   46SelectorCircle instead of CircularRange. 
   48FASTJET_BEGIN_NAMESPACE      
 
   53  FASTJET_DEPRECATED_MSG(
"CircularRange is deprecated since FastJet 3.0. Use SelectorCircle instead",
 
   54  CircularRange()) {_set_invalid_rapphi();}
 
   57  FASTJET_DEPRECATED_MSG(
"CircularRange is deprecated since FastJet 3.0. Use SelectorCircle instead",
 
   62                _total_area = fastjet::pi*_distance*_distance;  }
 
   65  FASTJET_DEPRECATED_MSG(
"CircularRange is deprecated since FastJet 3.0. Use SelectorCircle instead",
 
   66  CircularRange(
double rap, 
double phi, 
double distance)) {
 
   70                _total_area = fastjet::pi*_distance*_distance;  }
 
   73  FASTJET_DEPRECATED_MSG(
"CircularRange is deprecated since FastJet 3.0. Use SelectorCircle instead",
 
   74  CircularRange(
double distance)) {
 
   75                _set_invalid_rapphi();
 
   77                _total_area = fastjet::pi*_distance*_distance;  }
 
   80  virtual ~CircularRange() {}
 
   83  virtual inline std::string 
description() const FASTJET_OVERRIDE {
 
   84    std::ostringstream ostr;
 
   85    ostr << 
"CircularRange: within distance "<< _distance << 
" of given jet or point." ;
 
   90  virtual inline bool is_localizable() const FASTJET_OVERRIDE { 
return true; }
 
   93  virtual inline bool is_in_range(
double rap, 
double phi) 
const FASTJET_OVERRIDE {
 
   94     if (! _rapphi_are_valid()) {
 
   95       throw Error(
"Circular range used without a center having being defined (use set_position())");
 
   97     double deltaphi = _phijet - phi;
 
   98     if ( deltaphi > pi) { deltaphi -= twopi; }
 
   99     else if ( deltaphi < -pi) { deltaphi += twopi; }
 
  100     bool inrange = ( (rap-_rapjet)*(rap-_rapjet) +
 
  101                deltaphi*deltaphi <= _distance*_distance );
 
  105  virtual inline void get_rap_limits(
double & rapmin, 
double & rapmax) 
const FASTJET_OVERRIDE {
 
  106     rapmin = _rapjet - _distance;
 
  107     rapmax = _rapjet + _distance; }
 
  113  const static double _invalid_phi = -1000.0;
 
  115  void _set_invalid_rapphi() {_phijet = _invalid_phi;}
 
  117  bool _rapphi_are_valid()
 const {
return _phijet != _invalid_phi;}
 
Class to contain pseudojets, including minimal information of use to jet-clustering routines.
 
double rap() const
returns the rapidity or some large value when the rapidity is infinite
 
double phi() const
returns phi (in the range 0..2pi)
 
class for holding a range definition specification, given by limits on rapidity and azimuth.
 
bool is_in_range(const PseudoJet &jet) const
return bool according to whether the jet is within the given range
 
virtual bool is_localizable() const
returns true if the range is localizable (i.e.
 
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 derive...
 
virtual std::string description() const
textual description of range