FastJet 3.4.1
Public Member Functions | List of all members
fastjet::NNFJN2Plain< BJ, I > Class Template Reference

Helps solve closest pair problems with factorised interparticle and beam distances (ie satisfying the FastJet lemma) More...

#include <fastjet/NNFJN2Plain.hh>

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

Public Member Functions

 NNFJN2Plain (const std::vector< PseudoJet > &jets)
 constructor with an initial set of jets (which will be assigned indices 0...jets.size()-1) More...
 
 NNFJN2Plain (const std::vector< PseudoJet > &jets, I *info)
 
virtual void start (const std::vector< PseudoJet > &jets)
 initialisation from a given list of particles More...
 
double dij_min (int &iA, int &iB)
 returns the dij_min and indices iA, iB, for the corresponding jets. More...
 
void remove_jet (int iA)
 removes the jet pointed to by index iA More...
 
void merge_jets (int iA, int iB, const PseudoJet &jet, int jet_index)
 merges the jets pointed to by indices A and B and replace them with jet, assigning it an index jet_index. More...
 
 ~NNFJN2Plain ()
 a destructor More...
 
- Public Member Functions inherited from fastjet::NNBase< _NoInfo >
 NNBase ()
 Default constructor. More...
 
 NNBase (_NoInfo *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)
 

Detailed Description

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

Helps solve closest pair problems with factorised interparticle and beam distances (ie satisfying the FastJet lemma)

(see NNBase.hh for an introductory description)

This variant provides an implementation based on the N2Plain clustering strategy in FastJet. The interparticle and beam distances should be of the form

dij = min(mom_factor(i), mom_factor(j)) * geometrical_distance(i,j)
diB = mom_factor(i) * geometrical_beam_distance(i)

The class is templated with a BJ (brief jet) class and can be used with or without an extra "Information" template, i.e. NNFJN2Plain<BJ> or NNFJN2Plain<BJ,I>

For the NNH_N2Plain<BJ> version of the class to function, BJ must provide four member functions

void BJ::init(const PseudoJet & jet); // initialise with a PseudoJet
double BJ::geometrical_distance(const BJ * other_bj_jet); // distance between this and other_bj_jet (geometrical part)
double BJ::geometrical_beam_distance(); // distance to the beam (geometrical part)
double BJ::momentum_factor(); // extra momentum factor
Class to contain pseudojets, including minimal information of use to jet-clustering routines.
Definition: PseudoJet.hh:68

For the NNH_N2Plain<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.geometrical_distance(b) == b.geometrical_distance(a)

Note that you are strongly advised to add the following lines to your BJ class to allow it to be used also with NNH:

/// make this BJ class compatible with the use of NNH
double BJ::distance(const BJ * other_bj_jet){
double mom1 = momentum_factor();
double mom2 = other_bj_jet->momentum_factor();
return (mom1<mom2 ? mom1 : mom2) * geometrical_distance(other_bj_jet);
}
double BJ::beam_distance(){
return momentum_factor() * geometrical_beam_distance();
}

Definition at line 97 of file NNFJN2Plain.hh.

Constructor & Destructor Documentation

◆ NNFJN2Plain() [1/2]

template<class BJ , class I = _NoInfo>
fastjet::NNFJN2Plain< BJ, I >::NNFJN2Plain ( 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 102 of file NNFJN2Plain.hh.

◆ NNFJN2Plain() [2/2]

template<class BJ , class I = _NoInfo>
fastjet::NNFJN2Plain< BJ, I >::NNFJN2Plain ( const std::vector< PseudoJet > &  jets,
I *  info 
)
inline

Definition at line 103 of file NNFJN2Plain.hh.

◆ ~NNFJN2Plain()

template<class BJ , class I = _NoInfo>
fastjet::NNFJN2Plain< BJ, I >::~NNFJN2Plain ( )
inline

a destructor

Definition at line 120 of file NNFJN2Plain.hh.

Member Function Documentation

◆ start()

template<class BJ , class I >
void fastjet::NNFJN2Plain< BJ, I >::start ( const std::vector< PseudoJet > &  jets)
virtual

initialisation from a given list of particles

Implements fastjet::NNBase< _NoInfo >.

Definition at line 193 of file NNFJN2Plain.hh.

◆ dij_min()

template<class BJ , class I >
double fastjet::NNFJN2Plain< BJ, I >::dij_min ( int &  iA,
int &  iB 
)
virtual

returns 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 232 of file NNFJN2Plain.hh.

◆ remove_jet()

template<class BJ , class I >
void fastjet::NNFJN2Plain< BJ, I >::remove_jet ( int  iA)
virtual

removes the jet pointed to by index iA

Implements fastjet::NNBase< _NoInfo >.

Definition at line 254 of file NNFJN2Plain.hh.

◆ merge_jets()

template<class BJ , class I >
void fastjet::NNFJN2Plain< BJ, I >::merge_jets ( int  iA,
int  iB,
const PseudoJet jet,
int  jet_index 
)
virtual

merges 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 279 of file NNFJN2Plain.hh.


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