Loading...
Searching...
No Matches
fastjet::NNH< BJ, I > Class Template Reference
Advanced usage

Help solve closest pair problems with generic interparticle and beam distance (generic case). More...

`#include <fastjet/NNH.hh>`

Inheritance diagram for fastjet::NNH< BJ, I >:
[legend]
Collaboration diagram for fastjet::NNH< BJ, I >:
[legend]

## Public Member Functions

| NNH (const std::vector< PseudoJet > &jets)
| constructor with an initial set of jets (which will be assigned indices 0 ... jets.size()-1
| NNH (const std::vector< PseudoJet > &jets, I *info)
void | start (const std::vector< PseudoJet > &jets)
| initialisation from a given list of particles
double | dij_min (int &iA, int &iB)
| return the dij_min and indices iA, iB, for the corresponding jets.
void | remove_jet (int iA)
| remove the jet pointed to by index iA
void | merge_jets (int iA, int iB, const PseudoJet &jet, int jet_index)
| merge the jets pointed to by indices A and B and replace them with jet, assigning it an index jet_index.
| ~NNH ()
| a destructor
Public Member Functions inherited from fastjet::NNBase< _NoInfo >
| NNBase ()
| Default constructor.
Public Member Functions inherited from fastjet::NNInfo< _NoInfo >
| NNInfo (_NoInfo *)
template<class BJ>
void | init_jet (BJ *briefjet, const fastjet::PseudoJet &jet, int index)

## Detailed Description

template<class BJ, class I = _NoInfo>
class fastjet::NNH< BJ, I >

Help solve closest pair problems with generic interparticle and beam distance (generic case).

(see NNBase.hh for an introductory description)

This variant provides an implementation for any distance measure. It is templated with a BJ (brief jet) classand can be used with or without an extra "Information" template, i.e. NNH<BJ> or NNH<BJ,I>

For the NNH<BJ> version of the class to function, BJ must provide three member functions

- void BJ::init(const PseudoJet & jet); // initialise with a PseudoJet
- double BJ::distance(const BJ * other_bj_jet); // distance between this and other_bj_jet
- double BJ::beam_distance() ; // distance to the beam

For the NNH<BJ,I> version to function, the BJ::init(...) member must accept an extra argument

- void BJ::init(const PseudoJet & jet, I * info); // initialise with a PseudoJet + info

NOTE: THE DISTANCE MUST BE SYMMETRIC I.E. SATISFY a.distance(b) == b.distance(a)

For an example of how the NNH<BJ> class is used, see the Jade (and EECambridge) plugins

NB: the NNH algorithm is expected N^2, but has a worst case of N^3. Many QCD problems tend to place one closer to the N^3 end of the spectrum than one would like. There is scope for further progress (cf Eppstein, Cardinal & Eppstein), nevertheless the current class is already significantly faster than standard N^3 implementations.

Definition at line 75 of file NNH.hh.

## Constructor & Destructor Documentation

## NNH() [1/2]

template<class BJ, class I = _NoInfo>

fastjet::NNH< BJ, I >::NNH | ( | const std::vector< PseudoJet > & | jets | ) |

inline

constructor with an initial set of jets (which will be assigned indices 0 ... jets.size()-1

Definition at line 80 of file NNH.hh.

## NNH() [2/2]

template<class BJ, class I = _NoInfo>

fastjet::NNH< BJ, I >::NNH | ( | const std::vector< PseudoJet > & | jets,
|  | I * | info )

inline

Definition at line 81 of file NNH.hh.

## ~NNH()

template<class BJ, class I = _NoInfo>

fastjet::NNH< BJ, I >::~NNH | ( |  | ) |

inline

a destructor

Definition at line 98 of file NNH.hh.

## Member Function Documentation

## start()

template<class BJ, class I>

void fastjet::NNH< BJ, I >::start | ( | const std::vector< PseudoJet > & | jets | ) |

virtual

initialisation from a given list of particles

Implements fastjet::NNBase< _NoInfo >.

Definition at line 157 of file NNH.hh.

## dij_min()

template<class BJ, class I>

double fastjet::NNH< BJ, I >::dij_min | ( | int & | iA,
|  | int & | iB )

virtual

return the dij_min and indices iA, iB, for the corresponding jets.

If iB < 0 then iA recombines with the beam

Implements fastjet::NNBase< _NoInfo >.

Definition at line 187 of file NNH.hh.

## remove_jet()

template<class BJ, class I>

void fastjet::NNH< BJ, I >::remove_jet | ( | int | iA | ) |

virtual

remove the jet pointed to by index iA

Implements fastjet::NNBase< _NoInfo >.

Definition at line 209 of file NNH.hh.

## merge_jets()

template<class BJ, class I>

void fastjet::NNH< BJ, I >::merge_jets | ( | int | iA,
|  | int | iB,
|  | const PseudoJet & | jet,
|  | int | jet_index )

virtual

merge the jets pointed to by indices A and B and replace them with jet, assigning it an index jet_index.

Implements fastjet::NNBase< _NoInfo >.

Definition at line 230 of file NNH.hh.

The documentation for this class was generated from the following file:

- include/fastjet/NNH.hh