FastJet 3.4.1
Public Member Functions | List of all members
fastjet::Subtractor Class Reference

Class that helps perform jet background subtraction. More...

#include <fastjet/tools/Subtractor.hh>

Inheritance diagram for fastjet::Subtractor:
Inheritance graph
[legend]
Collaboration diagram for fastjet::Subtractor:
Collaboration graph
[legend]

Public Member Functions

 Subtractor (const BackgroundEstimatorBase *bge)
 define a subtractor based on a BackgroundEstimator More...
 
 Subtractor (double rho)
 define a subtractor that uses a fixed value of rho, the background pt density per unit area (which must be positive) More...
 
 Subtractor (double rho, double rho_m)
 define a subtractor that uses a fixed value of rho and rho_m; both must be >= 0; More...
 
 Subtractor ()
 default constructor More...
 
virtual ~Subtractor ()
 default dtor More...
 
configuring the behaviour
void set_defaults ()
 reset all parameters to default values More...
 
void set_background_estimator (const BackgroundEstimatorBase *bge)
 
void set_use_rho_m (bool use_rho_m_in=true)
 when 'use_rho_m' is true, include in the subtraction the correction from rho_m, the purely longitudinal, particle-mass-induced component of the background density per unit area More...
 
bool use_rho_m () const
 returns whether or not the rho_m component is used More...
 
void set_safe_mass (bool safe_mass_in=true)
 when 'safe_mass' is true, ensure that the mass of the subtracted 4-vector remain positive More...
 
bool safe_mass () const
 returns whether or not safety tests on the mass are included More...
 
void set_known_selectors (const Selector &sel_known_vertex, const Selector &sel_leading_vertex)
 This is mostly intended for cherge-hadron-subtracted type of events where we wich to use vertex information to improve the subtraction. More...
 
- Public Member Functions inherited from fastjet::Transformer
 Transformer ()
 default ctor More...
 
virtual ~Transformer ()
 default dtor More...
 
virtual PseudoJet result (const PseudoJet &original) const =0
 the result of the Transformer acting on the PseudoJet. More...
 
virtual std::string description () const =0
 This should be overloaded to return a description of the Transformer. More...
 
- Public Member Functions inherited from fastjet::FunctionOfPseudoJet< PseudoJet >
 FunctionOfPseudoJet ()
 default ctor More...
 
virtual ~FunctionOfPseudoJet ()
 default dtor (virtual to allow safe polymorphism) More...
 
virtual std::string description () const
 returns a description of the function (an empty string by default) More...
 
virtual PseudoJet result (const PseudoJet &pj) const=0
 the action of the function this has to be overloaded in derived classes More...
 
PseudoJet operator() (const PseudoJet &pj) const
 apply the function using the "traditional" () operator. More...
 
std::vector< PseudoJetoperator() (const std::vector< PseudoJet > &pjs) const
 apply the function on a vector of PseudoJet, returning a vector of the results. More...
 

description and action

const BackgroundEstimatorBase_bge
 the tool used to estimate the background if has to be mutable in case its underlying selector takes a reference jet More...
 
double _rho
 the fixed value of rho and/or rho_m to use if the user has selected that option More...
 
double _rho_m
 
bool _use_rho_m
 include the rho_m correction More...
 
bool _safe_mass
 ensures that the subtracted mass is +ve More...
 
Selector _sel_known_vertex
 selects the particles with a known vertex origin More...
 
Selector _sel_leading_vertex
 amongst the particles with a known vertex origin, select those coming from the leading vertex More...
 
static const double _invalid_rho = -numeric_limits<double>::infinity()
 a value of rho that is used as a default to label that the stored rho is not valid for subtraction. More...
 
static LimitedWarning _unused_rho_m_warning
 
virtual PseudoJet result (const PseudoJet &jet) const
 returns a jet that's subtracted More...
 
virtual std::string description () const
 class description More...
 
PseudoJet _amount_to_subtract (const PseudoJet &jet) const
 compute the 4-vector that should be subtracted from the given jet More...
 

Additional Inherited Members

- Public Types inherited from fastjet::Transformer
typedef PseudoJetStructureBase StructureType
 A typedef that is needed to ensure that the PseudoJet::structure_of() template function works. More...
 

Detailed Description

Class that helps perform jet background subtraction.

This class derives from Transformer and makes use of a pointer to a BackgroundEstimatorBase object in order to determine the background in the vicinity of a given jet and then subtract area*background from the jet. It can also be initialised with a specific fixed value for the background pt density.

Input conditions

The original jet must have area support (4-vector)

Output/structure

The underlying structure of the returned, subtracted jet (i.e. constituents, pieces, etc.) is identical to that of the original jet.

Definition at line 62 of file Subtractor.hh.

Constructor & Destructor Documentation

◆ Subtractor() [1/4]

fastjet::Subtractor::Subtractor ( const BackgroundEstimatorBase bge)
inline

define a subtractor based on a BackgroundEstimator

Definition at line 65 of file Subtractor.hh.

◆ Subtractor() [2/4]

fastjet::Subtractor::Subtractor ( double  rho)

define a subtractor that uses a fixed value of rho, the background pt density per unit area (which must be positive)

Definition at line 45 of file Subtractor.cc.

◆ Subtractor() [3/4]

fastjet::Subtractor::Subtractor ( double  rho,
double  rho_m 
)

define a subtractor that uses a fixed value of rho and rho_m; both must be >= 0;

Definition at line 52 of file Subtractor.cc.

◆ Subtractor() [4/4]

fastjet::Subtractor::Subtractor ( )
inline

default constructor

Definition at line 77 of file Subtractor.hh.

◆ ~Subtractor()

virtual fastjet::Subtractor::~Subtractor ( )
inlinevirtual

default dtor

Definition at line 80 of file Subtractor.hh.

Member Function Documentation

◆ set_defaults()

void fastjet::Subtractor::set_defaults ( )

reset all parameters to default values

Note: by default, the rho_m term is not included and the safety test for the mass is not done. This is mostly for backwards compatibility with FastJet 3.0 and is highly likely to change in a future release of FastJet

Definition at line 61 of file Subtractor.cc.

◆ set_background_estimator()

void fastjet::Subtractor::set_background_estimator ( const BackgroundEstimatorBase bge)
inline

Definition at line 94 of file Subtractor.hh.

◆ set_use_rho_m()

void fastjet::Subtractor::set_use_rho_m ( bool  use_rho_m_in = true)
inline

when 'use_rho_m' is true, include in the subtraction the correction from rho_m, the purely longitudinal, particle-mass-induced component of the background density per unit area

Note: this will be switched off by default (for backwards compatibility with FastJet 3.0) but is highly likely to change in a future release of FastJet

Definition at line 107 of file Subtractor.hh.

◆ use_rho_m()

bool fastjet::Subtractor::use_rho_m ( ) const
inline

returns whether or not the rho_m component is used

Definition at line 115 of file Subtractor.hh.

◆ set_safe_mass()

void fastjet::Subtractor::set_safe_mass ( bool  safe_mass_in = true)
inline

when 'safe_mass' is true, ensure that the mass of the subtracted 4-vector remain positive

when true, if the subtracted mass is negative, we return a 4-vector with 0 mass, pt and phi from the subtracted 4-vector and the rapidity of the original, unsubtracted jet.

Note: this will be switched off by default (for backwards compatibility with FastJet 3.0) but is highly likely to change in a future release of FastJet

Definition at line 127 of file Subtractor.hh.

◆ safe_mass()

bool fastjet::Subtractor::safe_mass ( ) const
inline

returns whether or not safety tests on the mass are included

Definition at line 130 of file Subtractor.hh.

◆ set_known_selectors()

void fastjet::Subtractor::set_known_selectors ( const Selector sel_known_vertex,
const Selector sel_leading_vertex 
)
inline

This is mostly intended for cherge-hadron-subtracted type of events where we wich to use vertex information to improve the subtraction.

Given the following parameters:

Parameters
sel_known_vertexselects the particles with a known vertex origin
sel_leading_vertexamongst the particles with a known vertex origin, select those coming from the leading vertex Momentum identified as coming from the leading vertex will be kept, momentum identified as coming from a non-leading vertex will be eliminated and a regular area-median subtraction will be applied on the 4-vector sum of the particles with unknown vertex origin.

When this is set, we shall ensure that the pt of the subtracted 4-vector is at least the pt of the particles that are known to come from the leading vertex (if it fails, subtraction returns the component that is known to come from the leading vertex — or, the original unsubtracted jet if it contains no particles from the leading vertex). Furthermore, when safe_mass() is on, we also impose a similar constraint on the mass of the subtracted 4-vector (if the test fails, the longitudinal part of the subtracted 4-vector is taken from the component that is known to come from the leading vertex).

Definition at line 158 of file Subtractor.hh.

◆ result()

PseudoJet fastjet::Subtractor::result ( const PseudoJet jet) const
virtual

returns a jet that's subtracted

Parameters
jetthe jet that is to be subtracted
Returns
the subtracted jet

Implements fastjet::Transformer.

Definition at line 72 of file Subtractor.cc.

◆ description()

std::string fastjet::Subtractor::description ( ) const
virtual

class description

Implements fastjet::Transformer.

Definition at line 154 of file Subtractor.cc.

◆ _amount_to_subtract()

PseudoJet fastjet::Subtractor::_amount_to_subtract ( const PseudoJet jet) const
protected

compute the 4-vector that should be subtracted from the given jet

Definition at line 176 of file Subtractor.cc.

Member Data Documentation

◆ _bge

const BackgroundEstimatorBase* fastjet::Subtractor::_bge
protected

the tool used to estimate the background if has to be mutable in case its underlying selector takes a reference jet

Definition at line 187 of file Subtractor.hh.

◆ _rho

double fastjet::Subtractor::_rho
protected

the fixed value of rho and/or rho_m to use if the user has selected that option

Definition at line 189 of file Subtractor.hh.

◆ _rho_m

double fastjet::Subtractor::_rho_m
protected

Definition at line 189 of file Subtractor.hh.

◆ _use_rho_m

bool fastjet::Subtractor::_use_rho_m
protected

include the rho_m correction

Definition at line 192 of file Subtractor.hh.

◆ _safe_mass

bool fastjet::Subtractor::_safe_mass
protected

ensures that the subtracted mass is +ve

Definition at line 193 of file Subtractor.hh.

◆ _sel_known_vertex

Selector fastjet::Subtractor::_sel_known_vertex
protected

selects the particles with a known vertex origin

Definition at line 195 of file Subtractor.hh.

◆ _sel_leading_vertex

Selector fastjet::Subtractor::_sel_leading_vertex
protected

amongst the particles with a known vertex origin, select those coming from the leading vertex

Definition at line 197 of file Subtractor.hh.

◆ _invalid_rho

const double fastjet::Subtractor::_invalid_rho = -numeric_limits<double>::infinity()
staticprotected

a value of rho that is used as a default to label that the stored rho is not valid for subtraction.


Definition at line 208 of file Subtractor.hh.

◆ _unused_rho_m_warning

LimitedWarning fastjet::Subtractor::_unused_rho_m_warning
staticprotected

Definition at line 210 of file Subtractor.hh.


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