1 #ifndef __FASTJET_JETDEFINITION_HH__
2 #define __FASTJET_JETDEFINITION_HH__
35 #include "fastjet/internal/numconsts.hh"
36 #include "fastjet/PseudoJet.hh"
40 FASTJET_BEGIN_NAMESPACE
239 class ClusterSequence;
270 *
this =
JetDefinition(jet_algorithm_in, R_in, strategy_in, recomb_scheme_in, 1);
279 *
this =
JetDefinition(jet_algorithm_in, dummyR, strategy_in, recomb_scheme_in, 0);
286 double xtra_param_in,
289 *
this =
JetDefinition(jet_algorithm_in, R_in, strategy_in, recomb_scheme_in, 2);
290 set_extra_param(xtra_param_in);
302 _recombiner = recombiner_in;
312 _recombiner = recombiner_in;
319 double xtra_param_in,
323 _recombiner = recombiner_in;
345 _Rparam = _plugin->R();
360 int nparameters_in = 1);
367 std::vector<PseudoJet> operator()(
const std::vector<L> & particles)
const;
390 if (_shared_recombiner()) _shared_recombiner.reset(recomb);
391 _recombiner = recomb;
409 void delete_recombiner_when_unused();
416 void delete_plugin_when_unused();
422 double R ()
const {
return _Rparam ;}
425 double extra_param ()
const {
return _extra_param ;}
426 Strategy strategy ()
const {
return _strategy ;}
428 return _default_recombiner.scheme();}
448 return _recombiner == 0 ? & _default_recombiner : _recombiner;}
452 bool has_same_recombiner(
const JetDefinition &other_jd)
const;
458 bool is_spherical()
const;
461 std::string description()
const;
464 std::string description_no_recombiner()
const;
467 static std::string algorithm_description(
const JetAlgorithm jet_alg);
470 static unsigned int n_parameters_for_algorithm(
const JetAlgorithm jet_alg);
482 virtual std::string description()
const = 0;
502 recombine(pa,pb,pres);
521 _recomb_scheme(recomb_scheme) {}
523 virtual std::string description()
const;
529 virtual void preprocess(
PseudoJet & p)
const;
551 virtual std::string description()
const = 0;
561 virtual double R()
const = 0;
572 virtual void set_ghost_separation_scale(
double scale)
const;
573 virtual double ghost_separation_scale()
const {
return 0.0;}
595 double _extra_param ;
598 const Plugin * _plugin;
603 DefaultRecombiner _default_recombiner;
604 const Recombiner * _recombiner;
621 PseudoJet join(
const std::vector<PseudoJet> & pieces,
const JetDefinition::Recombiner & recombiner);
624 PseudoJet join(
const PseudoJet & j1,
625 const JetDefinition::Recombiner & recombiner);
628 PseudoJet join(
const PseudoJet & j1,
const PseudoJet & j2,
629 const JetDefinition::Recombiner & recombiner);
632 PseudoJet join(
const PseudoJet & j1,
const PseudoJet & j2,
const PseudoJet & j3,
633 const JetDefinition::Recombiner & recombiner);
636 PseudoJet join(
const PseudoJet & j1,
const PseudoJet & j2,
const PseudoJet & j3,
const PseudoJet & j4,
637 const JetDefinition::Recombiner & recombiner);
640 FASTJET_END_NAMESPACE
644 #include "fastjet/ClusterSequence.hh"
647 #endif // __FASTJET_JETDEFINITION_HH__
pt weighted recombination of y,phi (and summing of pt's), with no preprocessing
a version of cambridge with a special distance measure for particles whose pt is < extra_param(); thi...
like the k_t but with distance measures dij = min(kti^{2p},ktj^{2p}) Delta R_{ij}^2 / R^2 diB = 1/kti...
Chan's closest pair method (in a variant with 4pi coverage), for use exclusively with the Cambridge a...
JetDefinition(JetAlgorithm jet_algorithm_in, double R_in, const Recombiner *recombiner_in, Strategy strategy_in=Best)
constructor in a form that allows the user to provide a pointer to an external recombiner class (whic...
RecombinationScheme scheme() const
return the index of the recombination scheme
void set_jet_finder(JetAlgorithm njf)
same as above for backward compatibility
best of the NlnN variants – best overall for N>10^4.
Similar to N2MHTLazy9, but uses tiles of size R/2 and a 5x5 tile grid around the particle.
the value for the jet algorithm in a JetDefinition for which no algorithm has yet been defined ...
pt^2 weighted recombination of y,phi (and summing of pt's) no preprocessing
legacy N ln N using 4pi coverage of cylinder
JetAlgorithm jet_algorithm() const
return information about the definition...
pt^2 weighted recombination of y,phi (and summing of pt's) with preprocessing to make things massless...
JetDefinition(const Plugin *plugin_in)
constructor based on a pointer to a user's plugin; the object pointed to must remain valid for the wh...
JetDefinition(JetAlgorithm jet_algorithm_in, double R_in, RecombinationScheme recomb_scheme_in=E_scheme, Strategy strategy_in=Best)
constructor with alternative ordering or arguments – note that we have not provided a default jet fi...
the e+e- genkt algorithm (R > 2 and p=1 gives ee_kt)
JetDefinition(JetAlgorithm jet_algorithm_in, double R_in, double xtra_param_in, const Recombiner *recombiner_in, Strategy strategy_in=Best)
constructor allowing the extra parameter to be set and a pointer to a recombiner
fastest from about 50..500
virtual bool supports_ghosted_passive_areas() const
return true if there is specific support for the measurement of passive areas, in the sense that area...
the longitudinally invariant kt algorithm
pt-based Winner-Takes-All (WTA) recombination: the result of the recombination has the rapidity...
const Plugin * plugin() const
return a pointer to the plugin
void set_extra_param(double xtra_param)
(re)set the general purpose extra parameter
Chan's closest pair method (in a variant with 2pi+minimal extra variant), for use exclusively with th...
JetDefinition()
a default constructor which creates a jet definition that is in a well-defined internal state...
any plugin algorithm supplied by the user
mod-p-based Winner-Takes-All (WTA) recombination: the result of the recombination gets the 3-vector d...
Like N2MHTLazy9 in a number of respects, but does not calculate ghost-ghost distances and so does not...
virtual bool is_spherical() const
returns true if the plugin implements an algorithm intended for use on a spherical geometry (e...
the plugin has been used...
virtual ~Plugin()
a destructor to be replaced if necessary in derived classes...
A class that will provide the recombination scheme facilities and/or allow a user to extend these fac...
pt^2 weighted recombination of y,phi (and summing of pt's) with preprocessing to make things massless...
worse even than the usual N^3 algorithms
JetAlgorithm jet_finder() const
same as above for backward compatibility
Like to N2MHTLazy9 but uses slightly different optimizations, e.g.
RecombinationScheme
The various recombination schemes.
string fastjet_version_string()
return a string containing information about the release
the automatic strategy choice that was being made in FJ 3.0 (restricted to strategies that were prese...
void plus_equal(PseudoJet &pa, const PseudoJet &pb) const
pa += pb in the given recombination scheme.
automatic selection of the best (based on N), including the LazyTiled strategies that are new to FJ3...
static const double max_allowable_R
R values larger than max_allowable_R are not allowed.
an implementation of C++0x shared pointers (or boost's)
pt weighted recombination of y,phi (and summing of pt's) with preprocessing to make things massless b...
pt weighted recombination of y,phi (and summing of pt's) with preprocessing to make things massless b...
const Recombiner * recombiner() const
returns a pointer to the currently defined recombiner.
const JetAlgorithm aachen_algorithm
provide other possible names for the Cambridge/Aachen algorithm
JetDefinition(JetAlgorithm jet_algorithm_in, RecombinationScheme recomb_scheme_in=E_scheme, Strategy strategy_in=Best)
constructor for algorithms that have no free parameters (e.g.
void set_recombiner(const Recombiner *recomb)
set the recombiner class to the one provided
like the k_t but with distance measures dij = min(1/kti^2,1/ktj^2) Delta R_{ij}^2 / R^2 diB = 1/kti^2...
the longitudinally invariant variant of the cambridge algorithm (aka Aachen algoithm).
virtual ~Recombiner()
a destructor to be replaced if necessary in derived classes...
virtual void preprocess(PseudoJet &) const
routine called to preprocess each input jet (to make all input jets compatible with the scheme requir...
a class that allows a user to introduce their own "plugin" jet finder
JetDefinition(JetAlgorithm jet_algorithm_in, double R_in, double xtra_param_in, RecombinationScheme recomb_scheme_in=E_scheme, Strategy strategy_in=Best)
constructor for algorithms that require R + one extra parameter to be set (the gen-kt series for exam...
An abstract base class that will provide the recombination scheme facilities and/or allow a user to e...
JetAlgorithm
the various families of jet-clustering algorithm
only looks into a neighbouring tile for a particle's nearest neighbour (NN) if that particle's in-til...
Strategy
the various options for the algorithmic strategy to adopt in clustering events with kt and cambridge ...
JetDefinition(JetAlgorithm jet_algorithm_in, const Recombiner *recombiner_in, Strategy strategy_in=Best)
constructor for case with 0 parameters (ee_kt_algorithm) and and external recombiner ...
Class to contain pseudojets, including minimal information of use to jet-clustering routines...
legacy N ln N using 3pi coverage of cylinder.
a version of genkt with a special distance measure for particles whose pt is < extra_param() [relevan...
faster that N2Tiled above about 500 particles; differs from it by retainig the di(closest j) distance...
void set_jet_algorithm(JetAlgorithm njf)
(re)set the jet finder
Chan's closest pair method (in a variant with 2pi+2R coverage), for use exclusively with the Cambridg...
for the user's external scheme
class that is intended to hold a full definition of the jet clusterer
virtual bool exclusive_sequence_meaningful() const
if this returns false then a warning will be given whenever the user requests "exclusive" jets from t...