Helps solve closest pair problems with generic interparticle and particle-beam distances. More...
|Default constructor. |
|NNBase (I *info)|
|Constuctor with additional Info. |
|virtual void||start (const std::vector< PseudoJet > &jets)=0|
|initialisation from a given list of particles |
|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 |
|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< I >|
|NNInfo (I *info)|
|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:
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,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)