fastjet::JetDefinition Class Reference

class that is intended to hold a full definition of the jet clusterer More...

#include <JetDefinition.hh>

Collaboration diagram for fastjet::JetDefinition:

Collaboration graph
fastjet::JetDefinition::DefaultRecombinerfastjet::JetDefinition::Recombinerfastjet::JetDefinition::Plugin
[legend]
List of all members.

Public Member Functions

 JetDefinition (JetAlgorithm jet_algorithm, double R, Strategy strategy, RecombinationScheme recomb_scheme=E_scheme)
 constructor to fully specify a jet-definition (together with information about how algorithically to run it).
 JetDefinition (JetAlgorithm jet_algorithm=kt_algorithm, double R=1.0, RecombinationScheme recomb_scheme=E_scheme, Strategy strategy=Best)
 constructor with alternative ordering or arguments -- note that we have not provided a default jet finder, to avoid ambiguous JetDefinition() constructor.
 JetDefinition (JetAlgorithm jet_algorithm, double R, const Recombiner *recombiner, Strategy strategy=Best)
 constructor in a form that allows the user to provide a pointer to an external recombiner class (which must remain valid for the life of the JetDefinition object).
 JetDefinition (const Plugin *plugin)
 constructor based on a pointer to a user's plugin; the object pointed to must remain valid for the whole duration of existence of the JetDefinition and any related ClusterSequences
void set_recombination_scheme (RecombinationScheme)
 set the recombination scheme to the one provided
void set_recombiner (const Recombiner *recomb)
 set the recombiner class to the one provided
const Pluginplugin () const
 return a pointer to the plugin
JetAlgorithm jet_algorithm () const
 return information about the definition...
JetAlgorithm jet_finder () const
 same as above for backward compatibility
double R () const
double extra_param () const
Strategy strategy () const
RecombinationScheme recombination_scheme () const
void set_jet_algorithm (JetAlgorithm njf)
 (re)set the jet finder
void set_jet_finder (JetAlgorithm njf)
 same as above for backward compatibility
void set_extra_param (double xtra_param)
 (re)set the general purpose extra parameter
const Recombinerrecombiner () const
 return a pointer to the currently defined recombiner (it may be the internal one)
std::string description () const
 return a textual description of the current jet definition

Private Attributes

JetAlgorithm _jet_algorithm
double _Rparam
double _extra_param
 parameter whose meaning varies according to context
Strategy _strategy
const Plugin_plugin
DefaultRecombiner _default_recombiner
const Recombiner_recombiner

Classes

class  DefaultRecombiner
 A class that will provide the recombination scheme facilities and/or allow a user to extend these facilities. More...
class  Plugin
 a class that allows a user to introduce their own "plugin" jet finder More...
class  Recombiner
 An abstract base class that will provide the recombination scheme facilities and/or allow a user to extend these facilities. More...

Detailed Description

class that is intended to hold a full definition of the jet clusterer

Definition at line 153 of file JetDefinition.hh.


Constructor & Destructor Documentation

fastjet::JetDefinition::JetDefinition ( JetAlgorithm  jet_algorithm,
double  R,
Strategy  strategy,
RecombinationScheme  recomb_scheme = E_scheme 
) [inline]

constructor to fully specify a jet-definition (together with information about how algorithically to run it).

Definition at line 169 of file JetDefinition.hh.

References fastjet::pi, fastjet::plugin_algorithm, and fastjet::plugin_strategy.

00172                                                               :
00173     _jet_algorithm(jet_algorithm), _Rparam(R), _strategy(strategy) {
00174     // the largest sensible value for R
00175     assert(_Rparam <= 0.5*pi);
00176     assert(_jet_algorithm != plugin_algorithm &&
00177            _strategy   != plugin_strategy);
00178     _plugin = NULL;
00179     set_recombination_scheme(recomb_scheme);
00180   }
  

fastjet::JetDefinition::JetDefinition ( JetAlgorithm  jet_algorithm = kt_algorithm,
double  R = 1.0,
RecombinationScheme  recomb_scheme = E_scheme,
Strategy  strategy = Best 
) [inline]

constructor with alternative ordering or arguments -- note that we have not provided a default jet finder, to avoid ambiguous JetDefinition() constructor.

Definition at line 186 of file JetDefinition.hh.

00189                                           {
00190     *this = JetDefinition(jet_algorithm, R, strategy, recomb_scheme);
00191   }

fastjet::JetDefinition::JetDefinition ( JetAlgorithm  jet_algorithm,
double  R,
const Recombiner recombiner,
Strategy  strategy = Best 
) [inline]

constructor in a form that allows the user to provide a pointer to an external recombiner class (which must remain valid for the life of the JetDefinition object).

Definition at line 197 of file JetDefinition.hh.

References fastjet::external_scheme.

00200                                           {
00201     *this = JetDefinition(jet_algorithm, R, strategy, external_scheme);
00202     _recombiner = recombiner;
00203   }

fastjet::JetDefinition::JetDefinition ( const Plugin plugin  )  [inline]

constructor based on a pointer to a user's plugin; the object pointed to must remain valid for the whole duration of existence of the JetDefinition and any related ClusterSequences

Definition at line 208 of file JetDefinition.hh.

References fastjet::E_scheme, fastjet::plugin_algorithm, and fastjet::plugin_strategy.


Member Function Documentation

void fastjet::JetDefinition::set_recombination_scheme ( RecombinationScheme   ) 

set the recombination scheme to the one provided

Definition at line 65 of file JetDefinition.cc.

References _default_recombiner, and _recombiner.

00066                                                                   {
00067   _default_recombiner = JetDefinition::DefaultRecombiner(recomb_scheme);
00068   _recombiner = 0;
00069 }

void fastjet::JetDefinition::set_recombiner ( const Recombiner recomb  )  [inline]

set the recombiner class to the one provided

Definition at line 220 of file JetDefinition.hh.

References fastjet::external_scheme.

00220                                                  {
00221     _recombiner = recomb;
00222     _default_recombiner = DefaultRecombiner(external_scheme);
00223   }

const Plugin* fastjet::JetDefinition::plugin (  )  const [inline]

return a pointer to the plugin

Definition at line 226 of file JetDefinition.hh.

Referenced by fastjet::ClusterSequence::_initialise_and_run(), fastjet::ClusterSequencePassiveArea::_initialise_and_run_PA(), and description().

00226 {return _plugin;};

JetAlgorithm fastjet::JetDefinition::jet_algorithm (  )  const [inline]

return information about the definition...

Definition at line 229 of file JetDefinition.hh.

Referenced by fastjet::ClusterSequence::_decant_options(), fastjet::ClusterSequence::_initialise_and_run(), fastjet::ClusterSequencePassiveArea::_initialise_and_run_PA(), fastjet::ClusterSequenceArea::_warn_if_range_unsuitable(), description(), and fastjet::ClusterSequence::exclusive_jets().

00229 {return _jet_algorithm  ;}

JetAlgorithm fastjet::JetDefinition::jet_finder (  )  const [inline]

same as above for backward compatibility

Definition at line 231 of file JetDefinition.hh.

00231 {return _jet_algorithm  ;}

double fastjet::JetDefinition::R (  )  const [inline]

Definition at line 232 of file JetDefinition.hh.

Referenced by fastjet::ClusterSequence::_decant_options(), fastjet::ClusterSequenceActiveArea::_initialise_AA(), fastjet::ClusterSequenceVoronoiArea::_initializeVA(), fastjet::ClusterSequenceArea::_warn_if_range_unsuitable(), description(), and fastjet::ClusterSequenceAreaBase::n_empty_jets().

00232 {return _Rparam      ;}

double fastjet::JetDefinition::extra_param (  )  const [inline]

Definition at line 235 of file JetDefinition.hh.

Referenced by description(), and fastjet::ClusterSequence::jet_scale_for_algorithm().

00235 {return _extra_param ;}

Strategy fastjet::JetDefinition::strategy (  )  const [inline]

Definition at line 236 of file JetDefinition.hh.

Referenced by fastjet::ClusterSequence::_decant_options().

00236 {return _strategy    ;}

RecombinationScheme fastjet::JetDefinition::recombination_scheme (  )  const [inline]

Definition at line 237 of file JetDefinition.hh.

00237                                                    {
00238     return _default_recombiner.scheme();}

void fastjet::JetDefinition::set_jet_algorithm ( JetAlgorithm  njf  )  [inline]

(re)set the jet finder

Definition at line 241 of file JetDefinition.hh.

00241 {_jet_algorithm = njf;}

void fastjet::JetDefinition::set_jet_finder ( JetAlgorithm  njf  )  [inline]

same as above for backward compatibility

Definition at line 243 of file JetDefinition.hh.

Referenced by fastjet::ClusterSequencePassiveArea::_initialise_and_run_PA().

00243 {_jet_algorithm = njf;}

void fastjet::JetDefinition::set_extra_param ( double  xtra_param  )  [inline]

(re)set the general purpose extra parameter

Definition at line 245 of file JetDefinition.hh.

00245 {_extra_param = xtra_param;}

const Recombiner* fastjet::JetDefinition::recombiner (  )  const [inline]

return a pointer to the currently defined recombiner (it may be the internal one)

Definition at line 249 of file JetDefinition.hh.

Referenced by fastjet::ClusterSequence::_do_ij_recombination_step(), fastjet::ClusterSequence::_fill_initial_history(), fastjet::ClusterSequenceActiveAreaExplicitGhosts::_post_process(), fastjet::ClusterSequenceActiveArea::_transfer_areas(), and description().

00249                                         {
00250     return _recombiner == 0 ? & _default_recombiner : _recombiner;}

string fastjet::JetDefinition::description (  )  const

return a textual description of the current jet definition

Definition at line 39 of file JetDefinition.cc.

References fastjet::antikt_algorithm, fastjet::cambridge_algorithm, fastjet::cambridge_for_passive_algorithm, fastjet::JetDefinition::Recombiner::description(), fastjet::JetDefinition::Plugin::description(), extra_param(), jet_algorithm(), fastjet::kt_algorithm, plugin(), fastjet::plugin_algorithm, R(), and recombiner().

Referenced by main(), and run_jet_finder().

00039                                         {
00040   ostringstream name;
00041   if (jet_algorithm() == plugin_algorithm) {
00042     return plugin()->description();
00043   } else if (jet_algorithm() == kt_algorithm) {
00044     name << "Longitudinally invariant kt algorithm with R = " << R();
00045     name << " and " << recombiner()->description();
00046   } else if (jet_algorithm() == cambridge_algorithm) {
00047     name << "Longitudinally invariant Cambridge/Aachen algorithm with R = " 
00048          << R() ;
00049     name << " and " << recombiner()->description();
00050   } else if (jet_algorithm() == antikt_algorithm) {
00051     name << "Longitudinally invariant anti-kt algorithm with R = " 
00052          << R() ;
00053     name << " and " << recombiner()->description();
00054   } else if (jet_algorithm() == cambridge_for_passive_algorithm) {
00055     name << "Longitudinally invariant Cambridge/Aachen algorithm with R = " 
00056          << R() << "and a special hack whereby particles with kt < " 
00057          << extra_param() << "are treated as passive ghosts";
00058   } else {
00059     throw Error("Unrecognized jet_finder");
00060   }
00061   return name.str();
00062 }


Member Data Documentation

JetAlgorithm fastjet::JetDefinition::_jet_algorithm [private]

Definition at line 353 of file JetDefinition.hh.

double fastjet::JetDefinition::_Rparam [private]

Definition at line 354 of file JetDefinition.hh.

double fastjet::JetDefinition::_extra_param [private]

parameter whose meaning varies according to context

Definition at line 355 of file JetDefinition.hh.

Strategy fastjet::JetDefinition::_strategy [private]

Definition at line 356 of file JetDefinition.hh.

const Plugin* fastjet::JetDefinition::_plugin [private]

Definition at line 358 of file JetDefinition.hh.

DefaultRecombiner fastjet::JetDefinition::_default_recombiner [private]

Definition at line 362 of file JetDefinition.hh.

Referenced by set_recombination_scheme().

const Recombiner* fastjet::JetDefinition::_recombiner [private]

Definition at line 363 of file JetDefinition.hh.

Referenced by set_recombination_scheme().


The documentation for this class was generated from the following files:
Generated on Thu Jan 3 19:05:18 2008 for fastjet by  doxygen 1.5.2