FastJet 3.4.1
|
Helps solve closest pair problems with generic interparticle and particle-beam distances. More...
#include <fastjet/NNBase.hh>
Public Member Functions | |
NNBase () | |
Default constructor. More... | |
NNBase (I *info) | |
Constuctor with additional Info. More... | |
virtual void | start (const std::vector< PseudoJet > &jets)=0 |
initialisation from a given list of particles More... | |
virtual double | dij_min (int &iA, int &iB)=0 |
returns the dij_min and indices iA, iB, for the corresponding jets. More... | |
virtual void | remove_jet (int iA)=0 |
removes the jet pointed to by index iA More... | |
virtual void | merge_jets (int iA, int iB, const PseudoJet &jet, int jet_index)=0 |
merges the jets pointed to by indices A and B and replaces them with jet, assigning it an index jet_index. More... | |
Public Member Functions inherited from fastjet::NNInfo< _NoInfo > | |
NNInfo (_NoInfo *) | |
template<class BJ > | |
void | init_jet (BJ *briefjet, const fastjet::PseudoJet &jet, int index) |
Helps solve closest pair problems with generic interparticle and particle-beam distances.
This is an abstract base class which defines the interface for several classes that help carry out nearest-neighbour clustering:
If you can use NNFJN2Plain it will usually be faster than NNH. NNFJN2Tiled, where it can be used, will be faster for multiplicities above a few tens of particles.
NOTE: IN ALL CASES, THE DISTANCE MUST BE SYMMETRIC (dij=dji)!!!
All derived classes must be templated with a BriefJet (BJ) class — BJ should basically cache the minimal amount of information that is needed to efficiently calculate interparticle distances and particle-beam distances.
This class can be used with or without an extra "Information" template, i.e. NN*<BJ>
or NN*<BJ,I>
. Accordingly BJ must provide one of the two following init functions:
where info might be a pointer to a class that contains, e.g., information about R, or other parameters of the jet algorithm
The BJ then provides information about interparticle and particle-beam distances. The exact requirements depend on whether you use NNH, NNFJN2Plain or NNFJN2Tiled. (See the corresponding classes for details).
In all cases, the usage of NNBase classes works as follows:
First, from the list of particles, create an NN*<BJ>
object of the appropriate type with the appropriate BJ class (and optional extra info).
Then, cluster using a loop like this (assuming a FastJet plugin)
For an example of how the NNH<BJ> class is used, see the JadePlugin or EECambridgePlugin.
|
inline |
|
inline |
|
inlinevirtual |
|
pure virtual |
initialisation from a given list of particles
Implemented in fastjet::NNFJN2Plain< BJ, I >, fastjet::NNFJN2Tiled< BJ, I >, and fastjet::NNH< BJ, I >.
|
pure virtual |
returns the dij_min and indices iA, iB, for the corresponding jets.
If iB < 0 then iA recombines with the beam
Implemented in fastjet::NNFJN2Plain< BJ, I >, fastjet::NNFJN2Tiled< BJ, I >, and fastjet::NNH< BJ, I >.
|
pure virtual |
removes the jet pointed to by index iA
Implemented in fastjet::NNFJN2Plain< BJ, I >, fastjet::NNFJN2Tiled< BJ, I >, and fastjet::NNH< BJ, I >.
|
pure virtual |
merges the jets pointed to by indices A and B and replaces them with jet, assigning it an index jet_index.
Implemented in fastjet::NNFJN2Plain< BJ, I >, fastjet::NNFJN2Tiled< BJ, I >, and fastjet::NNH< BJ, I >.