fastjet::BackgroundEstimator Class Reference
[FastJet tools]

Class to estimate the density of the background per unit area. More...

#include <BackgroundEstimator.hh>

Collaboration diagram for fastjet::BackgroundEstimator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

constructors and destructors

 BackgroundEstimator (const ClusterSequenceAreaBase &csa, const Selector &rho_range)
 ctor from a ClusterSequence with area
 BackgroundEstimator (const std::vector< PseudoJet > &jets, const Selector &rho_range)
 ctor from a list of jets
 ~BackgroundEstimator ()
 default dtor

double rho ()
 @ name retrieving fundamental information
double sigma ()
 get sigma, the background fluctuations per unit area
double rho (const PseudoJet jet)
 get rho, the median background density oer unit area, locally at the position of a given jet.
double sigma (const PseudoJet &jet)
 get sigma, the background fluctuations per unit area, locally at the position of a given jet.

double mean_area ()
 @ name retrieving additional useful information
unsigned int n_jets_used ()
 get the number of jets used to actually compute the background properties
double n_empty_jets ()
 get the number of empty jets used when computing the background properties; (it is deduced from the empty area with an assumption about the average area of jets)
double empty_area ()
 returns the estimate of the area (within Range) that is not occupied by the jets (excluded jets are removed from this count)
configuring behaviour

BackgroundEstimatorset_reference (const PseudoJet &jet)
 for estimation using a relocatable selector (i.e.
void reset ()
 reset to default values set the list of included jets to the inclusive jets and clear the excluded ones
void set_use_area_4vector (bool use_it=true)
 specify if one uses the scalar or 4-vector area

Detailed Description

Class to estimate the density of the background per unit area.

The default behaviour of this class is to compute the global properties of the background as it is done in ClusterSequenceArea. The list of jets included in the computation of the median background is the one that passed a selection test (this could at the same time select jets in a given "range" and jets satisfying various kinematic cuts)

Default behaviour: by default the list of included jets is the inclusive jets from the given ClusterSequence; the list of explicitly excluded jets is empty; we use 4-vector area

Beware: by default, to correctly handle partially empty events, the class attempts to calculate an "empty area", based (schematically) on

range.total_area() - sum_{jets_in_range} jets.area()

For ranges with small areas, this can be innacurate (particularly relevant in dense events where empty_area should be zero and ends up not being zero).

This calculation of empty area can be avoided if you supply a ClusterSequenceArea class with explicit ghosts (ActiveAreaExplicitGhosts). This is _recommended_!

Definition at line 42 of file BackgroundEstimator.hh.


Constructor & Destructor Documentation

fastjet::BackgroundEstimator::BackgroundEstimator ( const ClusterSequenceAreaBase csa,
const Selector rho_range 
)

ctor from a ClusterSequence with area

Parameters:
csa the ClusterSequenceArea to use
rho_range the range over which jets will be considered

Pre-conditions:

  • one should be able to estimate the "empty area" (i.e. the area not occupied by jets). This is feasible is one of the following conditions is satisfied: ( i) the ClusterSequence has explicit ghosts (ii) the range has a computable area.
  • the jet algorithm must be suited for median computation (otherwise a warning will be issues) Note that selectors with e.g. hardest-jets exclusion do not have a well-defined area For these reasons, it is STRONGLY advised to use explicit ghosts

Definition at line 41 of file BackgroundEstimator.cc.

References fastjet::Selector::has_area(), fastjet::ClusterSequenceAreaBase::has_explicit_ghosts(), fastjet::ClusterSequence::inclusive_jets(), reset(), and fastjet::ClusterSequence::structure_shared_ptr().

  : _rho_range(rho_range){

  _csi = csa.structure_shared_ptr();

  // sanity checks
  //---------------
  //  (i) check the alg is appropriate
  _check_jet_alg_good_for_median();

  //  (ii) check that, if there is no explicit ghosts, the selector has an area
  if ((!csa.has_explicit_ghosts()) && (!_rho_range.has_area())){
    throw Error("BackgroundEstimator: either an area with explicit ghosts (recommended) or a Selector with finite area is needed (to allow for the computation of the empty area)");
  }

  // get the initial list of jets
  _included_jets = csa.inclusive_jets();

fastjet::BackgroundEstimator::BackgroundEstimator ( const std::vector< PseudoJet > &  jets,
const Selector rho_range 
)

ctor from a list of jets

Parameters:
jets the jets to use
rho_range the range over which jets will be considered

Pre-conditions:

  • all the jets must come from the same cluster sequence
  • As for the above ctor, one needs to be able to estimate the empty area. The conditions that the ClusterSequence must have explicit ghosts is checked on the ClusterSequence shared by the jets.
  • As for the above ctor, the jet alg must be adequate

Member Function Documentation

double fastjet::BackgroundEstimator::rho (  )  [inline]

@ name retrieving fundamental information

get rho, the median background density oer unit area

Definition at line 89 of file BackgroundEstimator.hh.

               {
    _recompute_if_needed();
    return _rho;
  }

double fastjet::BackgroundEstimator::rho ( const PseudoJet  jet  )  [inline]

get rho, the median background density oer unit area, locally at the position of a given jet.

This requires a relocatable range

Definition at line 104 of file BackgroundEstimator.hh.

                                  {
    set_reference(jet);
    return rho();
  }

double fastjet::BackgroundEstimator::sigma ( const PseudoJet jet  )  [inline]

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

This requires a relocatable range

Definition at line 113 of file BackgroundEstimator.hh.

                                     {
    set_reference(jet);
    return sigma();
  }

double fastjet::BackgroundEstimator::mean_area (  )  [inline]

@ name retrieving additional useful information

get the median area of the jets used to actually compute the background properties

Definition at line 124 of file BackgroundEstimator.hh.

                    {
    _require_uptodate();
    return _mean_area;
  }

BackgroundEstimator & fastjet::BackgroundEstimator::set_reference ( const PseudoJet jet  ) 

for estimation using a relocatable selector (i.e.

local range) this allows to set its position. Note that this HAS to be called before any attempt to compute the background properties

Definition at line 117 of file BackgroundEstimator.cc.

References fastjet::Selector::set_reference(), and fastjet::Selector::takes_reference().

                                                                            {
  // if the range is norrelocatable, do nothing
  if (_rho_range.takes_reference()){
    // relocate the range and make sure things get recomputed the next
    // time one tries to get some information
    _rho_range.set_reference(jet);
    _uptodate=false;

void fastjet::BackgroundEstimator::set_use_area_4vector ( bool  use_it = true  )  [inline]

specify if one uses the scalar or 4-vector area

Parameters:
use_it whether one uses the 4-vector area or not (true by default)

Definition at line 167 of file BackgroundEstimator.hh.

Referenced by reset().

                                               {
    _use_area_4vector = use_it;
    _uptodate = false;
  }  


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