31#ifndef __FASTJET_CLUSTERSEQUENCEAREA_HH__ 
   32#define __FASTJET_CLUSTERSEQUENCEAREA_HH__ 
   34#include "fastjet/ClusterSequenceAreaBase.hh" 
   35#include "fastjet/ClusterSequenceActiveArea.hh" 
   36#include "fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh" 
   37#include "fastjet/ClusterSequencePassiveArea.hh" 
   38#include "fastjet/ClusterSequenceVoronoiArea.hh" 
   39#include "fastjet/AreaDefinition.hh" 
   41FASTJET_BEGIN_NAMESPACE
 
   55         (
const std::vector<L> & pseudojets, 
 
   58    initialize_and_run_cswa(pseudojets, jet_def_in);
 
   63         (
const std::vector<L> & pseudojets, 
 
   66    initialize_and_run_cswa(pseudojets, jet_def_in);
 
   71         (
const std::vector<L> & pseudojets, 
 
   74    initialize_and_run_cswa(pseudojets, jet_def_in);
 
   83    return _area_base->area(jet);}
 
   88    return _area_base->area_error(jet);}
 
   92    return _area_base->area_4vector(jet);}
 
  113    return _area_base->empty_area(selector);}
 
  125    return _area_base->n_empty_jets(selector);
 
  130    return _area_base->is_pure_ghost(jet);
 
  135    return _area_base->has_explicit_ghosts();
 
  149                                        bool use_area_4vector,
 
  150                                        double & median, 
double & sigma,
 
  152                                        bool all_are_incl = 
false) const FASTJET_OVERRIDE{
 
  153    _warn_if_range_unsuitable(selector);
 
  154    ClusterSequenceAreaBase::_get_median_rho_and_sigma(
 
  155                                 all_jets, selector, use_area_4vector,
 
  156                                 median, sigma, mean_area, all_are_incl);
 
  165                                        bool use_area_4vector,
 
  166                                        double & median, 
double & sigma) 
const FASTJET_OVERRIDE{
 
  167    ClusterSequenceAreaBase::_get_median_rho_and_sigma(selector,use_area_4vector,
 
  177                                        bool use_area_4vector,
 
  178                                        double & median, 
double & sigma,
 
  179                                        double & mean_area) 
const FASTJET_OVERRIDE{
 
  180    ClusterSequenceAreaBase::_get_median_rho_and_sigma(selector,use_area_4vector,
 
  181                                                       median,sigma, mean_area);
 
  191                                          double exclude_above=-1.0, 
 
  192                                          bool use_area_4vector=
false) const FASTJET_OVERRIDE{
 
  193    return _parabolic_pt_per_unit_area(a,b,selector,exclude_above,use_area_4vector);
 
  202  void _warn_if_range_unsuitable(
const Selector & selector) 
const;
 
  204  template<
class L> 
void initialize_and_run_cswa (
 
  205                                 const std::vector<L> & pseudojets, 
 
  219  virtual void _parabolic_pt_per_unit_area(
double & a, 
double & b, 
 
  221                                          double exclude_above=-1.0, 
 
  222                                          bool use_area_4vector=
false) const FASTJET_OVERRIDE {
 
  223    _warn_if_range_unsuitable(selector);
 
  224    ClusterSequenceAreaBase::_parabolic_pt_per_unit_area(
 
  225                                a,b,selector, exclude_above, use_area_4vector);
 
  231template<
class L> 
void ClusterSequenceArea::initialize_and_run_cswa(
 
  232           const std::vector<L> & pseudojets, 
 
  233           const JetDefinition  & jet_def_in)
 
  236  ClusterSequenceAreaBase * _area_base_ptr;
 
  237  switch(_area_def.area_type()) {
 
  239    _area_base_ptr = 
new ClusterSequenceActiveArea(pseudojets, 
 
  241                                                   _area_def.ghost_spec());
 
  243  case active_area_explicit_ghosts:
 
  244    if (_area_def.ghost_spec().repeat() != 1) 
 
  245      _explicit_ghosts_repeats_warnings.warn(
"Requested active area with explicit ghosts with repeat != 1; only 1 set of ghosts will be used");
 
  246    _area_base_ptr = 
new ClusterSequenceActiveAreaExplicitGhosts(pseudojets, 
 
  248                                                   _area_def.ghost_spec());
 
  251    _area_base_ptr = 
new ClusterSequenceVoronoiArea(pseudojets, 
 
  253                                                   _area_def.voronoi_spec());
 
  255  case one_ghost_passive_area:
 
  256    _area_base_ptr = 
new ClusterSequence1GhostPassiveArea(pseudojets, 
 
  258                                                    _area_def.ghost_spec());
 
  261    _area_base_ptr = 
new ClusterSequencePassiveArea(pseudojets, 
 
  263                                                    _area_def.ghost_spec());
 
  266    std::ostringstream err;
 
  267    err << 
"Error: unrecognized area_type in ClusterSequenceArea:"  
  268        << _area_def.area_type();
 
  269    throw Error(err.str());
 
  273  _area_base = SharedPtr<ClusterSequenceAreaBase>(_area_base_ptr);
 
  274  transfer_from_sequence(*_area_base);
 
class that holds a generic area definition
 
base class that sets interface for extensions of ClusterSequence that provide information about the a...
 
General class for user to obtain ClusterSequence with additional area information.
 
virtual bool has_explicit_ghosts() const override
true if this ClusterSequence has explicit ghosts
 
const AreaDefinition & area_def() const
return a reference to the area definition
 
virtual PseudoJet area_4vector(const PseudoJet &jet) const override
return the 4-vector area
 
ClusterSequenceArea(const std::vector< L > &pseudojets, const JetDefinition &jet_def_in, const VoronoiAreaSpec &voronoi_spec)
constructor with a VoronoiAreaSpec
 
virtual double area_error(const PseudoJet &jet) const override
return the error (uncertainty) associated with the determination of the area of this jet
 
virtual void get_median_rho_and_sigma(const Selector &selector, bool use_area_4vector, double &median, double &sigma, double &mean_area) const override
overload version of what's in the ClusterSequenceAreaBase class, which actually just does the same th...
 
virtual void parabolic_pt_per_unit_area(double &a, double &b, const Selector &selector, double exclude_above=-1.0, bool use_area_4vector=false) const override
overload version of what's in the ClusterSequenceAreaBase class, which additionally checks compatibil...
 
ClusterSequenceArea(const std::vector< L > &pseudojets, const JetDefinition &jet_def_in, const AreaDefinition &area_def_in)
main constructor
 
virtual double n_empty_jets(const Selector &selector) const override
return something similar to the number of pure ghost jets in the given rap-phi range in an active are...
 
ClusterSequenceArea(const std::vector< L > &pseudojets, const JetDefinition &jet_def_in, const GhostedAreaSpec &ghost_spec)
constructor with a GhostedAreaSpec
 
virtual void get_median_rho_and_sigma(const Selector &selector, bool use_area_4vector, double &median, double &sigma) const override
overload version of what's in the ClusterSequenceAreaBase class, which actually just does the same th...
 
virtual double area(const PseudoJet &jet) const override
return the area associated with the given jet
 
virtual double empty_area(const Selector &selector) const override
return the total area, corresponding to the given selector, that is free of jets
 
virtual bool is_pure_ghost(const PseudoJet &jet) const override
true if a jet is made exclusively of ghosts
 
virtual void get_median_rho_and_sigma(const std::vector< PseudoJet > &all_jets, const Selector &selector, bool use_area_4vector, double &median, double &sigma, double &mean_area, bool all_are_incl=false) const override
overload version of what's in the ClusterSequenceAreaBase class, which additionally checks compatibil...
 
Parameters to configure the computation of jet areas using ghosts.
 
class that is intended to hold a full definition of the jet clusterer
 
class to provide facilities for giving warnings up to some maximum number of times and to provide glo...
 
Class to contain pseudojets, including minimal information of use to jet-clustering routines.
 
Class that encodes information about cuts and other selection criteria that can be applied to PseudoJ...
 
An implementation of shared pointers that is broadly similar to C++11 shared_ptr (https://en....
 
Specification for the computation of the Voronoi jet area.