Loading...
Searching...
No Matches
fastjet::GridMedianBackgroundEstimator Class Reference
FastJet tools » Background subtraction

Background Estimator based on the median pt/area of a set of grid cells. More...

`#include <fastjet/tools/GridMedianBackgroundEstimator.hh>`

Inheritance diagram for fastjet::GridMedianBackgroundEstimator:
[legend]
Collaboration diagram for fastjet::GridMedianBackgroundEstimator:
[legend]

## Public Member Functions

constructors and destructors
| GridMedianBackgroundEstimator (double ymax, double requested_grid_spacing)
| GridMedianBackgroundEstimator (const RectangularGrid &grid)
| Constructor based on a user's fully specified RectangularGrid.
| GridMedianBackgroundEstimator (double rapmin_in, double rapmax_in, double drap_in, double dphi_in, Selector tile_selector=Selector())
| Constructor with the explicit parameters for the underlying RectangularGrid.
setting a new event
void | set_particles (const std::vector< PseudoJet > &particles) override
| tell the background estimator that it has a new event, composed of the specified particles.
void | set_compute_rho_m (bool enable)
| determine whether the automatic calculation of rho_m and sigma_m is enabled (by default true)
BackgroundEstimatorBase * | copy () const override
| return a pointer to a copy of this BGE; the user is responsible for eventually deleting the resulting object.
retrieving fundamental information
BackgroundEstimate | estimate () const override
| get the full set of background properties
BackgroundEstimate | estimate (const PseudoJet &jet) const override
| get the full set of background properties for a given reference jet
double | rho () const override
| returns rho, the median background density per unit area
double | sigma () const override
| returns sigma, the background fluctuations per unit area; must be multipled by sqrt(area) to get fluctuations for a region of a given area.
double | rho (const PseudoJet &jet) override
| returns rho, the background density per unit area, locally at the position of a given jet.
double | sigma (const PseudoJet &jet) override
| returns sigma, the background fluctuations per unit area, locally at the position of a given jet.
bool | has_sigma () const override
| returns true if this background estimator has support for determination of sigma
double | rho_m () const override
| Returns rho_m, the purely longitudinal, particle-mass-induced component of the background density per unit area.
double | sigma_m () const override
| returns sigma_m, a measure of the fluctuations in the purely longitudinal, particle-mass-induced component of the background density per unit area; must be multipled by sqrt(area) to get fluctuations for a region of a given area.
double | rho_m (const PseudoJet &jet) override
| Returns rho_m locally at the jet position. As for rho(jet), it is non-const.
double | sigma_m (const PseudoJet &jet) override
| Returns sigma_m locally at the jet position. As for rho(jet), it is non-const.
bool | has_rho_m () const override
| Returns true if this background estimator has support for determination of rho_m.
double | mean_area () const
| returns the area of the grid cells (all identical, but referred to as "mean" area for uniformity with JetMedianBGE).
configuring the behaviour
virtual void | set_rescaling_class (const FunctionOfPseudoJet< double > *rescaling_class) override
| Set a pointer to a class that calculates the rescaling factor as a function of the jet (position).
Public Member Functions inherited from fastjet::BackgroundEstimatorBase
virtual | ~BackgroundEstimatorBase ()
| a default virtual destructor that does nothing
virtual void | set_particles_with_seed (const std::vector< PseudoJet > &particles, const std::vector< int > &)
| an alternative call that takes a random number generator seed (typically a vector of length 2) to ensure reproducibility of background estimators that rely on random numbers (specifically JetMedianBackgroundEstimator with ghosted areas)
const FunctionOfPseudoJet< double > * | rescaling_class () const
| return the pointer to the jet density class
Public Member Functions inherited from fastjet::RectangularGrid
| RectangularGrid (double rapmax_in, double cell_size)
| ctor with simple initialisation
| RectangularGrid (double rapmin_in, double rapmax_in, double drap_in, double dphi_in, Selector tile_selector=Selector())
| ctor with more control over initialisation
| RectangularGrid ()
| dummy ctor (will give an unusable grid)
virtual int | n_tiles () const override
| returns the total number of tiles in the tiling; valid tile indices run from 0 ... n_tiles()-1;
virtual int | n_good_tiles () const override
| returns the number of tiles that are "good"; i.e.
virtual int | tile_index (const PseudoJet &p) const override
| 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 itile) const override
| returns whether a given tile is good
virtual double | tile_area (int) const override
| returns the area of tile itile.
virtual double | mean_tile_area () const override
| returns the mean area of tiles.
double | rapmin () const
| returns the minimum rapidity extent of the grid
double | rapmax () const
| returns the maxmium rapidity extent of the grid
double | drap () const
| returns the spacing of the grid in rapidity
double | dphi () const
| returns the spacing of the grid in azimuth
virtual bool | is_initialised () const override
| returns true if the grid is in a suitably initialised state
Public Member Functions inherited from fastjet::TilingBase
virtual bool | all_tiles_good () const
| returns whether all tiles are good
virtual bool | all_tiles_equal_area () const
| returns true if all tiles have the same area
bool | is_initialized () const
virtual | ~TilingBase ()
| virtual destructor

## description

std::string | description () const override
| returns a textual description of the background estimator

## Additional Inherited Members

Protected Member Functions inherited from fastjet::BackgroundEstimatorBase
void | _set_cache_unavailable ()
void | _lock_if_needed () const
void | _unlock_if_needed () const
void | _median_and_stddev (const std::vector< double > &quantity_vector, double n_empty_jets, double &median, double &stand_dev_if_gaussian, bool do_fj2_calculation=false) const
| given a quantity in a vector (e.g.
double | _percentile (const std::vector< double > &sorted_quantity_vector, const double percentile, const double nempty=0.0, const bool do_fj2_calculation=false) const
| computes a percentile of a given sorted vector
const FunctionOfPseudoJet< double > * | _rescaling_class
bool | _cache_available
BackgroundEstimate | _cached_estimate
| all the info about what is computed
static LimitedWarning | _warnings_empty_area

## Detailed Description

Background Estimator based on the median pt/area of a set of grid cells.

Description of the method: This background estimator works by projecting the event onto a grid in rapidity and azimuth. In each grid cell, the scalar pt sum of the particles in the cell is computed. The background density is then estimated by the median of (scalar pt sum/cell area) for all cells.

Parameters: The class takes 2 arguments: the absolute rapidity extent of the cells and the size of the grid cells. Note that the size of the cell will be adjusted in azimuth to satisfy the 2pi periodicity and in rapidity to match the requested rapidity extent.

Rescaling: It is possible to use a rescaling profile. In this case, the profile needs to be set before setting the particles and it will be applied to each particle (i.e. not to each cell). Note also that in this case one needs to call rho(jet) instead of rho() [Without rescaling, they are identical]

Definition at line 67 of file GridMedianBackgroundEstimator.hh.

## Constructor & Destructor Documentation

## GridMedianBackgroundEstimator() [1/3]

fastjet::GridMedianBackgroundEstimator::GridMedianBackgroundEstimator | ( | double | ymax,
|  | double | requested_grid_spacing )

inline

Parameters

  ymax | maximal absolute rapidity extent of the grid
  requested_grid_spacing | size of the grid cell. The "real" cell size could differ due e.g. to the 2pi periodicity in azimuthal angle (size, not area)

Definition at line 79 of file GridMedianBackgroundEstimator.hh.

## GridMedianBackgroundEstimator() [2/3]

fastjet::GridMedianBackgroundEstimator::GridMedianBackgroundEstimator | ( | const RectangularGrid & | grid | ) |

inline

Constructor based on a user's fully specified RectangularGrid.

Definition at line 85 of file GridMedianBackgroundEstimator.hh.

## GridMedianBackgroundEstimator() [3/3]

fastjet::GridMedianBackgroundEstimator::GridMedianBackgroundEstimator | ( | double | rapmin_in,
|  | double | rapmax_in,
|  | double | drap_in,
|  | double | dphi_in,
|  | Selector | tile_selector = Selector() )

inline

Constructor with the explicit parameters for the underlying RectangularGrid.

Parameters

  rapmin | the minimum rapidity extent of the grid
  rapmax | the maximum rapidity extent of the grid
  drap | the grid spacing in rapidity
  dphi | the grid spacing in azimuth
  tile_selector | optional (geometric) selector to specify which tiles are good; a tile is good if a massless 4-vector at the center of the tile passes the selection

Definition at line 103 of file GridMedianBackgroundEstimator.hh.

## Member Function Documentation

## set_particles()

void fastjet::GridMedianBackgroundEstimator::set_particles | ( | const std::vector< PseudoJet > & | particles | ) |

override virtual

tell the background estimator that it has a new event, composed of the specified particles.

Implements fastjet::BackgroundEstimatorBase.

Definition at line 43 of file GridMedianBackgroundEstimator.cc.

## set_compute_rho_m()

void fastjet::GridMedianBackgroundEstimator::set_compute_rho_m | ( | bool | enable | ) |

inline

determine whether the automatic calculation of rho_m and sigma_m is enabled (by default true)

Definition at line 120 of file GridMedianBackgroundEstimator.hh.

## copy()

BackgroundEstimatorBase * fastjet::GridMedianBackgroundEstimator::copy | ( |  | ) | const

inline override virtual

return a pointer to a copy of this BGE; the user is responsible for eventually deleting the resulting object.

Implements fastjet::BackgroundEstimatorBase.

Definition at line 126 of file GridMedianBackgroundEstimator.hh.

## estimate() [1/2]

BackgroundEstimate fastjet::GridMedianBackgroundEstimator::estimate | ( |  | ) | const

override virtual

get the full set of background properties

Implements fastjet::BackgroundEstimatorBase.

Definition at line 140 of file GridMedianBackgroundEstimator.cc.

## estimate() [2/2]

BackgroundEstimate fastjet::GridMedianBackgroundEstimator::estimate | ( | const PseudoJet & | jet | ) | const

override virtual

get the full set of background properties for a given reference jet

Implements fastjet::BackgroundEstimatorBase.

Definition at line 146 of file GridMedianBackgroundEstimator.cc.

## rho() [1/2]

double fastjet::GridMedianBackgroundEstimator::rho | ( |  | ) | const

override virtual

returns rho, the median background density per unit area

Implements fastjet::BackgroundEstimatorBase.

Definition at line 158 of file GridMedianBackgroundEstimator.cc.

## sigma() [1/2]

double fastjet::GridMedianBackgroundEstimator::sigma | ( |  | ) | const

override virtual

returns sigma, the background fluctuations per unit area; must be multipled by sqrt(area) to get fluctuations for a region of a given area.

Reimplemented from fastjet::BackgroundEstimatorBase.

Definition at line 168 of file GridMedianBackgroundEstimator.cc.

## rho() [2/2]

double fastjet::GridMedianBackgroundEstimator::rho | ( | const PseudoJet & | jet | ) |

override virtual

returns rho, the background density per unit area, locally at the position of a given jet.

Note that this is not const, because a user may then wish to query other aspects of the background that could depend on the position of the jet last used for a rho(jet) determination.

Implements fastjet::BackgroundEstimatorBase.

Definition at line 179 of file GridMedianBackgroundEstimator.cc.

## sigma() [2/2]

double fastjet::GridMedianBackgroundEstimator::sigma | ( | const PseudoJet & | jet | ) |

override virtual

returns sigma, the background fluctuations per unit area, locally at the position of a given jet.

As for rho(jet), it is non-const.

Reimplemented from fastjet::BackgroundEstimatorBase.

Definition at line 189 of file GridMedianBackgroundEstimator.cc.

## has_sigma()

bool fastjet::GridMedianBackgroundEstimator::has_sigma | ( |  | ) | const

inline override virtual

returns true if this background estimator has support for determination of sigma

Reimplemented from fastjet::BackgroundEstimatorBase.

Definition at line 162 of file GridMedianBackgroundEstimator.hh.

## rho_m() [1/2]

double fastjet::GridMedianBackgroundEstimator::rho_m | ( |  | ) | const

override virtual

Returns rho_m, the purely longitudinal, particle-mass-induced component of the background density per unit area.

Reimplemented from fastjet::BackgroundEstimatorBase.

Definition at line 197 of file GridMedianBackgroundEstimator.cc.

## sigma_m() [1/2]

double fastjet::GridMedianBackgroundEstimator::sigma_m | ( |  | ) | const

override virtual

returns sigma_m, a measure of the fluctuations in the purely longitudinal, particle-mass-induced component of the background density per unit area; must be multipled by sqrt(area) to get fluctuations for a region of a given area.

Reimplemented from fastjet::BackgroundEstimatorBase.

Definition at line 210 of file GridMedianBackgroundEstimator.cc.

## rho_m() [2/2]

double fastjet::GridMedianBackgroundEstimator::rho_m | ( | const PseudoJet & | jet | ) |

override virtual

Returns rho_m locally at the jet position. As for rho(jet), it is non-const.

Reimplemented from fastjet::BackgroundEstimatorBase.

Definition at line 221 of file GridMedianBackgroundEstimator.cc.

## sigma_m() [2/2]

double fastjet::GridMedianBackgroundEstimator::sigma_m | ( | const PseudoJet & | jet | ) |

override virtual

Returns sigma_m locally at the jet position. As for rho(jet), it is non-const.

Reimplemented from fastjet::BackgroundEstimatorBase.

Definition at line 231 of file GridMedianBackgroundEstimator.cc.

## has_rho_m()

bool fastjet::GridMedianBackgroundEstimator::has_rho_m | ( |  | ) | const

inline override virtual

Returns true if this background estimator has support for determination of rho_m.

Note that support for sigma_m is automatic if one has sigma and rho_m support.

Reimplemented from fastjet::BackgroundEstimatorBase.

Definition at line 186 of file GridMedianBackgroundEstimator.hh.

## mean_area()

double fastjet::GridMedianBackgroundEstimator::mean_area | ( |  | ) | const

inline

returns the area of the grid cells (all identical, but referred to as "mean" area for uniformity with JetMedianBGE).

Definition at line 191 of file GridMedianBackgroundEstimator.hh.

## set_rescaling_class()

void fastjet::GridMedianBackgroundEstimator::set_rescaling_class | ( | const FunctionOfPseudoJet< double > * | rescaling_class | ) |

override virtual

Set a pointer to a class that calculates the rescaling factor as a function of the jet (position).

Note that the rescaling factor is used both in the determination of the "global" rho (the pt/A of each jet is divided by this factor) and when asking for a local rho (the result is multiplied by this factor).

The BackgroundRescalingYPolynomial class can be used to get a rescaling that depends just on rapidity.

Note that this has to be called BEFORE any attempt to do an actual computation

The same profile will be used for both pt and mt (this is probabaly a good approximation since the particle density changes is what dominates the rapidity profile)

Reimplemented from fastjet::BackgroundEstimatorBase.

Definition at line 268 of file GridMedianBackgroundEstimator.cc.

## description()

string fastjet::GridMedianBackgroundEstimator::description | ( |  | ) | const

override virtual

returns a textual description of the background estimator

Implements fastjet::BackgroundEstimatorBase.

Definition at line 247 of file GridMedianBackgroundEstimator.cc.

The documentation for this class was generated from the following files:

- tools/fastjet/tools/GridMedianBackgroundEstimator.hh
- tools/GridMedianBackgroundEstimator.cc