#include <BackgroundEstimator.h>
Public Member Functions | |
BackgroundEstimator (const ClusterSequenceAreaBase &csa, const RangeDefinition &range) | |
double | empty_area () |
double | mean_area () |
get the median area of the jets used to actually compute the background properties More... | |
double | median_rho () |
get the median rho More... | |
double | n_empty_jets () |
unsigned int | n_jets_excluded () |
unsigned int | n_jets_used () |
get the number of jets used to actually compute the background properties More... | |
void | reset () |
double | rho () |
synonym for median rho [[do we have this? Both?]] More... | |
void | set_excluded_jets (const std::vector< PseudoJet > &excluded_jets) |
void | set_included_jets (const std::vector< PseudoJet > &included_jets, bool all_from_inclusive=true) |
void | set_use_area_4vector (bool use_it=true) |
double | sigma () |
get the sigma More... | |
~BackgroundEstimator () | |
default dtor More... | |
Private Member Functions | |
void | _compute () |
do the actual job More... | |
void | _recompute_if_needed () |
Private Attributes | |
bool | _all_from_inclusive |
when true, we'll assume that the incl jets are the complete set More... | |
const ClusterSequenceAreaBase & | _csa |
cluster sequence to get jets and areas from More... | |
double | _empty_area |
the empty (pure-ghost/unclustered) area! More... | |
std::vector< PseudoJet > | _excluded_jets |
jets to be excluded More... | |
std::vector< PseudoJet > | _included_jets |
jets to be used More... | |
double | _mean_area |
mean area of the jets used to estimate the background More... | |
double | _median_rho |
background estimated density per unit area More... | |
double | _n_empty_jets |
number of empty (pure-ghost) jets More... | |
unsigned int | _n_jets_excluded |
number of jets that have explicitly been excluded More... | |
unsigned int | _n_jets_used |
number of jets used to estimate the background More... | |
const RangeDefinition & | _range |
range to compute the background in More... | |
double | _sigma |
background estimated fluctuations More... | |
bool | _uptodate |
true when the background computation is up-to-date More... | |
bool | _use_area_4vector |
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. On top of that, we provide methods to specify an explicit set of jets to use or a list of jets to exclude. We also provide all sorts of additional information regarding the background estimation like the jets that have been used or the number of pure-ghost jets.
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.h.
BackgroundEstimator::BackgroundEstimator | ( | const ClusterSequenceAreaBase & | csa, |
const RangeDefinition & | range | ||
) |
default ctor
csa | the ClusterSequenceArea to use |
range | the range over which jets will be considered |
Definition at line 24 of file BackgroundEstimator.cc.
References reset().
BackgroundEstimator::~BackgroundEstimator | ( | ) |
|
private |
do the actual job
Definition at line 58 of file BackgroundEstimator.cc.
References _all_from_inclusive, _csa, _empty_area, _excluded_jets, _included_jets, _mean_area, _median_rho, _n_empty_jets, _n_jets_excluded, _n_jets_used, _range, _sigma, _uptodate, _use_area_4vector, relativeConstraints::error, i, j, and mathSSE::sqrt().
Referenced by _recompute_if_needed().
|
inlineprivate |
check if the properties need to be recomputed and do so if needed
Definition at line 144 of file BackgroundEstimator.h.
References _compute(), and _uptodate.
Referenced by empty_area(), mean_area(), median_rho(), n_empty_jets(), n_jets_excluded(), n_jets_used(), and sigma().
|
inline |
returns the estimate of the area (within Range) that is not occupied by the jets (excluded jets are removed from this count)
Definition at line 99 of file BackgroundEstimator.h.
References _empty_area, and _recompute_if_needed().
|
inline |
get the median area of the jets used to actually compute the background properties
Definition at line 71 of file BackgroundEstimator.h.
References _mean_area, and _recompute_if_needed().
|
inline |
get the median rho
Definition at line 56 of file BackgroundEstimator.h.
References _median_rho, and _recompute_if_needed().
Referenced by rho().
|
inline |
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)
Definition at line 92 of file BackgroundEstimator.h.
References _n_empty_jets, and _recompute_if_needed().
|
inline |
get the number of jets (within the given range) that have been explicitly excluded when computing the background properties
Definition at line 84 of file BackgroundEstimator.h.
References _n_jets_excluded, and _recompute_if_needed().
|
inline |
get the number of jets used to actually compute the background properties
Definition at line 77 of file BackgroundEstimator.h.
References _n_jets_used, and _recompute_if_needed().
void BackgroundEstimator::reset | ( | void | ) |
reset to default values set the list of included jets to the inclusive jets and clear the excluded ones
Definition at line 36 of file BackgroundEstimator.cc.
References _all_from_inclusive, _csa, _empty_area, _excluded_jets, _included_jets, _mean_area, _median_rho, _n_empty_jets, _n_jets_excluded, _n_jets_used, _sigma, _uptodate, and set_use_area_4vector().
Referenced by BackgroundEstimator().
|
inline |
synonym for median rho [[do we have this? Both?]]
Definition at line 62 of file BackgroundEstimator.h.
References median_rho().
Referenced by Lepton.Lepton::absIsoFromEA(), Muon.Muon::absIsoWithFSR(), and VirtualJetProducer::writeJets().
|
inline |
set the list of explicitly excluded jets
excluded_jets | the list of jets that have to be explicitly excluded |
Definition at line 133 of file BackgroundEstimator.h.
References _excluded_jets, and _uptodate.
Referenced by VirtualJetProducer::writeJets().
|
inline |
set the list of included jets
included_jets | the list of jets to include |
all_from_included | when true, we'll assume that the cluster sequence inclusive jets give all the potential jets in the range. In practice this means that the empty area will be computed from the inclusive jets rather than from the 'included_jets'. You can overwrite the default value and send it to 'false' e.g. when the included_jets you provide are themselves a list of inclusive jets. |
Definition at line 125 of file BackgroundEstimator.h.
References _all_from_inclusive, _included_jets, and _uptodate.
|
inline |
specify if one uses the scalar or 4-vector area
use_it | whether one uses the 4-vector area or not (true by default) |
Definition at line 113 of file BackgroundEstimator.h.
References _use_area_4vector.
Referenced by reset().
|
inline |
get the sigma
Definition at line 65 of file BackgroundEstimator.h.
References _recompute_if_needed(), and _sigma.
Referenced by VirtualJetProducer::writeJets().
|
private |
when true, we'll assume that the incl jets are the complete set
Definition at line 155 of file BackgroundEstimator.h.
Referenced by _compute(), reset(), and set_included_jets().
|
private |
cluster sequence to get jets and areas from
Definition at line 151 of file BackgroundEstimator.h.
Referenced by _compute(), and reset().
|
private |
the empty (pure-ghost/unclustered) area!
Definition at line 165 of file BackgroundEstimator.h.
Referenced by _compute(), empty_area(), and reset().
|
private |
jets to be excluded
Definition at line 154 of file BackgroundEstimator.h.
Referenced by _compute(), reset(), and set_excluded_jets().
|
private |
jets to be used
Definition at line 153 of file BackgroundEstimator.h.
Referenced by _compute(), reset(), and set_included_jets().
|
private |
mean area of the jets used to estimate the background
Definition at line 161 of file BackgroundEstimator.h.
Referenced by _compute(), mean_area(), and reset().
|
private |
background estimated density per unit area
Definition at line 159 of file BackgroundEstimator.h.
Referenced by _compute(), median_rho(), and reset().
|
private |
number of empty (pure-ghost) jets
Definition at line 164 of file BackgroundEstimator.h.
Referenced by _compute(), n_empty_jets(), and reset().
|
private |
number of jets that have explicitly been excluded
Definition at line 163 of file BackgroundEstimator.h.
Referenced by _compute(), n_jets_excluded(), and reset().
|
private |
number of jets used to estimate the background
Definition at line 162 of file BackgroundEstimator.h.
Referenced by _compute(), n_jets_used(), and reset().
|
private |
range to compute the background in
Definition at line 152 of file BackgroundEstimator.h.
Referenced by _compute().
|
private |
background estimated fluctuations
Definition at line 160 of file BackgroundEstimator.h.
Referenced by _compute(), reset(), and sigma().
|
private |
true when the background computation is up-to-date
Definition at line 168 of file BackgroundEstimator.h.
Referenced by _compute(), _recompute_if_needed(), reset(), set_excluded_jets(), and set_included_jets().
|
private |
Definition at line 156 of file BackgroundEstimator.h.
Referenced by _compute(), and set_use_area_4vector().