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.
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.
References JetDefinition(), and strategy().
00181 { 00182 *this = JetDefinition(jet_algorithm, R, strategy, recomb_scheme, 1); 00183 }
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.
References JetDefinition(), and strategy().
00189 { 00190 double dummyR = 0.0; 00191 *this = JetDefinition(jet_algorithm, dummyR, strategy, recomb_scheme, 0); 00192 }
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.
References JetDefinition(), set_extra_param(), and strategy().
00200 { 00201 *this = JetDefinition(jet_algorithm, R, strategy, recomb_scheme, 2); 00202 set_extra_param(xtra_param); 00203 }
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 _recombiner, external_scheme, JetDefinition(), and strategy().
00212 { 00213 *this = JetDefinition(jet_algorithm, R, external_scheme, strategy); 00214 _recombiner = recombiner; 00215 }
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 _recombiner, external_scheme, JetDefinition(), and strategy().
00222 { 00223 *this = JetDefinition(jet_algorithm, external_scheme, strategy); 00224 _recombiner = recombiner; 00225 }
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 _recombiner, external_scheme, JetDefinition(), set_extra_param(), and strategy().
00233 { 00234 *this = JetDefinition(jet_algorithm, R, external_scheme, strategy); 00235 _recombiner = recombiner; 00236 set_extra_param(xtra_param); 00237 }
JetDefinition::JetDefinition | ( | ) | [inline] |
a default constructor
Definition at line 240 of file JetDefinition.hh.
References kt_algorithm.
Referenced by JetDefinition().
00240 { 00241 *this = JetDefinition(kt_algorithm, 1.0); 00242 }
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 _jet_algorithm, _plugin, _Rparam, _strategy, E_scheme, plugin_algorithm, plugin_strategy, JetDefinition::Plugin::R(), and set_recombination_scheme().
00247 { 00248 _plugin = plugin; 00249 _strategy = plugin_strategy; 00250 _Rparam = _plugin->R(); 00251 _jet_algorithm = plugin_algorithm; 00252 set_recombination_scheme(E_scheme); 00253 }
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, ee_genkt_algorithm, ee_kt_algorithm, genkt_algorithm, fastjet::pi, plugin_strategy, set_extra_param(), and set_recombination_scheme().
00046 : 00047 _jet_algorithm(jet_algorithm), _Rparam(R), _strategy(strategy) { 00048 00049 // set R parameter or ensure its sensibleness, as appropriate 00050 if (jet_algorithm == ee_kt_algorithm) { 00051 _Rparam = 4.0; // introduce a fictional R that ensures that 00052 // our clustering sequence will not produce 00053 // "beam" jets except when only a single particle remains. 00054 // Any value > 2 would have done here 00055 } else if (jet_algorithm != ee_genkt_algorithm) { 00056 assert(_Rparam <= 0.5*pi); 00057 } 00058 00059 // cross-check the number of parameters that were declared in setting up the 00060 // algorithm (passed internally from the public constructors) 00061 ostringstream oss; 00062 switch (jet_algorithm) { 00063 case ee_kt_algorithm: 00064 if (nparameters != 0) oss << "ee_kt_algorithm should be constructed with 0 parameters but was called with " 00065 << nparameters << " parameter(s)\n"; 00066 break; 00067 case genkt_algorithm: 00068 case ee_genkt_algorithm: 00069 if (nparameters != 2) oss << "(ee_)genkt_algorithm should be constructed with 2 parameters but was called with " 00070 << nparameters << " parameter(s)\n"; 00071 break; 00072 default: 00073 if (nparameters != 1) 00074 oss << "The jet algorithm you requested (" 00075 << jet_algorithm << ") should be constructed with 1 parameter but was called with " 00076 << nparameters << " parameter(s)\n"; 00077 } 00078 if (oss.str() != "") throw Error(oss.str()); 00079 00080 // make sure the strategy requested is sensible 00081 assert (_strategy != plugin_strategy); 00082 00083 _plugin = NULL; 00084 set_recombination_scheme(recomb_scheme); 00085 set_extra_param(0.0); // make sure it's defined 00086 }
string JetDefinition::description | ( | ) | const |
return a textual description of the current jet definition
Definition at line 90 of file JetDefinition.cc.
References antikt_algorithm, cambridge_algorithm, cambridge_for_passive_algorithm, JetDefinition::Recombiner::description(), JetDefinition::Plugin::description(), ee_genkt_algorithm, ee_kt_algorithm, extra_param(), genkt_algorithm, jet_algorithm(), kt_algorithm, plugin(), plugin_algorithm, R(), and recombiner().
00090 { 00091 ostringstream name; 00092 if (jet_algorithm() == plugin_algorithm) { 00093 return plugin()->description(); 00094 } else if (jet_algorithm() == kt_algorithm) { 00095 name << "Longitudinally invariant kt algorithm with R = " << R(); 00096 name << " and " << recombiner()->description(); 00097 } else if (jet_algorithm() == cambridge_algorithm) { 00098 name << "Longitudinally invariant Cambridge/Aachen algorithm with R = " 00099 << R() ; 00100 name << " and " << recombiner()->description(); 00101 } else if (jet_algorithm() == antikt_algorithm) { 00102 name << "Longitudinally invariant anti-kt algorithm with R = " 00103 << R() ; 00104 name << " and " << recombiner()->description(); 00105 } else if (jet_algorithm() == genkt_algorithm) { 00106 name << "Longitudinally invariant generalised kt algorithm with R = " 00107 << R() << ", p = " << extra_param(); 00108 name << " and " << recombiner()->description(); 00109 } else if (jet_algorithm() == cambridge_for_passive_algorithm) { 00110 name << "Longitudinally invariant Cambridge/Aachen algorithm with R = " 00111 << R() << "and a special hack whereby particles with kt < " 00112 << extra_param() << "are treated as passive ghosts"; 00113 } else if (jet_algorithm() == ee_kt_algorithm) { 00114 name << "e+e- kt (Durham) algorithm (NB: no R)"; 00115 name << " with " << recombiner()->description(); 00116 } else if (jet_algorithm() == ee_genkt_algorithm) { 00117 name << "e+e- generalised kt algorithm with R = " 00118 << R() << ", p = " << extra_param(); 00119 name << " and " << recombiner()->description(); 00120 } else { 00121 throw Error("JetDefinition::description(): unrecognized jet_finder"); 00122 } 00123 return name.str(); 00124 }
double JetDefinition::extra_param | ( | ) | const [inline] |
Definition at line 298 of file JetDefinition.hh.
References _extra_param.
Referenced by ClusterSequence::_bj_set_jetinfo(), description(), ClusterSequence::exclusive_jets(), and ClusterSequence::jet_scale_for_algorithm().
00298 {return _extra_param ;}
JetAlgorithm JetDefinition::jet_algorithm | ( | ) | const [inline] |
return information about the definition...
Definition at line 292 of file JetDefinition.hh.
References _jet_algorithm.
Referenced by ClusterSequence::_decant_options(), ClusterSequence::_initialise_and_run(), ClusterSequencePassiveArea::_initialise_and_run_PA(), ClusterSequenceArea::_warn_if_range_unsuitable(), description(), and ClusterSequence::exclusive_jets().
00292 {return _jet_algorithm ;}
JetAlgorithm JetDefinition::jet_finder | ( | ) | const [inline] |
same as above for backward compatibility
Definition at line 294 of file JetDefinition.hh.
References _jet_algorithm.
00294 {return _jet_algorithm ;}
const Plugin* JetDefinition::plugin | ( | ) | const [inline] |
return a pointer to the plugin
Definition at line 289 of file JetDefinition.hh.
References _plugin.
Referenced by ClusterSequence::_initialise_and_run(), ClusterSequencePassiveArea::_initialise_and_run_PA(), description(), and ClusterSequence::exclusive_jets().
00289 {return _plugin;};
double JetDefinition::R | ( | ) | const [inline] |
Definition at line 295 of file JetDefinition.hh.
References _Rparam.
Referenced by ClusterSequence::_decant_options(), ClusterSequenceActiveArea::_initialise_AA(), ClusterSequenceVoronoiArea::_initializeVA(), ClusterSequenceArea::_warn_if_range_unsuitable(), description(), and ClusterSequenceAreaBase::n_empty_jets().
00295 {return _Rparam ;}
RecombinationScheme JetDefinition::recombination_scheme | ( | ) | const [inline] |
Definition at line 300 of file JetDefinition.hh.
References _default_recombiner, and JetDefinition::DefaultRecombiner::scheme().
00300 { 00301 return _default_recombiner.scheme();}
const Recombiner* 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.
References _default_recombiner, and _recombiner.
Referenced by ClusterSequence::_do_ij_recombination_step(), ClusterSequence::_fill_initial_history(), and description().
00312 { 00313 return _recombiner == 0 ? & _default_recombiner : _recombiner;}
void JetDefinition::set_extra_param | ( | double | xtra_param | ) | [inline] |
(re)set the general purpose extra parameter
Definition at line 308 of file JetDefinition.hh.
References _extra_param.
Referenced by ClusterSequencePassiveArea::_initialise_and_run_PA(), and JetDefinition().
00308 {_extra_param = xtra_param;}
void JetDefinition::set_jet_algorithm | ( | JetAlgorithm | njf | ) | [inline] |
(re)set the jet finder
Definition at line 304 of file JetDefinition.hh.
References _jet_algorithm.
00304 {_jet_algorithm = njf;}
void JetDefinition::set_jet_finder | ( | JetAlgorithm | njf | ) | [inline] |
same as above for backward compatibility
Definition at line 306 of file JetDefinition.hh.
References _jet_algorithm.
Referenced by ClusterSequencePassiveArea::_initialise_and_run_PA().
00306 {_jet_algorithm = njf;}
void 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().
00128 { 00129 _default_recombiner = JetDefinition::DefaultRecombiner(recomb_scheme); 00130 _recombiner = 0; 00131 }
void JetDefinition::set_recombiner | ( | const Recombiner * | recomb | ) | [inline] |
set the recombiner class to the one provided
Definition at line 283 of file JetDefinition.hh.
References _default_recombiner, _recombiner, and external_scheme.
00283 { 00284 _recombiner = recomb; 00285 _default_recombiner = DefaultRecombiner(external_scheme); 00286 }
Strategy JetDefinition::strategy | ( | ) | const [inline] |
Definition at line 299 of file JetDefinition.hh.
References _strategy.
Referenced by ClusterSequence::_decant_options(), and JetDefinition().
00299 {return _strategy ;}
Definition at line 430 of file JetDefinition.hh.
Referenced by recombination_scheme(), recombiner(), set_recombination_scheme(), and set_recombiner().
double JetDefinition::_extra_param [private] |
parameter whose meaning varies according to context
Definition at line 423 of file JetDefinition.hh.
Referenced by extra_param(), and set_extra_param().
JetAlgorithm JetDefinition::_jet_algorithm [private] |
Definition at line 421 of file JetDefinition.hh.
Referenced by jet_algorithm(), jet_finder(), JetDefinition(), set_jet_algorithm(), and set_jet_finder().
const Plugin* JetDefinition::_plugin [private] |
Definition at line 426 of file JetDefinition.hh.
Referenced by JetDefinition(), and plugin().
const Recombiner* JetDefinition::_recombiner [private] |
Definition at line 431 of file JetDefinition.hh.
Referenced by JetDefinition(), recombiner(), set_recombination_scheme(), and set_recombiner().
double JetDefinition::_Rparam [private] |
Definition at line 422 of file JetDefinition.hh.
Referenced by JetDefinition(), and R().
Strategy JetDefinition::_strategy [private] |
Definition at line 424 of file JetDefinition.hh.
Referenced by JetDefinition(), and strategy().