1 #ifndef __GRID_MEDIAN_BACKGROUND_ESTIMATOR_HH__
2 #define __GRID_MEDIAN_BACKGROUND_ESTIMATOR_HH__
35 #include "fastjet/tools/BackgroundEstimatorBase.hh"
41 #define FASTJET_GMBGE_USEFJGRID
43 #ifdef FASTJET_GMBGE_USEFJGRID
44 #include "fastjet/RectangularGrid.hh"
49 FASTJET_BEGIN_NAMESPACE
78 #ifdef FASTJET_GMBGE_USEFJGRID
86 #ifdef FASTJET_GMBGE_USEFJGRID
94 _has_particles(false), _enable_rho_m(true) {}
100 _has_particles(false), _enable_rho_m(true) {
101 if (!RectangularGrid::is_initialised())
102 throw Error(
"attempt to construct GridMedianBackgroundEstimator with uninitialised RectangularGrid");
119 RectangularGrid(rapmin_in, rapmax_in, drap_in, dphi_in, tile_selector),
120 _has_particles(false), _enable_rho_m(true) {}
122 #else // alternative in old framework where we didn't have the rectangular grid
124 _ymin(-ymax), _ymax(ymax),
125 _requested_grid_spacing(requested_grid_spacing),
126 _has_particles(false), _enable_rho_m(true)
130 #endif // FASTJET_GMBGE_USEFJGRID
141 void set_particles(
const std::vector<PseudoJet> & particles);
159 double sigma()
const;
179 double rho_m()
const;
185 double sigma_m()
const;
234 std::string description()
const;
241 #ifndef FASTJET_GMBGE_USEFJGRID
247 int tile_index(
const PseudoJet & p)
const;
250 double _ymin, _ymax, _dy, _dphi, _requested_grid_spacing, _tile_area;
251 int _ny, _nphi, _ntotal;
253 int n_tiles()
const {
return _ntotal;}
254 int n_good_tiles()
const {
return n_tiles();}
255 int tile_is_good(
int )
const {
return true;}
257 double mean_tile_area()
const {
return _tile_area;}
258 #endif // FASTJET_GMBGE_USEFJGRID
262 void verify_particles_set()
const;
266 double _rho, _sigma, _rho_m, _sigma_m;
271 LimitedWarning _warning_rho_of_jet;
272 LimitedWarning _warning_rescaling;
275 FASTJET_END_NAMESPACE
277 #endif // __GRID_MEDIAN_BACKGROUND_ESTIMATOR_HH__