fastjet 2.4.5
|
class that is intended to hold a full definition of the jet clusterer More...
#include <JetDefinition.hh>
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... | |
Public Member Functions | |
JetDefinition (JetAlgorithm jet_algorithm, double R, 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, RecombinationScheme recomb_scheme=E_scheme, Strategy strategy=Best) | |
constructor for algorithms that have no free parameters (e.g. | |
JetDefinition (JetAlgorithm jet_algorithm, double R, double xtra_param, RecombinationScheme recomb_scheme=E_scheme, Strategy strategy=Best) | |
constructor for algorithms that require R + one extra parameter to be set (the gen-kt series for example) | |
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 (JetAlgorithm jet_algorithm, const Recombiner *recombiner, Strategy strategy=Best) | |
constructor for case with 0 parameters (ee_kt_algorithm) and and external recombiner | |
JetDefinition (JetAlgorithm jet_algorithm, double R, double xtra_param, const Recombiner *recombiner, Strategy strategy=Best) | |
constructor allowing the extra parameter to be set and a pointer to a recombiner | |
JetDefinition () | |
a default constructor | |
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 | |
JetDefinition (JetAlgorithm jet_algorithm, double R, Strategy strategy, RecombinationScheme recomb_scheme=E_scheme, int nparameters=1) | |
constructor to fully specify a jet-definition (together with information about how algorithically to run it). | |
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 Plugin * | plugin () 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 Recombiner * | recombiner () 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 |
class that is intended to hold a full definition of the jet clusterer
Definition at line 160 of file JetDefinition.hh.
fastjet::JetDefinition::JetDefinition | ( | JetAlgorithm | jet_algorithm, |
double | R, | ||
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 178 of file JetDefinition.hh.
{ *this = JetDefinition(jet_algorithm, R, strategy, recomb_scheme, 1); }
fastjet::JetDefinition::JetDefinition | ( | JetAlgorithm | jet_algorithm, |
RecombinationScheme | recomb_scheme = E_scheme , |
||
Strategy | strategy = Best |
||
) | [inline] |
constructor for algorithms that have no free parameters (e.g.
ee_kt_algorithm)
Definition at line 187 of file JetDefinition.hh.
{ double dummyR = 0.0; *this = JetDefinition(jet_algorithm, dummyR, strategy, recomb_scheme, 0); }
fastjet::JetDefinition::JetDefinition | ( | JetAlgorithm | jet_algorithm, |
double | R, | ||
double | xtra_param, | ||
RecombinationScheme | recomb_scheme = E_scheme , |
||
Strategy | strategy = Best |
||
) | [inline] |
constructor for algorithms that require R + one extra parameter to be set (the gen-kt series for example)
Definition at line 196 of file JetDefinition.hh.
{ *this = JetDefinition(jet_algorithm, R, strategy, recomb_scheme, 2); set_extra_param(xtra_param); }
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 209 of file JetDefinition.hh.
References fastjet::external_scheme.
{ *this = JetDefinition(jet_algorithm, R, external_scheme, strategy); _recombiner = recombiner; }
fastjet::JetDefinition::JetDefinition | ( | JetAlgorithm | jet_algorithm, |
const Recombiner * | recombiner, | ||
Strategy | strategy = Best |
||
) | [inline] |
constructor for case with 0 parameters (ee_kt_algorithm) and and external recombiner
Definition at line 220 of file JetDefinition.hh.
References fastjet::external_scheme.
{ *this = JetDefinition(jet_algorithm, external_scheme, strategy); _recombiner = recombiner; }
fastjet::JetDefinition::JetDefinition | ( | JetAlgorithm | jet_algorithm, |
double | R, | ||
double | xtra_param, | ||
const Recombiner * | recombiner, | ||
Strategy | strategy = Best |
||
) | [inline] |
constructor allowing the extra parameter to be set and a pointer to a recombiner
Definition at line 229 of file JetDefinition.hh.
References fastjet::external_scheme.
{ *this = JetDefinition(jet_algorithm, R, external_scheme, strategy); _recombiner = recombiner; set_extra_param(xtra_param); }
fastjet::JetDefinition::JetDefinition | ( | ) | [inline] |
a default constructor
Definition at line 240 of file JetDefinition.hh.
References fastjet::kt_algorithm.
{ *this = JetDefinition(kt_algorithm, 1.0); }
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 247 of file JetDefinition.hh.
References fastjet::E_scheme, fastjet::plugin_algorithm, and fastjet::plugin_strategy.
{ _plugin = plugin; _strategy = plugin_strategy; _Rparam = _plugin->R(); _jet_algorithm = plugin_algorithm; set_recombination_scheme(E_scheme); }
fastjet::JetDefinition::JetDefinition | ( | JetAlgorithm | jet_algorithm, |
double | R, | ||
Strategy | strategy, | ||
RecombinationScheme | recomb_scheme = E_scheme , |
||
int | nparameters = 1 |
||
) |
constructor to fully specify a jet-definition (together with information about how algorithically to run it).
the ordering of arguments here is old and deprecated (except as the common constructor for internal use)
Definition at line 42 of file JetDefinition.cc.
References _plugin, _Rparam, _strategy, fastjet::ee_genkt_algorithm, fastjet::ee_kt_algorithm, fastjet::genkt_algorithm, fastjet::pi, fastjet::plugin_strategy, set_extra_param(), and set_recombination_scheme().
: _jet_algorithm(jet_algorithm), _Rparam(R), _strategy(strategy) { // set R parameter or ensure its sensibleness, as appropriate if (jet_algorithm == ee_kt_algorithm) { _Rparam = 4.0; // introduce a fictional R that ensures that // our clustering sequence will not produce // "beam" jets except when only a single particle remains. // Any value > 2 would have done here } else if (jet_algorithm != ee_genkt_algorithm) { assert(_Rparam <= 0.5*pi); } // cross-check the number of parameters that were declared in setting up the // algorithm (passed internally from the public constructors) ostringstream oss; switch (jet_algorithm) { case ee_kt_algorithm: if (nparameters != 0) oss << "ee_kt_algorithm should be constructed with 0 parameters but was called with " << nparameters << " parameter(s)\n"; break; case genkt_algorithm: case ee_genkt_algorithm: if (nparameters != 2) oss << "(ee_)genkt_algorithm should be constructed with 2 parameters but was called with " << nparameters << " parameter(s)\n"; break; default: if (nparameters != 1) oss << "The jet algorithm you requested (" << jet_algorithm << ") should be constructed with 1 parameter but was called with " << nparameters << " parameter(s)\n"; } if (oss.str() != "") throw Error(oss.str()); // make sure the strategy requested is sensible assert (_strategy != plugin_strategy); _plugin = NULL; set_recombination_scheme(recomb_scheme); set_extra_param(0.0); // make sure it's defined }
string fastjet::JetDefinition::description | ( | ) | const |
return a textual description of the current jet definition
Definition at line 90 of file JetDefinition.cc.
References fastjet::antikt_algorithm, fastjet::cambridge_algorithm, fastjet::cambridge_for_passive_algorithm, fastjet::JetDefinition::Recombiner::description(), fastjet::JetDefinition::Plugin::description(), fastjet::ee_genkt_algorithm, fastjet::ee_kt_algorithm, extra_param(), fastjet::genkt_algorithm, jet_algorithm(), fastjet::kt_algorithm, plugin(), fastjet::plugin_algorithm, R(), and recombiner().
Referenced by main(), and run_jet_finder().
{ ostringstream name; if (jet_algorithm() == plugin_algorithm) { return plugin()->description(); } else if (jet_algorithm() == kt_algorithm) { name << "Longitudinally invariant kt algorithm with R = " << R(); name << " and " << recombiner()->description(); } else if (jet_algorithm() == cambridge_algorithm) { name << "Longitudinally invariant Cambridge/Aachen algorithm with R = " << R() ; name << " and " << recombiner()->description(); } else if (jet_algorithm() == antikt_algorithm) { name << "Longitudinally invariant anti-kt algorithm with R = " << R() ; name << " and " << recombiner()->description(); } else if (jet_algorithm() == genkt_algorithm) { name << "Longitudinally invariant generalised kt algorithm with R = " << R() << ", p = " << extra_param(); name << " and " << recombiner()->description(); } else if (jet_algorithm() == cambridge_for_passive_algorithm) { name << "Longitudinally invariant Cambridge/Aachen algorithm with R = " << R() << "and a special hack whereby particles with kt < " << extra_param() << "are treated as passive ghosts"; } else if (jet_algorithm() == ee_kt_algorithm) { name << "e+e- kt (Durham) algorithm (NB: no R)"; name << " with " << recombiner()->description(); } else if (jet_algorithm() == ee_genkt_algorithm) { name << "e+e- generalised kt algorithm with R = " << R() << ", p = " << extra_param(); name << " and " << recombiner()->description(); } else { throw Error("JetDefinition::description(): unrecognized jet_finder"); } return name.str(); }
double fastjet::JetDefinition::extra_param | ( | ) | const [inline] |
Definition at line 298 of file JetDefinition.hh.
Referenced by description().
{return _extra_param ;}
JetAlgorithm fastjet::JetDefinition::jet_algorithm | ( | ) | const [inline] |
return information about the definition...
Definition at line 292 of file JetDefinition.hh.
Referenced by fastjet::ClusterSequence::_decant_options(), fastjet::ClusterSequence::_initialise_and_run(), fastjet::ClusterSequencePassiveArea::_initialise_and_run_PA(), and description().
{return _jet_algorithm ;}
JetAlgorithm fastjet::JetDefinition::jet_finder | ( | ) | const [inline] |
same as above for backward compatibility
Definition at line 294 of file JetDefinition.hh.
{return _jet_algorithm ;}
const Plugin* fastjet::JetDefinition::plugin | ( | ) | const [inline] |
return a pointer to the plugin
Definition at line 289 of file JetDefinition.hh.
Referenced by fastjet::ClusterSequencePassiveArea::_initialise_and_run_PA(), description(), and main().
{return _plugin;};
double fastjet::JetDefinition::R | ( | ) | const [inline] |
Definition at line 295 of file JetDefinition.hh.
Referenced by fastjet::ClusterSequence::_decant_options(), fastjet::ClusterSequenceActiveArea::_initialise_AA(), description(), and fastjet::ClusterSequenceAreaBase::n_empty_jets().
{return _Rparam ;}
RecombinationScheme fastjet::JetDefinition::recombination_scheme | ( | ) | const [inline] |
Definition at line 300 of file JetDefinition.hh.
{ return _default_recombiner.scheme();}
const Recombiner* fastjet::JetDefinition::recombiner | ( | ) | const [inline] |
return a pointer to the currently defined recombiner (it may be the internal one)
Definition at line 312 of file JetDefinition.hh.
Referenced by description().
{ return _recombiner == 0 ? & _default_recombiner : _recombiner;}
void fastjet::JetDefinition::set_extra_param | ( | double | xtra_param | ) | [inline] |
(re)set the general purpose extra parameter
Definition at line 308 of file JetDefinition.hh.
Referenced by fastjet::ClusterSequencePassiveArea::_initialise_and_run_PA(), and JetDefinition().
{_extra_param = xtra_param;}
void fastjet::JetDefinition::set_jet_algorithm | ( | JetAlgorithm | njf | ) | [inline] |
void fastjet::JetDefinition::set_jet_finder | ( | JetAlgorithm | njf | ) | [inline] |
same as above for backward compatibility
Definition at line 306 of file JetDefinition.hh.
Referenced by fastjet::ClusterSequencePassiveArea::_initialise_and_run_PA().
{_jet_algorithm = njf;}
void fastjet::JetDefinition::set_recombination_scheme | ( | RecombinationScheme | recomb_scheme | ) |
set the recombination scheme to the one provided
Definition at line 127 of file JetDefinition.cc.
References _default_recombiner, and _recombiner.
Referenced by JetDefinition().
{ _default_recombiner = JetDefinition::DefaultRecombiner(recomb_scheme); _recombiner = 0; }
void fastjet::JetDefinition::set_recombiner | ( | const Recombiner * | recomb | ) | [inline] |
set the recombiner class to the one provided
Definition at line 283 of file JetDefinition.hh.
References fastjet::external_scheme.
{ _recombiner = recomb; _default_recombiner = DefaultRecombiner(external_scheme); }
Strategy fastjet::JetDefinition::strategy | ( | ) | const [inline] |
Definition at line 299 of file JetDefinition.hh.
Referenced by fastjet::ClusterSequence::_decant_options(), and main().
{return _strategy ;}
Definition at line 430 of file JetDefinition.hh.
Referenced by set_recombination_scheme().
double fastjet::JetDefinition::_extra_param [private] |
parameter whose meaning varies according to context
Definition at line 423 of file JetDefinition.hh.
Definition at line 421 of file JetDefinition.hh.
const Plugin* fastjet::JetDefinition::_plugin [private] |
Definition at line 426 of file JetDefinition.hh.
Referenced by JetDefinition().
const Recombiner* fastjet::JetDefinition::_recombiner [private] |
Definition at line 431 of file JetDefinition.hh.
Referenced by set_recombination_scheme().
double fastjet::JetDefinition::_Rparam [private] |
Definition at line 422 of file JetDefinition.hh.
Referenced by JetDefinition().
Strategy fastjet::JetDefinition::_strategy [private] |
Definition at line 424 of file JetDefinition.hh.
Referenced by JetDefinition().