1 #ifndef __FASTJET_RECTANGULARGRID_HH__
2 #define __FASTJET_RECTANGULARGRID_HH__
34 #include "fastjet/PseudoJet.hh"
35 #include "fastjet/Selector.hh"
37 FASTJET_BEGIN_NAMESPACE
46 virtual int tile_index(
const PseudoJet & p)
const = 0;
50 virtual int n_tiles()
const = 0;
70 virtual double tile_area(
int )
const {
return mean_tile_area();}
73 virtual double mean_tile_area()
const = 0;
76 virtual std::string description()
const = 0;
79 virtual bool is_initialised()
const = 0;
80 bool is_initialized()
const {
return is_initialised();}
91 _ymax(rapmax_in), _ymin(-rapmax_in),
92 _requested_drap(cell_size), _requested_dphi(cell_size) {
107 : _ymax(rapmax_in), _ymin(rapmin_in),
108 _requested_drap(drap_in), _requested_dphi(dphi_in),
109 _tile_selector(tile_selector)
123 virtual int tile_index(
const PseudoJet & p)
const;
127 virtual bool tile_is_good(
int itile)
const {
return _tile_selector.worker() ? _is_good[itile] :
true;}
130 virtual double tile_area(
int )
const {
return mean_tile_area();}
136 virtual std::string description()
const;
143 double drap()
const {
return _dy;}
145 double dphi()
const {
return _dphi;}
155 double _requested_drap;
156 double _requested_dphi;
159 double _dy, _dphi, _cell_area, _inverse_dy, _inverse_dphi;
160 int _ny, _nphi, _ntotal;
166 std::vector<bool> _is_good;
170 FASTJET_END_NAMESPACE
172 #endif // __FASTJET_RECTANGULARGRID_HH__
virtual bool all_tiles_equal_area() const
returns true if all tiles have the same area
double drap() const
returns the spacing of the grid in rapidity
Class to indicate generic structure of tilings.
virtual int n_good_tiles() const
returns the number of tiles that are "good"; i.e.
virtual double tile_area(int) const
returns the area of tile itile.
virtual bool is_initialised() const
returns true if the grid is in a suitably initialised state
double rapmin() const
returns the minimum rapidity extent of the grid
RectangularGrid(double rapmax_in, double cell_size)
ctor with simple initialisation
double rapmax() const
returns the maxmium rapidity extent of the grid
virtual double mean_tile_area() const
returns the mean area of tiles.
Class that holds a generic rectangular tiling.
virtual bool tile_is_good(int) const
returns whether a given tile is good
virtual double tile_area(int) const
returns the area of tile itile.
virtual int n_good_tiles() const
returns the number of tiles that are "good"; i.e.
virtual int n_tiles() const
returns the total number of tiles in the tiling; valid tile indices run from 0 ...
virtual bool tile_is_good(int itile) const
returns whether a given tile is good
Class that encodes information about cuts and other selection criteria that can be applied to PseudoJ...
Class to contain pseudojets, including minimal information of use to jet-clustering routines...
virtual bool all_tiles_good() const
returns whether all tiles are good
double dphi() const
returns the spacing of the grid in azimuth
RectangularGrid(double rapmin_in, double rapmax_in, double drap_in, double dphi_in, Selector tile_selector=Selector())
ctor with more control over initialisation