ClusterSequenceArea Class Reference

General class for user to obtain ClusterSequence with additional area information. More...

#include <ClusterSequenceArea.hh>

Inheritance diagram for ClusterSequenceArea:
Inheritance graph
[legend]
Collaboration diagram for ClusterSequenceArea:
Collaboration graph
[legend]

List of all members.

Public Member Functions

template<class L >
 ClusterSequenceArea (const std::vector< L > &pseudojets, const JetDefinition &jet_def, const AreaDefinition &area_def_in)
 main constructor
template<class L >
 ClusterSequenceArea (const std::vector< L > &pseudojets, const JetDefinition &jet_def, const GhostedAreaSpec &ghost_spec)
 constructor with a GhostedAreaSpec
template<class L >
 ClusterSequenceArea (const std::vector< L > &pseudojets, const JetDefinition &jet_def, const VoronoiAreaSpec &voronoi_spec)
 constructor with a VoronoiAreaSpec
const AreaDefinitionarea_def () const
 return a reference to the area definition
virtual double area (const PseudoJet &jet) const
 return the area associated with the given jet
virtual double area_error (const PseudoJet &jet) const
 return the error (uncertainty) associated with the determination of the area of this jet
virtual PseudoJet area_4vector (const PseudoJet &jet) const
 return the 4-vector area
virtual double empty_area (const RangeDefinition &range) const
 return the total area, in the given rap-phi range, that is free of jets
virtual double n_empty_jets (const RangeDefinition &range) const
 return something similar to the number of pure ghost jets in the given rap-phi range in an active area case.
virtual bool is_pure_ghost (const PseudoJet &jet) const
 true if a jet is made exclusively of ghosts
virtual bool has_explicit_ghosts () const
 true if this ClusterSequence has explicit ghosts
virtual void get_median_rho_and_sigma (const std::vector< PseudoJet > &all_jets, const RangeDefinition &range, 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 compatibility between "range" and region in which ghosts are thrown.
virtual void get_median_rho_and_sigma (const RangeDefinition &range, bool use_area_4vector, double &median, double &sigma) const
 overload version of what's in the ClusterSequenceAreaBase class, which actually just does the same thing as the base version (but since we've overridden the 5-argument version above, we have to override the 4-argument version too.
virtual void get_median_rho_and_sigma (const RangeDefinition &range, 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 thing as the base version (but since we've overridden the multi-argument version above, we have to override the 5-argument version too.
virtual void parabolic_pt_per_unit_area (double &a, double &b, const RangeDefinition &range, double exclude_above=-1.0, bool use_area_4vector=false) const
 overload version of what's in the ClusterSequenceAreaBase class, which additionally checks compatibility between "range" and region in which ghosts are thrown.

Private Member Functions

void _warn_if_range_unsuitable (const RangeDefinition &range) const
 print a warning if the range is unsuitable for the current calculation of the area (e.g.
template<class L >
void initialize_and_run_cswa (const std::vector< L > &pseudojets, const JetDefinition &jet_def)

Private Attributes

std::auto_ptr
< ClusterSequenceAreaBase
_area_base
AreaDefinition _area_def

Static Private Attributes

static LimitedWarning _range_warnings
static LimitedWarning _explicit_ghosts_repeats_warnings

Detailed Description

General class for user to obtain ClusterSequence with additional area information.

Based on the area_def, it automatically dispatches the work to the appropriate actual ClusterSequenceAreaBase-derived-class to do the real work.

Definition at line 49 of file ClusterSequenceArea.hh.


Constructor & Destructor Documentation

template<class L >
ClusterSequenceArea::ClusterSequenceArea ( const std::vector< L > &  pseudojets,
const JetDefinition jet_def,
const AreaDefinition area_def_in 
) [inline]

main constructor

Definition at line 53 of file ClusterSequenceArea.hh.

References initialize_and_run_cswa().

00055                                                : _area_def(area_def_in) {
00056     initialize_and_run_cswa(pseudojets, jet_def);
00057   }

template<class L >
ClusterSequenceArea::ClusterSequenceArea ( const std::vector< L > &  pseudojets,
const JetDefinition jet_def,
const GhostedAreaSpec ghost_spec 
) [inline]

constructor with a GhostedAreaSpec

Definition at line 61 of file ClusterSequenceArea.hh.

References initialize_and_run_cswa().

00063                                                 : _area_def(ghost_spec){
00064     initialize_and_run_cswa(pseudojets, jet_def);
00065   }

template<class L >
ClusterSequenceArea::ClusterSequenceArea ( const std::vector< L > &  pseudojets,
const JetDefinition jet_def,
const VoronoiAreaSpec voronoi_spec 
) [inline]

constructor with a VoronoiAreaSpec

Definition at line 69 of file ClusterSequenceArea.hh.

References initialize_and_run_cswa().

00071                                                   : _area_def(voronoi_spec){
00072     initialize_and_run_cswa(pseudojets, jet_def);
00073   }


Member Function Documentation

void ClusterSequenceArea::_warn_if_range_unsuitable ( const RangeDefinition range  )  const [private]

print a warning if the range is unsuitable for the current calculation of the area (e.g.

because ghosts do not extend far enough).

Definition at line 11 of file ClusterSequenceArea.cc.

References _area_def, _range_warnings, AreaDefinition::area_type(), RangeDefinition::get_rap_limits(), GhostedAreaSpec::ghost_maxrap(), AreaDefinition::ghost_spec(), JetDefinition::jet_algorithm(), ClusterSequence::jet_def(), kt_algorithm, passive_area, JetDefinition::R(), voronoi_area, and LimitedWarning::warn().

Referenced by get_median_rho_and_sigma(), and parabolic_pt_per_unit_area().

00011                                                                                        {
00012   bool no_ghosts = (_area_def.area_type() == voronoi_area)
00013     || (_area_def.area_type() == passive_area
00014         && jet_def().jet_algorithm() == kt_algorithm);
00015   if (! no_ghosts) {
00016     double rapmin, rapmax;
00017     range.get_rap_limits(rapmin, rapmax);
00018     if (rapmin < -_area_def.ghost_spec().ghost_maxrap()+0.95*jet_def().R() ||
00019         rapmax >  _area_def.ghost_spec().ghost_maxrap()-0.95*jet_def().R()) {
00020       _range_warnings.warn("rapidity range for median (rho) extends beyond +-(ghost_maxrap - 0.95*R); this is likely to cause the results to be unreliable; safest option is to increase ghost_maxrap in the area definition");
00021     }
00022   }
00023 }

virtual double ClusterSequenceArea::area ( const PseudoJet jet  )  const [inline, virtual]

return the area associated with the given jet

Reimplemented from ClusterSequenceAreaBase.

Definition at line 80 of file ClusterSequenceArea.hh.

References _area_base.

00080                                                           {
00081     return _area_base->area(jet);}

virtual PseudoJet ClusterSequenceArea::area_4vector ( const PseudoJet jet  )  const [inline, virtual]

return the 4-vector area

Reimplemented from ClusterSequenceAreaBase.

Definition at line 89 of file ClusterSequenceArea.hh.

References _area_base.

00089                                                               {
00090     return _area_base->area_4vector(jet);}

const AreaDefinition& ClusterSequenceArea::area_def (  )  const [inline]

return a reference to the area definition

Definition at line 76 of file ClusterSequenceArea.hh.

References _area_def.

00076 {return _area_def;}

virtual double ClusterSequenceArea::area_error ( const PseudoJet jet  )  const [inline, virtual]

return the error (uncertainty) associated with the determination of the area of this jet

Reimplemented from ClusterSequenceAreaBase.

Definition at line 85 of file ClusterSequenceArea.hh.

References _area_base.

00085                                                           {
00086     return _area_base->area_error(jet);}

virtual double ClusterSequenceArea::empty_area ( const RangeDefinition range  )  const [inline, virtual]

return the total area, in the given rap-phi range, that is free of jets

Reimplemented from ClusterSequenceAreaBase.

Definition at line 105 of file ClusterSequenceArea.hh.

References _area_base.

00105                                                                  {
00106     return _area_base->empty_area(range);}

virtual void ClusterSequenceArea::get_median_rho_and_sigma ( const RangeDefinition range,
bool  use_area_4vector,
double &  median,
double &  sigma,
double &  mean_area 
) const [inline, virtual]

overload version of what's in the ClusterSequenceAreaBase class, which actually just does the same thing as the base version (but since we've overridden the multi-argument version above, we have to override the 5-argument version too.

Reimplemented from ClusterSequenceAreaBase.

Definition at line 158 of file ClusterSequenceArea.hh.

References get_median_rho_and_sigma().

00161                                                                   {
00162     ClusterSequenceAreaBase::get_median_rho_and_sigma(range,use_area_4vector,
00163                                                       median,sigma, mean_area);
00164   }

virtual void ClusterSequenceArea::get_median_rho_and_sigma ( const RangeDefinition range,
bool  use_area_4vector,
double &  median,
double &  sigma 
) const [inline, virtual]

overload version of what's in the ClusterSequenceAreaBase class, which actually just does the same thing as the base version (but since we've overridden the 5-argument version above, we have to override the 4-argument version too.

Reimplemented from ClusterSequenceAreaBase.

Definition at line 147 of file ClusterSequenceArea.hh.

References get_median_rho_and_sigma().

00149                                                                                {
00150     ClusterSequenceAreaBase::get_median_rho_and_sigma(range,use_area_4vector,
00151                                                       median,sigma);
00152   }

virtual void ClusterSequenceArea::get_median_rho_and_sigma ( const std::vector< PseudoJet > &  all_jets,
const RangeDefinition range,
bool  use_area_4vector,
double &  median,
double &  sigma,
double &  mean_area,
bool  all_are_incl = false 
) const [inline, virtual]

overload version of what's in the ClusterSequenceAreaBase class, which additionally checks compatibility between "range" and region in which ghosts are thrown.

Reimplemented from ClusterSequenceAreaBase.

Definition at line 131 of file ClusterSequenceArea.hh.

References _warn_if_range_unsuitable().

Referenced by get_median_rho_and_sigma().

00136                                                                          {
00137     _warn_if_range_unsuitable(range);
00138     ClusterSequenceAreaBase::get_median_rho_and_sigma(
00139                                  all_jets, range, use_area_4vector,
00140                                  median, sigma, mean_area, all_are_incl);
00141   }

virtual bool ClusterSequenceArea::has_explicit_ghosts (  )  const [inline, virtual]

true if this ClusterSequence has explicit ghosts

Reimplemented from ClusterSequenceAreaBase.

Definition at line 123 of file ClusterSequenceArea.hh.

References _area_base.

00123                                            {
00124     return _area_base->has_explicit_ghosts();
00125   }

template<class L >
void ClusterSequenceArea::initialize_and_run_cswa ( const std::vector< L > &  pseudojets,
const JetDefinition jet_def 
) [inline, private]

Definition at line 199 of file ClusterSequenceArea.hh.

References _area_base, _area_def, _explicit_ghosts_repeats_warnings, active_area, active_area_explicit_ghosts, AreaDefinition::area_type(), AreaDefinition::ghost_spec(), one_ghost_passive_area, passive_area, GhostedAreaSpec::repeat(), ClusterSequence::transfer_from_sequence(), voronoi_area, AreaDefinition::voronoi_spec(), and LimitedWarning::warn().

Referenced by ClusterSequenceArea().

00202  {
00203   
00204   ClusterSequenceAreaBase * _area_base_ptr;
00205   switch(_area_def.area_type()) {
00206   case active_area:
00207     _area_base_ptr = new ClusterSequenceActiveArea(pseudojets, 
00208                                                    jet_def, 
00209                                                    _area_def.ghost_spec());
00210     break;
00211   case active_area_explicit_ghosts:
00212     if (_area_def.ghost_spec().repeat() != 1) 
00213       _explicit_ghosts_repeats_warnings.warn("Requested active area with explicit ghosts with repeat != 1; only 1 set of ghosts will be used");
00214     _area_base_ptr = new ClusterSequenceActiveAreaExplicitGhosts(pseudojets, 
00215                                                    jet_def, 
00216                                                    _area_def.ghost_spec());
00217     break;
00218   case voronoi_area:
00219     _area_base_ptr = new ClusterSequenceVoronoiArea(pseudojets, 
00220                                                    jet_def, 
00221                                                    _area_def.voronoi_spec());
00222     break;
00223   case one_ghost_passive_area:
00224     _area_base_ptr = new ClusterSequence1GhostPassiveArea(pseudojets, 
00225                                                     jet_def, 
00226                                                     _area_def.ghost_spec());
00227     break;
00228   case passive_area:
00229     _area_base_ptr = new ClusterSequencePassiveArea(pseudojets, 
00230                                                     jet_def, 
00231                                                     _area_def.ghost_spec());
00232     break;
00233   default:
00234     std::cerr << "Error: unrecognized area_type in ClusterSequenceArea:" 
00235               << _area_def.area_type() << std::endl;
00236     exit(-1);
00237   }
00238   // now copy across the information from the area base class
00239   _area_base = std::auto_ptr<ClusterSequenceAreaBase>(_area_base_ptr);
00240   transfer_from_sequence(*_area_base);
00241 }

virtual bool ClusterSequenceArea::is_pure_ghost ( const PseudoJet jet  )  const [inline, virtual]

true if a jet is made exclusively of ghosts

Reimplemented from ClusterSequenceAreaBase.

Definition at line 118 of file ClusterSequenceArea.hh.

References _area_base.

00118                                                           {
00119     return _area_base->is_pure_ghost(jet);
00120   }

virtual double ClusterSequenceArea::n_empty_jets ( const RangeDefinition range  )  const [inline, virtual]

return something similar to the number of pure ghost jets in the given rap-phi range in an active area case.

For the local implementation we return empty_area/(0.55 pi R^2), based on measured properties of ghost jets with kt and cam. Note that the number returned is a double.

Reimplemented from ClusterSequenceAreaBase.

Definition at line 113 of file ClusterSequenceArea.hh.

References _area_base.

00113                                                                    {
00114     return _area_base->n_empty_jets(range);
00115   }

virtual void ClusterSequenceArea::parabolic_pt_per_unit_area ( double &  a,
double &  b,
const RangeDefinition range,
double  exclude_above = -1.0,
bool  use_area_4vector = false 
) const [inline, virtual]

overload version of what's in the ClusterSequenceAreaBase class, which additionally checks compatibility between "range" and region in which ghosts are thrown.

Reimplemented from ClusterSequenceAreaBase.

Definition at line 170 of file ClusterSequenceArea.hh.

References _warn_if_range_unsuitable().

00173                                                                              {
00174     _warn_if_range_unsuitable(range);
00175     ClusterSequenceAreaBase::parabolic_pt_per_unit_area(
00176                                 a,b,range, exclude_above, use_area_4vector);
00177   }


Member Data Documentation

Definition at line 194 of file ClusterSequenceArea.hh.

Referenced by initialize_and_run_cswa().

FASTJET_BEGIN_NAMESPACE LimitedWarning ClusterSequenceArea::_range_warnings [static, private]

Definition at line 193 of file ClusterSequenceArea.hh.

Referenced by _warn_if_range_unsuitable().


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

Generated on 26 Feb 2010 for fastjet by  doxygen 1.6.1