29 #ifndef __FASTJET_CLUSTERSEQUENCEAREA_HH__
30 #define __FASTJET_CLUSTERSEQUENCEAREA_HH__
32 #include "fastjet/ClusterSequenceAreaBase.hh"
33 #include "fastjet/ClusterSequenceActiveArea.hh"
34 #include "fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh"
35 #include "fastjet/ClusterSequencePassiveArea.hh"
36 #include "fastjet/ClusterSequenceVoronoiArea.hh"
37 #include "fastjet/AreaDefinition.hh"
39 FASTJET_BEGIN_NAMESPACE
53 (
const std::vector<L> & pseudojets,
56 initialize_and_run_cswa(pseudojets, jet_def_in);
61 (
const std::vector<L> & pseudojets,
64 initialize_and_run_cswa(pseudojets, jet_def_in);
69 (
const std::vector<L> & pseudojets,
72 initialize_and_run_cswa(pseudojets, jet_def_in);
81 return _area_base->area(jet);}
86 return _area_base->area_error(jet);}
111 return _area_base->empty_area(selector);}
123 return _area_base->n_empty_jets(selector);
128 return _area_base->is_pure_ghost(jet);
133 return _area_base->has_explicit_ghosts();
146 bool use_area_4vector,
147 double & median,
double & sigma,
149 bool all_are_incl =
false)
const {
150 _warn_if_range_unsuitable(selector);
151 ClusterSequenceAreaBase::get_median_rho_and_sigma(
152 all_jets, selector, use_area_4vector,
153 median, sigma, mean_area, all_are_incl);
161 bool use_area_4vector,
162 double & median,
double & sigma)
const {
163 ClusterSequenceAreaBase::get_median_rho_and_sigma(selector,use_area_4vector,
172 bool use_area_4vector,
173 double & median,
double & sigma,
174 double & mean_area)
const {
175 ClusterSequenceAreaBase::get_median_rho_and_sigma(selector,use_area_4vector,
176 median,sigma, mean_area);
185 double exclude_above=-1.0,
186 bool use_area_4vector=
false)
const {
187 _warn_if_range_unsuitable(selector);
188 ClusterSequenceAreaBase::parabolic_pt_per_unit_area(
189 a,b,selector, exclude_above, use_area_4vector);
198 void _warn_if_range_unsuitable(
const Selector & selector)
const;
200 template<
class L>
void initialize_and_run_cswa (
201 const std::vector<L> & pseudojets,
204 std::auto_ptr<ClusterSequenceAreaBase> _area_base;
212 template<
class L>
void ClusterSequenceArea::initialize_and_run_cswa(
213 const std::vector<L> & pseudojets,
214 const JetDefinition & jet_def_in)
217 ClusterSequenceAreaBase * _area_base_ptr;
218 switch(_area_def.area_type()) {
220 _area_base_ptr =
new ClusterSequenceActiveArea(pseudojets,
222 _area_def.ghost_spec());
224 case active_area_explicit_ghosts:
225 if (_area_def.ghost_spec().repeat() != 1)
226 _explicit_ghosts_repeats_warnings.warn(
"Requested active area with explicit ghosts with repeat != 1; only 1 set of ghosts will be used");
227 _area_base_ptr =
new ClusterSequenceActiveAreaExplicitGhosts(pseudojets,
229 _area_def.ghost_spec());
232 _area_base_ptr =
new ClusterSequenceVoronoiArea(pseudojets,
234 _area_def.voronoi_spec());
236 case one_ghost_passive_area:
237 _area_base_ptr =
new ClusterSequence1GhostPassiveArea(pseudojets,
239 _area_def.ghost_spec());
242 _area_base_ptr =
new ClusterSequencePassiveArea(pseudojets,
244 _area_def.ghost_spec());
247 std::cerr <<
"Error: unrecognized area_type in ClusterSequenceArea:"
248 << _area_def.area_type() << std::endl;
252 _area_base = std::auto_ptr<ClusterSequenceAreaBase>(_area_base_ptr);
253 transfer_from_sequence(*_area_base);
256 FASTJET_END_NAMESPACE
258 #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