FastJet 3.0alpha3
Public Member Functions | Protected Attributes
fastjet::Subtractor Class Reference

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

#include <Subtractor.hh>

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

List of all members.

Public Member Functions

 Subtractor (BackgroundEstimator *bge)
 define a subtractor based on a BackgroundEstimator
virtual ~Subtractor ()
 default dtor
virtual PseudoJet result (const PseudoJet &jet) const
 returns a jet that's subtracted
virtual std::string description () const
 class description

Protected Attributes

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

Detailed Description

Class that helps performing jet background subtraction.

This class is nothing but a transformer that makes use of the BackgroundEstimator introduced above to subtract the background from the jet.

Options

The constructor takes as an argument a BackgroundEstimator.

Input conditions

Output/structure

The structure of the jet is not modified.

Definition at line 61 of file Subtractor.hh.


Member Function Documentation

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 35 of file Subtractor.cc.

References fastjet::PseudoJet::area_4vector(), fastjet::PseudoJet::has_area(), and fastjet::PseudoJet::perp().

                                                        {
  if (!jet.has_area()){
    throw Error("Trying to subtract a jet without area support");
  }
  
  double rho = _bge->rho(jet);
  PseudoJet subtracted_jet = jet;
  PseudoJet area4vect = jet.area_4vector();
  // sanity check
  if (rho*area4vect.perp() < jet.perp() ) { 
    // this subtraction should retain the jet's structural
    // information
    subtracted_jet -= rho*area4vect;
  } else { 
    // this sets the jet's momentum to zero while
    // maintaining all of the jet's structural information
    subtracted_jet *= 0;
  }
  return subtracted_jet;
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends