1#ifndef __FASTJET_RECTANGULARGRID_HH__
2#define __FASTJET_RECTANGULARGRID_HH__
34#include "fastjet/PseudoJet.hh"
35#include "fastjet/Selector.hh"
37FASTJET_BEGIN_NAMESPACE
70 virtual double tile_area(
int )
const {
return mean_tile_area();}
80 bool is_initialized()
const {
return is_initialised();}
94 _ymax(rapmax_in), _ymin(-rapmax_in),
95 _requested_drap(cell_size), _requested_dphi(cell_size) {
110 : _ymax(rapmax_in), _ymin(rapmin_in),
111 _requested_drap(drap_in), _requested_dphi(dphi_in),
112 _tile_selector(tile_selector)
120 virtual int n_tiles() const FASTJET_OVERRIDE {
return _ntotal;}
126 virtual int tile_index(
const PseudoJet & p)
const FASTJET_OVERRIDE;
131 return _tile_selector.worker() ? _is_good[itile] :
true;
136 return mean_tile_area();
143 virtual std::string description() const FASTJET_OVERRIDE;
146 double rapmin()
const {
return _ymin;}
150 double drap()
const {
return _dy;}
152 double dphi()
const {
return _dphi;}
162 double _requested_drap;
163 double _requested_dphi;
166 double _dy, _dphi, _cell_area, _inverse_dy, _inverse_dphi;
167 int _ny, _nphi, _ntotal;
175 std::vector<bool> _is_good;
Class to contain pseudojets, including minimal information of use to jet-clustering routines.
Class that holds a generic rectangular tiling.
virtual double mean_tile_area() const override
returns the mean area of tiles.
double drap() const
returns the spacing of the grid in rapidity
double dphi() const
returns the spacing of the grid in azimuth
virtual bool tile_is_good(int itile) const override
returns whether a given tile is good
virtual int n_tiles() const override
returns the total number of tiles in the tiling; valid tile indices run from 0 ......
virtual double tile_area(int) const override
returns the area of tile itile.
RectangularGrid(double rapmin_in, double rapmax_in, double drap_in, double dphi_in, Selector tile_selector=Selector())
ctor with more control over initialisation
double rapmax() const
returns the maxmium rapidity extent of the grid
virtual bool is_initialised() const override
returns true if the grid is in a suitably initialised state
virtual int n_good_tiles() const override
returns the number of tiles that are "good"; i.e.
RectangularGrid(double rapmax_in, double cell_size)
ctor with simple initialisation
Class that encodes information about cuts and other selection criteria that can be applied to PseudoJ...
Class to indicate generic structure of tilings.
virtual int tile_index(const PseudoJet &p) const =0
returns the index of the tile in which p is located, or -1 if p is outside the tiling region
virtual bool tile_is_good(int) const
returns whether a given tile is good
virtual int n_tiles() const =0
returns the total number of tiles in the tiling; valid tile indices run from 0 ......
virtual double tile_area(int) const
returns the area of tile itile.
virtual std::string description() const =0
returns a string to describe the tiling
virtual ~TilingBase()
virtual destructor
virtual double mean_tile_area() const =0
returns the mean area of the tiles.
virtual bool is_initialised() const =0
returns true if the Tiling structure is in a suitably initialised state
virtual bool all_tiles_good() const
returns whether all tiles are good
virtual int n_good_tiles() const
returns the number of tiles that are "good"; i.e.
virtual bool all_tiles_equal_area() const
returns true if all tiles have the same area