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" 
   41 FASTJET_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);}
 
  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();
 
  148                                         bool use_area_4vector,
 
  149                                         double & median, 
double & sigma,
 
  151                                         bool all_are_incl = 
false)
 const {
 
  152     _warn_if_range_unsuitable(selector);
 
  153     ClusterSequenceAreaBase::get_median_rho_and_sigma(
 
  154                                  all_jets, selector, use_area_4vector,
 
  155                                  median, sigma, mean_area, all_are_incl);
 
  163                                         bool use_area_4vector,
 
  164                                         double & median, 
double & sigma)
 const {
 
  165     ClusterSequenceAreaBase::get_median_rho_and_sigma(selector,use_area_4vector,
 
  174                                         bool use_area_4vector,
 
  175                                         double & median, 
double & sigma,
 
  176                                         double & mean_area)
 const {
 
  177     ClusterSequenceAreaBase::get_median_rho_and_sigma(selector,use_area_4vector,
 
  178                                                       median,sigma, mean_area);
 
  187                                           double exclude_above=-1.0, 
 
  188                                           bool use_area_4vector=
false)
 const {
 
  189     _warn_if_range_unsuitable(selector);
 
  190     ClusterSequenceAreaBase::parabolic_pt_per_unit_area(
 
  191                                 a,b,selector, exclude_above, use_area_4vector);
 
  200   void _warn_if_range_unsuitable(
const Selector & selector) 
const;
 
  202   template<
class L> 
void initialize_and_run_cswa (
 
  203                                  const std::vector<L> & pseudojets, 
 
  206   std::auto_ptr<ClusterSequenceAreaBase> _area_base;
 
  214 template<
class L> 
void ClusterSequenceArea::initialize_and_run_cswa(
 
  215            const std::vector<L> & pseudojets, 
 
  216            const JetDefinition  & jet_def_in)
 
  219   ClusterSequenceAreaBase * _area_base_ptr;
 
  220   switch(_area_def.area_type()) {
 
  222     _area_base_ptr = 
new ClusterSequenceActiveArea(pseudojets, 
 
  224                                                    _area_def.ghost_spec());
 
  226   case active_area_explicit_ghosts:
 
  227     if (_area_def.ghost_spec().repeat() != 1) 
 
  228       _explicit_ghosts_repeats_warnings.warn(
"Requested active area with explicit ghosts with repeat != 1; only 1 set of ghosts will be used");
 
  229     _area_base_ptr = 
new ClusterSequenceActiveAreaExplicitGhosts(pseudojets, 
 
  231                                                    _area_def.ghost_spec());
 
  234     _area_base_ptr = 
new ClusterSequenceVoronoiArea(pseudojets, 
 
  236                                                    _area_def.voronoi_spec());
 
  238   case one_ghost_passive_area:
 
  239     _area_base_ptr = 
new ClusterSequence1GhostPassiveArea(pseudojets, 
 
  241                                                     _area_def.ghost_spec());
 
  244     _area_base_ptr = 
new ClusterSequencePassiveArea(pseudojets, 
 
  246                                                     _area_def.ghost_spec());
 
  249     std::ostringstream err;
 
  250     err << 
"Error: unrecognized area_type in ClusterSequenceArea:"  
  251         << _area_def.area_type();
 
  252     throw Error(err.str());
 
  256   _area_base = std::auto_ptr<ClusterSequenceAreaBase>(_area_base_ptr);
 
  257   transfer_from_sequence(*_area_base);
 
  260 FASTJET_END_NAMESPACE
 
  262 #endif // __FASTJET_CLUSTERSEQUENCEAREA_HH__ 
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 
overload version of what's in the ClusterSequenceAreaBase class, which additionally checks compatibil...
 
const AreaDefinition & area_def() const 
return a reference to the area definition 
 
virtual double empty_area(const Selector &selector) const 
return the total area, corresponding to the given selector, that is free of jets 
 
virtual double n_empty_jets(const Selector &selector) const 
return something similar to the number of pure ghost jets in the given rap-phi range in an active are...
 
General class for user to obtain ClusterSequence with additional area information. 
 
virtual bool is_pure_ghost(const PseudoJet &jet) const 
true if a jet is made exclusively of ghosts 
 
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 
overload version of what's in the ClusterSequenceAreaBase class, which additionally checks compatibil...
 
class that holds a generic area definition 
 
virtual double area(const PseudoJet &jet) const 
return the area associated with the given jet 
 
class to provide facilities for giving warnings up to some maximum number of times and to provide glo...
 
Specification for the computation of the Voronoi jet area. 
 
base class that sets interface for extensions of ClusterSequence that provide information about the a...
 
virtual void get_median_rho_and_sigma(const Selector &selector, bool use_area_4vector, double &median, double &sigma) const 
overload version of what's in the ClusterSequenceAreaBase class, which actually just does the same th...
 
Class that encodes information about cuts and other selection criteria that can be applied to PseudoJ...
 
virtual PseudoJet area_4vector(const PseudoJet &jet) const 
return the 4-vector area 
 
Parameters to configure the computation of jet areas using ghosts. 
 
virtual void get_median_rho_and_sigma(const Selector &selector, bool use_area_4vector, double &median, double &sigma, double &mean_area) const 
overload version of what's in the ClusterSequenceAreaBase class, which actually just does the same th...
 
Class to contain pseudojets, including minimal information of use to jet-clustering routines...
 
class that is intended to hold a full definition of the jet clusterer 
 
virtual PseudoJet area_4vector() const 
return the jet 4-vector area. 
 
virtual double area_error(const PseudoJet &jet) const 
return the error (uncertainty) associated with the determination of the area of this jet ...
 
virtual bool has_explicit_ghosts() const 
true if this ClusterSequence has explicit ghosts