FastJet 3.4.3
Loading...
Searching...
No Matches
Public Member Functions | List of all members
fastjet::GhostedAreaSpec Class Reference

Parameters to configure the computation of jet areas using ghosts. More...

#include <fastjet/GhostedAreaSpec.hh>

Public Member Functions

 GhostedAreaSpec ()
 default constructor
 
 GhostedAreaSpec (double ghost_maxrap_in, BasicRandom< double > *user_random_generator)
 explicit constructor
 
 GhostedAreaSpec (double ghost_maxrap_in, int repeat_in=gas::def_repeat, double ghost_area_in=gas::def_ghost_area, double grid_scatter_in=gas::def_grid_scatter, double pt_scatter_in=gas::def_pt_scatter, double mean_ghost_pt_in=gas::def_mean_ghost_pt, BasicRandom< double > *user_random_generator=NULL)
 explicit constructor
 
 GhostedAreaSpec (double ghost_minrap_in, double ghost_maxrap_in, int repeat_in=gas::def_repeat, double ghost_area_in=gas::def_ghost_area, double grid_scatter_in=gas::def_grid_scatter, double pt_scatter_in=gas::def_pt_scatter, double mean_ghost_pt_in=gas::def_mean_ghost_pt, BasicRandom< double > *user_random_generator=NULL)
 explicit constructor
 
 GhostedAreaSpec (const Selector &selector, int repeat_in=gas::def_repeat, double ghost_area_in=gas::def_ghost_area, double grid_scatter_in=gas::def_grid_scatter, double pt_scatter_in=gas::def_pt_scatter, double mean_ghost_pt_in=gas::def_mean_ghost_pt, BasicRandom< double > *user_random_generator=NULL)
 constructor based on a Selector
 
void _initialize ()
 does the initialization of actual ghost parameters
 
double ghost_rapmax () const
 
double ghost_maxrap () const
 
double ghost_etamax () const
 
double ghost_maxeta () const
 
double ghost_area () const
 
double grid_scatter () const
 
double pt_scatter () const
 
double mean_ghost_pt () const
 
int repeat () const
 
bool fj2_placement () const
 
double kt_scatter () const
 
double mean_ghost_kt () const
 
double actual_ghost_area () const
 
int n_ghosts () const
 
void set_ghost_area (double val)
 
void set_ghost_rapmax (double val)
 
void set_ghost_maxrap (double val)
 
void set_ghost_etamax (double val)
 
void set_ghost_maxeta (double val)
 
void set_grid_scatter (double val)
 
void set_pt_scatter (double val)
 
void set_mean_ghost_pt (double val)
 
void set_repeat (int val)
 
void set_kt_scatter (double val)
 
void set_mean_ghost_kt (double val)
 
void set_fj2_placement (bool val)
 if val is true, set ghost placement as it was in FastJet 2.X.
 
int nphi () const
 return nphi (ghosts layed out (-nrap, 0..nphi-1), (-nrap+1,0..nphi-1), ... (nrap,0..nphi-1)
 
int nrap () const
 
void get_random_status (std::vector< int > &__iseed) const
 get all relevant information about the status of the random number generator, so that it can be reset subsequently with set_random_status.
 
void set_random_status (const std::vector< int > &__iseed)
 set the status of the random number generator, as obtained previously with get_random_status.
 
GhostedAreaSpec with_fixed_seed (const std::vector< int > &__iseed) const
 allows to return a copy of this GhostedAreaSpec with a local set of seeds
 
void get_fixed_seed (std::vector< int > &__iseed) const
 returns the current fixed seed
 
void get_last_seed (std::vector< int > &__iseed) const
 allows the user to get the seed that was used at the start of the last generation of ghosts.
 
void checkpoint_random ()
 
void restore_checkpoint_random ()
 
std::string description () const
 for a summary
 
void add_ghosts (std::vector< PseudoJet > &) const
 push a set of ghost 4-momenta onto the back of the vector of PseudoJets
 
double random_at_own_risk () const
 very deprecated public access to a random number from the internal generator
 
BasicRandom< double > & generator_at_own_risk () const
 very deprecated public access to the generator itself
 
SharedPtr< BasicRandom< double > > & user_random_generator_at_own_risk ()
 access to the user-defined random-number generator. Will be empty if not set.
 

Detailed Description

Parameters to configure the computation of jet areas using ghosts.

Class that defines the parameters that go into the measurement of active jet areas.

Notes about thread-safety.

Ghosts are generated randomly, using by default a static random number generator.

By default, we will lock the number generator during the period over which we generate the required random numbers. The procedure will keep track of the seeds that have been used to generate a particular set of ghosts and, ultimately, these seeds will be made available from ClusterSequenceArea via

ClusterSequenceArea::area_def().ghost_spec().get_last_seed(vector<int>);

To use user-specified seeds in a thread-safe way, the end-user should use

ClusterSequenceArea csa(particles, jet_def, area_def.with_fixed_seed(user_defined_seed));

or explicitly make a copy of the AreaDefinition before doing the clustering:

AreaDefinition local_area_def = area_def.with_fixed_seed(user_defined_seed); ClusterSequenceArea csa(particles, jet_def, area_def,local_area_def);

This will use a local random generator to compute the ghosts (in particular, it will not affect the static global generator)

Note that each clustering done with the GhostedAreaSpec obtained through area_def.with_seed(user_defined_seed) will use exactly the same set of ghosts. Using area_def.with_fixed_seed(user_defined_seed), with an empty vector passed as argument, will return to using the common static random generator.

Definition at line 103 of file GhostedAreaSpec.hh.

Constructor & Destructor Documentation

◆ GhostedAreaSpec() [1/5]

fastjet::GhostedAreaSpec::GhostedAreaSpec ( )
inline

default constructor

Definition at line 106 of file GhostedAreaSpec.hh.

◆ GhostedAreaSpec() [2/5]

fastjet::GhostedAreaSpec::GhostedAreaSpec ( double  ghost_maxrap_in,
BasicRandom< double > *  user_random_generator 
)
inlineexplicit

explicit constructor

It takes as parameters the maximal (abs) rapidity for the ghosts and an optional user-specified random number generator.

For the latter, ownership is transferred to the GhostedAreaSpec class (i.e. it is stored internally as a shared pointer)

Definition at line 124 of file GhostedAreaSpec.hh.

◆ GhostedAreaSpec() [3/5]

fastjet::GhostedAreaSpec::GhostedAreaSpec ( double  ghost_maxrap_in,
int  repeat_in = gas::def_repeat,
double  ghost_area_in = gas::def_ghost_area,
double  grid_scatter_in = gas::def_grid_scatter,
double  pt_scatter_in = gas::def_pt_scatter,
double  mean_ghost_pt_in = gas::def_mean_ghost_pt,
BasicRandom< double > *  user_random_generator = NULL 
)
inlineexplicit

explicit constructor

Definition at line 137 of file GhostedAreaSpec.hh.

◆ GhostedAreaSpec() [4/5]

fastjet::GhostedAreaSpec::GhostedAreaSpec ( double  ghost_minrap_in,
double  ghost_maxrap_in,
int  repeat_in = gas::def_repeat,
double  ghost_area_in = gas::def_ghost_area,
double  grid_scatter_in = gas::def_grid_scatter,
double  pt_scatter_in = gas::def_pt_scatter,
double  mean_ghost_pt_in = gas::def_mean_ghost_pt,
BasicRandom< double > *  user_random_generator = NULL 
)
inlineexplicit

explicit constructor

Definition at line 155 of file GhostedAreaSpec.hh.

◆ GhostedAreaSpec() [5/5]

fastjet::GhostedAreaSpec::GhostedAreaSpec ( const Selector selector,
int  repeat_in = gas::def_repeat,
double  ghost_area_in = gas::def_ghost_area,
double  grid_scatter_in = gas::def_grid_scatter,
double  pt_scatter_in = gas::def_pt_scatter,
double  mean_ghost_pt_in = gas::def_mean_ghost_pt,
BasicRandom< double > *  user_random_generator = NULL 
)
explicit

constructor based on a Selector

explicit constructor

Definition at line 51 of file GhostedAreaSpec.cc.

Member Function Documentation

◆ _initialize()

void fastjet::GhostedAreaSpec::_initialize ( )

does the initialization of actual ghost parameters

sets the detailed parameters for the ghosts (which may not be quite the same as those requested – this is in order for things to fit in nicely into 2pi etc...

Definition at line 95 of file GhostedAreaSpec.cc.

◆ ghost_rapmax()

double fastjet::GhostedAreaSpec::ghost_rapmax ( ) const
inline

Definition at line 188 of file GhostedAreaSpec.hh.

◆ ghost_maxrap()

double fastjet::GhostedAreaSpec::ghost_maxrap ( ) const
inline

Definition at line 189 of file GhostedAreaSpec.hh.

◆ ghost_etamax()

double fastjet::GhostedAreaSpec::ghost_etamax ( ) const
inline

Definition at line 190 of file GhostedAreaSpec.hh.

◆ ghost_maxeta()

double fastjet::GhostedAreaSpec::ghost_maxeta ( ) const
inline

Definition at line 191 of file GhostedAreaSpec.hh.

◆ ghost_area()

double fastjet::GhostedAreaSpec::ghost_area ( ) const
inline

Definition at line 192 of file GhostedAreaSpec.hh.

◆ grid_scatter()

double fastjet::GhostedAreaSpec::grid_scatter ( ) const
inline

Definition at line 193 of file GhostedAreaSpec.hh.

◆ pt_scatter()

double fastjet::GhostedAreaSpec::pt_scatter ( ) const
inline

Definition at line 194 of file GhostedAreaSpec.hh.

◆ mean_ghost_pt()

double fastjet::GhostedAreaSpec::mean_ghost_pt ( ) const
inline

Definition at line 195 of file GhostedAreaSpec.hh.

◆ repeat()

int fastjet::GhostedAreaSpec::repeat ( ) const
inline

Definition at line 196 of file GhostedAreaSpec.hh.

◆ fj2_placement()

bool fastjet::GhostedAreaSpec::fj2_placement ( ) const
inline

Definition at line 197 of file GhostedAreaSpec.hh.

◆ kt_scatter()

double fastjet::GhostedAreaSpec::kt_scatter ( ) const
inline

Definition at line 199 of file GhostedAreaSpec.hh.

◆ mean_ghost_kt()

double fastjet::GhostedAreaSpec::mean_ghost_kt ( ) const
inline

Definition at line 200 of file GhostedAreaSpec.hh.

◆ actual_ghost_area()

double fastjet::GhostedAreaSpec::actual_ghost_area ( ) const
inline

Definition at line 203 of file GhostedAreaSpec.hh.

◆ n_ghosts()

int fastjet::GhostedAreaSpec::n_ghosts ( ) const
inline

Definition at line 204 of file GhostedAreaSpec.hh.

◆ set_ghost_area()

void fastjet::GhostedAreaSpec::set_ghost_area ( double  val)
inline

Definition at line 207 of file GhostedAreaSpec.hh.

◆ set_ghost_rapmax()

void fastjet::GhostedAreaSpec::set_ghost_rapmax ( double  val)
inline

Definition at line 208 of file GhostedAreaSpec.hh.

◆ set_ghost_maxrap()

void fastjet::GhostedAreaSpec::set_ghost_maxrap ( double  val)
inline

Definition at line 209 of file GhostedAreaSpec.hh.

◆ set_ghost_etamax()

void fastjet::GhostedAreaSpec::set_ghost_etamax ( double  val)
inline

Definition at line 210 of file GhostedAreaSpec.hh.

◆ set_ghost_maxeta()

void fastjet::GhostedAreaSpec::set_ghost_maxeta ( double  val)
inline

Definition at line 211 of file GhostedAreaSpec.hh.

◆ set_grid_scatter()

void fastjet::GhostedAreaSpec::set_grid_scatter ( double  val)
inline

Definition at line 212 of file GhostedAreaSpec.hh.

◆ set_pt_scatter()

void fastjet::GhostedAreaSpec::set_pt_scatter ( double  val)
inline

Definition at line 213 of file GhostedAreaSpec.hh.

◆ set_mean_ghost_pt()

void fastjet::GhostedAreaSpec::set_mean_ghost_pt ( double  val)
inline

Definition at line 214 of file GhostedAreaSpec.hh.

◆ set_repeat()

void fastjet::GhostedAreaSpec::set_repeat ( int  val)
inline

Definition at line 215 of file GhostedAreaSpec.hh.

◆ set_kt_scatter()

void fastjet::GhostedAreaSpec::set_kt_scatter ( double  val)
inline

Definition at line 217 of file GhostedAreaSpec.hh.

◆ set_mean_ghost_kt()

void fastjet::GhostedAreaSpec::set_mean_ghost_kt ( double  val)
inline

Definition at line 218 of file GhostedAreaSpec.hh.

◆ set_fj2_placement()

void fastjet::GhostedAreaSpec::set_fj2_placement ( bool  val)

if val is true, set ghost placement as it was in FastJet 2.X.

The main differences between FJ2 and FJ3 ghost placement are

  • in FJ2 the rapidity spacing was ceil((maxrap-minrap)/sqrt(area)), while in FJ3 it is int((maxrap-minrap)/sqrt(area) + 0.5) [similarly for phi]. The FJ3 option offers more stability when trying to specify a spacing that exactly fits the extent.

in FJ2, the ghosts are placed at the corners of grid cells (i.e. extending up to maxrap), while in FJ3 they are placed at the centres of grid cells (i.e. extending roughly up to maxrap-sqrt(area)). The FJ2 behaviour effectively skews the total area coverage when maxrap is small, by an amount sqrt(area)/(2*maxrap).

FJ2 placement is now deprecated.

Definition at line 86 of file GhostedAreaSpec.cc.

◆ nphi()

int fastjet::GhostedAreaSpec::nphi ( ) const
inline

return nphi (ghosts layed out (-nrap, 0..nphi-1), (-nrap+1,0..nphi-1), ... (nrap,0..nphi-1)

Definition at line 242 of file GhostedAreaSpec.hh.

◆ nrap()

int fastjet::GhostedAreaSpec::nrap ( ) const
inline

Definition at line 243 of file GhostedAreaSpec.hh.

◆ get_random_status()

void fastjet::GhostedAreaSpec::get_random_status ( std::vector< int > &  __iseed) const
inline

get all relevant information about the status of the random number generator, so that it can be reset subsequently with set_random_status.

Definition at line 250 of file GhostedAreaSpec.hh.

◆ set_random_status()

void fastjet::GhostedAreaSpec::set_random_status ( const std::vector< int > &  __iseed)
inline

set the status of the random number generator, as obtained previously with get_random_status.

Note that the random generator is a static member of the class, i.e. common to all instances of the class — so if you modify the random for this instance, you modify it for all instances.

Definition at line 263 of file GhostedAreaSpec.hh.

◆ with_fixed_seed()

GhostedAreaSpec fastjet::GhostedAreaSpec::with_fixed_seed ( const std::vector< int > &  __iseed) const
inline

allows to return a copy of this GhostedAreaSpec with a local set of seeds

Definition at line 273 of file GhostedAreaSpec.hh.

◆ get_fixed_seed()

void fastjet::GhostedAreaSpec::get_fixed_seed ( std::vector< int > &  __iseed) const
inline

returns the current fixed seed

Definition at line 280 of file GhostedAreaSpec.hh.

◆ get_last_seed()

void fastjet::GhostedAreaSpec::get_last_seed ( std::vector< int > &  __iseed) const
inline

allows the user to get the seed that was used at the start of the last generation of ghosts.

This should typically be access through the area definition held by the ClusterSequenceArea, because the CSA class takes a copy of the AreaDefinition and it is that copy that stored the

Definition at line 290 of file GhostedAreaSpec.hh.

◆ checkpoint_random()

void fastjet::GhostedAreaSpec::checkpoint_random ( )
inline

Definition at line 296 of file GhostedAreaSpec.hh.

◆ restore_checkpoint_random()

void fastjet::GhostedAreaSpec::restore_checkpoint_random ( )
inline

Definition at line 297 of file GhostedAreaSpec.hh.

◆ description()

string fastjet::GhostedAreaSpec::description ( ) const

for a summary

Definition at line 207 of file GhostedAreaSpec.cc.

◆ add_ghosts()

void fastjet::GhostedAreaSpec::add_ghosts ( std::vector< PseudoJet > &  ) const

push a set of ghost 4-momenta onto the back of the vector of PseudoJets

adds the ghost 4-momenta to the vector of PseudoJet's

Definition at line 123 of file GhostedAreaSpec.cc.

◆ random_at_own_risk()

double fastjet::GhostedAreaSpec::random_at_own_risk ( ) const
inline

very deprecated public access to a random number from the internal generator

Definition at line 308 of file GhostedAreaSpec.hh.

◆ generator_at_own_risk()

BasicRandom< double > & fastjet::GhostedAreaSpec::generator_at_own_risk ( ) const
inline

very deprecated public access to the generator itself

Definition at line 310 of file GhostedAreaSpec.hh.

◆ user_random_generator_at_own_risk()

SharedPtr< BasicRandom< double > > & fastjet::GhostedAreaSpec::user_random_generator_at_own_risk ( )
inline

access to the user-defined random-number generator. Will be empty if not set.

Definition at line 313 of file GhostedAreaSpec.hh.


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