1 #ifndef __FASTJET_JETDEFINITION_HH__
2 #define __FASTJET_JETDEFINITION_HH__
35 #include "fastjet/internal/numconsts.hh"
36 #include "fastjet/PseudoJet.hh"
37 #include "fastjet/internal/deprecated.hh"
41 FASTJET_BEGIN_NAMESPACE
240 class ClusterSequence;
271 *
this =
JetDefinition(jet_algorithm_in, R_in, recomb_scheme_in, strategy_in, 1);
280 *
this =
JetDefinition(jet_algorithm_in, dummyR, recomb_scheme_in, strategy_in, 0);
287 double xtra_param_in,
290 *
this =
JetDefinition(jet_algorithm_in, R_in, recomb_scheme_in, strategy_in, 2);
291 set_extra_param(xtra_param_in);
303 _recombiner = recombiner_in;
313 _recombiner = recombiner_in;
320 double xtra_param_in,
324 _recombiner = recombiner_in;
346 _Rparam = _plugin->R();
365 FASTJET_DEPRECATED_MSG(
"This argument ordering is deprecated. Use JetDefinition(alg, R, strategy, scheme[, n_parameters]) instead",
370 int nparameters_in = 1)){
371 (*this) =
JetDefinition(jet_algorithm_in,R_in,recomb_scheme_in,strategy_in,nparameters_in);
380 std::vector<PseudoJet> operator()(
const std::vector<L> & particles)
const;
403 if (_shared_recombiner) _shared_recombiner.reset(recomb);
404 _recombiner = recomb;
422 void delete_recombiner_when_unused();
429 void delete_plugin_when_unused();
435 double R ()
const {
return _Rparam ;}
438 double extra_param ()
const {
return _extra_param ;}
439 Strategy strategy ()
const {
return _strategy ;}
441 return _default_recombiner.scheme();}
461 return _recombiner == 0 ? & _default_recombiner : _recombiner;}
465 bool has_same_recombiner(
const JetDefinition &other_jd)
const;
471 bool is_spherical()
const;
474 std::string description()
const;
477 std::string description_no_recombiner()
const;
480 static std::string algorithm_description(
const JetAlgorithm jet_alg);
483 static unsigned int n_parameters_for_algorithm(
const JetAlgorithm jet_alg);
515 recombine(pa,pb,pres);
534 _recomb_scheme(recomb_scheme) {}
536 virtual std::string description()
const FASTJET_OVERRIDE;
542 virtual void preprocess(
PseudoJet & p)
const FASTJET_OVERRIDE;
574 virtual double R()
const = 0;
585 virtual void set_ghost_separation_scale(
double scale)
const;
586 virtual double ghost_separation_scale()
const {
return 0.0;}
608 double _extra_param ;
611 const Plugin * _plugin;
616 DefaultRecombiner _default_recombiner;
617 const Recombiner * _recombiner;
634 PseudoJet join(
const std::vector<PseudoJet> & pieces,
const JetDefinition::Recombiner & recombiner);
637 PseudoJet join(
const PseudoJet & j1,
638 const JetDefinition::Recombiner & recombiner);
641 PseudoJet join(
const PseudoJet & j1,
const PseudoJet & j2,
642 const JetDefinition::Recombiner & recombiner);
645 PseudoJet join(
const PseudoJet & j1,
const PseudoJet & j2,
const PseudoJet & j3,
646 const JetDefinition::Recombiner & recombiner);
649 PseudoJet join(
const PseudoJet & j1,
const PseudoJet & j2,
const PseudoJet & j3,
const PseudoJet & j4,
650 const JetDefinition::Recombiner & recombiner);
653 FASTJET_END_NAMESPACE
657 #include "fastjet/ClusterSequence.hh"
A class that will provide the recombination scheme facilities and/or allow a user to extend these fac...
RecombinationScheme scheme() const
return the index of the recombination scheme
a class that allows a user to introduce their own "plugin" jet finder
virtual bool is_spherical() const
returns true if the plugin implements an algorithm intended for use on a spherical geometry (e....
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...
virtual bool exclusive_sequence_meaningful() const
if this returns false then a warning will be given whenever the user requests "exclusive" jets from t...
virtual ~Plugin()
a destructor to be replaced if necessary in derived classes...
virtual std::string description() const =0
return a textual description of the jet-definition implemented in this plugin
virtual void run_clustering(ClusterSequence &) const =0
given a ClusterSequence that has been filled up with initial particles, the following function should...
An abstract base class that will provide the recombination scheme facilities and/or allow a user to e...
virtual ~Recombiner()
a destructor to be replaced if necessary in derived classes...
virtual void recombine(const PseudoJet &pa, const PseudoJet &pb, PseudoJet &pab) const =0
recombine pa and pb and put result into pab
virtual std::string description() const =0
return a textual description of the recombination scheme implemented here
virtual void preprocess(PseudoJet &) const
routine called to preprocess each input jet (to make all input jets compatible with the scheme requir...
void plus_equal(PseudoJet &pa, const PseudoJet &pb) const
pa += pb in the given recombination scheme.
class that is intended to hold a full definition of the jet clusterer
void set_jet_finder(JetAlgorithm njf)
same as above for backward compatibility
void set_jet_algorithm(JetAlgorithm njf)
(re)set the jet finder
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
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...
JetAlgorithm jet_algorithm() const
return information about the definition...
JetAlgorithm jet_finder() const
same as above for backward compatibility
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...
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...
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_extra_param(double xtra_param)
(re)set the general purpose extra parameter
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
JetDefinition()
a default constructor which creates a jet definition that is in a well-defined internal state,...
static const double max_allowable_R
R values larger than max_allowable_R are not allowed.
void set_recombiner(const Recombiner *recomb)
set the recombiner class to the one provided
const Plugin * plugin() const
return a pointer to the plugin
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 fin...
const Recombiner * recombiner() const
returns a pointer to the currently defined recombiner.
Class to contain pseudojets, including minimal information of use to jet-clustering routines.
An implementation of shared pointers that is broadly similar to C++11 shared_ptr (https://en....
Strategy
the various options for the algorithmic strategy to adopt in clustering events with kt and cambridge ...
@ N2Plain
fastest below 50
@ N3Dumb
worse even than the usual N^3 algorithms
@ N2MHTLazy9AntiKtSeparateGhosts
Like N2MHTLazy9 in a number of respects, but does not calculate ghost-ghost distances and so does not...
@ N2Tiled
fastest from about 50..500
@ NlnN3pi
legacy N ln N using 3pi coverage of cylinder.
@ N2MHTLazy9Alt
Like to N2MHTLazy9 but uses slightly different optimizations, e.g.
@ Best
automatic selection of the best (based on N), including the LazyTiled strategies that are new to FJ3....
@ plugin_strategy
the plugin has been used...
@ N2MHTLazy9
only looks into a neighbouring tile for a particle's nearest neighbour (NN) if that particle's in-til...
@ NlnN
best of the NlnN variants – best overall for N>10^4.
@ BestFJ30
the automatic strategy choice that was being made in FJ 3.0 (restricted to strategies that were prese...
@ NlnN4pi
legacy N ln N using 4pi coverage of cylinder
@ NlnNCam
Chan's closest pair method (in a variant with 2pi+minimal extra variant), for use exclusively with th...
@ NlnNCam2pi2R
Chan's closest pair method (in a variant with 2pi+2R coverage), for use exclusively with the Cambridg...
@ N2MHTLazy25
Similar to N2MHTLazy9, but uses tiles of size R/2 and a 5x5 tile grid around the particle.
@ NlnNCam4pi
Chan's closest pair method (in a variant with 4pi coverage), for use exclusively with the Cambridge a...
@ N2MinHeapTiled
faster that N2Tiled above about 500 particles; differs from it by retainig the di(closest j) distance...
RecombinationScheme
The various recombination schemes.
@ E_scheme
summing the 4-momenta
@ BIpt2_scheme
pt^2 weighted recombination of y,phi (and summing of pt's) no preprocessing
@ pt2_scheme
pt^2 weighted recombination of y,phi (and summing of pt's) with preprocessing to make things massless...
@ pt_scheme
pt weighted recombination of y,phi (and summing of pt's) with preprocessing to make things massless b...
@ external_scheme
for the user's external scheme
@ Et_scheme
pt weighted recombination of y,phi (and summing of pt's) with preprocessing to make things massless b...
@ WTA_pt_scheme
pt-based Winner-Takes-All (WTA) recombination: the result of the recombination has the rapidity,...
@ WTA_modp_scheme
mod-p-based Winner-Takes-All (WTA) recombination: the result of the recombination gets the 3-vector d...
@ BIpt_scheme
pt weighted recombination of y,phi (and summing of pt's), with no preprocessing
@ Et2_scheme
pt^2 weighted recombination of y,phi (and summing of pt's) with preprocessing to make things massless...
JetAlgorithm
the various families of jet-clustering algorithm
@ ee_genkt_algorithm
the e+e- genkt algorithm (R > 2 and p=1 gives ee_kt)
@ genkt_algorithm
like the k_t but with distance measures dij = min(kti^{2p},ktj^{2p}) Delta R_{ij}^2 / R^2 diB = 1/kti...
@ undefined_jet_algorithm
the value for the jet algorithm in a JetDefinition for which no algorithm has yet been defined
@ plugin_algorithm
any plugin algorithm supplied by the user
@ ee_kt_algorithm
the e+e- kt algorithm
@ cambridge_algorithm
the longitudinally invariant variant of the cambridge algorithm (aka Aachen algoithm).
@ cambridge_for_passive_algorithm
a version of cambridge with a special distance measure for particles whose pt is < extra_param(); thi...
@ antikt_algorithm
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
@ genkt_for_passive_algorithm
a version of genkt with a special distance measure for particles whose pt is < extra_param() [relevan...
@ kt_algorithm
the longitudinally invariant kt algorithm
string fastjet_version_string()
return a string containing information about the release
const JetAlgorithm aachen_algorithm
provide other possible names for the Cambridge/Aachen algorithm