FastJet 3.4.1
List of all members
fastjet::GridMedianBackgroundEstimator Class Reference

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:
Inheritance graph
[legend]
Collaboration diagram for fastjet::GridMedianBackgroundEstimator:
Collaboration graph
[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. More...
 
 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. More...
 
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. More...
 
void set_compute_rho_m (bool enable)
 determine whether the automatic calculation of rho_m and sigma_m is enabled (by default true) More...
 
BackgroundEstimatorBasecopy () const override
 return a pointer to a copy of this BGE; the user is responsible for eventually deleting the resulting object. More...
 
retrieving fundamental information
BackgroundEstimate estimate () const override
 get the full set of background properties More...
 
BackgroundEstimate estimate (const PseudoJet &jet) const override
 get the full set of background properties for a given reference jet More...
 
double rho () const override
 returns rho, the median background density per unit area More...
 
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. More...
 
double rho (const PseudoJet &jet) override
 returns rho, the background density per unit area, locally at the position of a given jet. More...
 
double sigma (const PseudoJet &jet) override
 returns sigma, the background fluctuations per unit area, locally at the position of a given jet. More...
 
bool has_sigma () const override
 returns true if this background estimator has support for determination of sigma More...
 
double rho_m () const override
 Returns rho_m, the purely longitudinal, particle-mass-induced component of the background density per unit area. More...
 
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. More...
 
double rho_m (const PseudoJet &jet) override
 Returns rho_m locally at the jet position. As for rho(jet), it is non-const. More...
 
double sigma_m (const PseudoJet &jet) override
 Returns sigma_m locally at the jet position. As for rho(jet), it is non-const. More...
 
bool has_rho_m () const override
 Returns true if this background estimator has support for determination of rho_m. More...
 
double mean_area () const
 returns the area of the grid cells (all identical, but referred to as "mean" area for uniformity with JetMedianBGE). More...
 
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). More...
 
- Public Member Functions inherited from fastjet::BackgroundEstimatorBase
 BackgroundEstimatorBase ()
 
virtual ~BackgroundEstimatorBase ()
 a default virtual destructor that does nothing More...
 
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) More...
 
const FunctionOfPseudoJet< double > * rescaling_class () const
 return the pointer to the jet density class More...
 
- Public Member Functions inherited from fastjet::RectangularGrid
 RectangularGrid (double rapmax_in, double cell_size)
 ctor with simple initialisation More...
 
 RectangularGrid (double rapmin_in, double rapmax_in, double drap_in, double dphi_in, Selector tile_selector=Selector())
 ctor with more control over initialisation More...
 
 RectangularGrid ()
 dummy ctor (will give an unusable grid) More...
 
virtual int n_tiles () const override
 returns the total number of tiles in the tiling; valid tile indices run from 0 ... n_tiles()-1; More...
 
virtual int n_good_tiles () const override
 returns the number of tiles that are "good"; i.e. More...
 
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 More...
 
virtual bool tile_is_good (int itile) const override
 returns whether a given tile is good More...
 
virtual double tile_area (int) const override
 returns the area of tile itile. More...
 
virtual double mean_tile_area () const override
 returns the mean area of tiles. More...
 
virtual std::string description () const override
 returns a textual description of the grid More...
 
double rapmin () const
 returns the minimum rapidity extent of the grid More...
 
double rapmax () const
 returns the maxmium rapidity extent of the grid More...
 
double drap () const
 returns the spacing of the grid in rapidity More...
 
double dphi () const
 returns the spacing of the grid in azimuth More...
 
virtual bool is_initialised () const override
 returns true if the grid is in a suitably initialised state More...
 
- Public Member Functions inherited from fastjet::TilingBase
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 More...
 
virtual int n_tiles () const =0
 returns the total number of tiles in the tiling; valid tile indices run from 0 ... n_tiles()-1; More...
 
virtual int n_good_tiles () const
 returns the number of tiles that are "good"; i.e. More...
 
virtual bool tile_is_good (int) const
 returns whether a given tile is good More...
 
virtual bool all_tiles_good () const
 returns whether all tiles are good More...
 
virtual bool all_tiles_equal_area () const
 returns true if all tiles have the same area More...
 
virtual double tile_area (int) const
 returns the area of tile itile. More...
 
virtual double mean_tile_area () const =0
 returns the mean area of the tiles. More...
 
virtual std::string description () const =0
 returns a string to describe the tiling More...
 
virtual bool is_initialised () const =0
 returns true if the Tiling structure is in a suitably initialised state More...
 
bool is_initialized () const
 
virtual ~TilingBase ()
 virtual destructor More...
 

description

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

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. More...
 
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 More...
 
- Protected Attributes inherited from fastjet::BackgroundEstimatorBase
const FunctionOfPseudoJet< double > * _rescaling_class
 
bool _cache_available
 
BackgroundEstimate _cached_estimate
 all the info about what is computed More...
 
- Static Protected Attributes inherited from fastjet::BackgroundEstimatorBase
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
ymaxmaximal absolute rapidity extent of the grid
requested_grid_spacingsize 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
rapminthe minimum rapidity extent of the grid
rapmaxthe maximum rapidity extent of the grid
drapthe grid spacing in rapidity
dphithe grid spacing in azimuth
tile_selectoroptional (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)
overridevirtual

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
inlineoverridevirtual

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
overridevirtual

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
overridevirtual

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
overridevirtual

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
overridevirtual

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)
overridevirtual

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)
overridevirtual

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
inlineoverridevirtual

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
overridevirtual

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
overridevirtual

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)
overridevirtual

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)
overridevirtual

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
inlineoverridevirtual

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)
overridevirtual

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
overridevirtual

returns a textual description of the background estimator

Reimplemented from fastjet::RectangularGrid.

Definition at line 247 of file GridMedianBackgroundEstimator.cc.


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