32 #ifndef __FASTJET_GHOSTEDAREASPEC_HH__ 33 #define __FASTJET_GHOSTEDAREASPEC_HH__ 37 #include "fastjet/PseudoJet.hh" 38 #include "fastjet/internal/BasicRandom.hh" 39 #include "fastjet/Selector.hh" 40 #include "fastjet/LimitedWarning.hh" 41 #include "fastjet/internal/deprecated.hh" 44 #define STATIC_GENERATOR 1 46 FASTJET_BEGIN_NAMESPACE
50 const double def_ghost_maxrap = 6.0;
51 const int def_repeat = 1;
52 const double def_ghost_area = 0.01;
53 const double def_grid_scatter = 1.0;
54 const double def_pt_scatter = 0.1;
55 const double def_mean_ghost_pt = 1e-100;
69 _ghost_rap_offset(0.0),
70 _repeat (gas::def_repeat),
71 _ghost_area (gas::def_ghost_area),
72 _grid_scatter (gas::def_grid_scatter),
73 _pt_scatter (gas::def_pt_scatter),
74 _mean_ghost_pt(gas::def_mean_ghost_pt),
75 _fj2_placement(false) {_initialize();}
79 int repeat_in = gas::def_repeat,
80 double ghost_area_in = gas::def_ghost_area,
81 double grid_scatter_in = gas::def_grid_scatter,
82 double pt_scatter_in = gas::def_pt_scatter,
83 double mean_ghost_pt_in = gas::def_mean_ghost_pt
85 _ghost_maxrap(ghost_maxrap_in),
86 _ghost_rap_offset(0.0),
88 _ghost_area(ghost_area_in),
89 _grid_scatter(grid_scatter_in),
90 _pt_scatter(pt_scatter_in),
91 _mean_ghost_pt(mean_ghost_pt_in),
92 _fj2_placement(false) {_initialize();}
96 double ghost_maxrap_in,
97 int repeat_in = gas::def_repeat,
98 double ghost_area_in = gas::def_ghost_area,
99 double grid_scatter_in = gas::def_grid_scatter,
100 double pt_scatter_in = gas::def_pt_scatter,
101 double mean_ghost_pt_in = gas::def_mean_ghost_pt
103 _ghost_maxrap (0.5*(ghost_maxrap_in - ghost_minrap_in)),
104 _ghost_rap_offset(0.5*(ghost_maxrap_in + ghost_minrap_in)),
106 _ghost_area(ghost_area_in),
107 _grid_scatter(grid_scatter_in),
108 _pt_scatter(pt_scatter_in),
109 _mean_ghost_pt(mean_ghost_pt_in),
110 _fj2_placement(false) {_initialize();}
115 int repeat_in = gas::def_repeat,
116 double ghost_area_in = gas::def_ghost_area,
117 double grid_scatter_in = gas::def_grid_scatter,
118 double pt_scatter_in = gas::def_pt_scatter,
119 double mean_ghost_pt_in = gas::def_mean_ghost_pt
127 inline double ghost_rapmax ()
const {
return _ghost_maxrap;}
128 inline double ghost_maxrap ()
const {
return _ghost_maxrap;}
129 inline double ghost_etamax ()
const {
return _ghost_maxrap;}
130 inline double ghost_maxeta ()
const {
return _ghost_maxrap;}
131 inline double ghost_area ()
const {
return _ghost_area ;}
132 inline double grid_scatter ()
const {
return _grid_scatter;}
133 inline double pt_scatter ()
const {
return _pt_scatter ;}
134 inline double mean_ghost_pt()
const {
return _mean_ghost_pt ;}
135 inline int repeat ()
const {
return _repeat ;}
136 inline bool fj2_placement()
const {
return _fj2_placement;}
138 inline double kt_scatter ()
const {
return _pt_scatter ;}
139 inline double mean_ghost_kt()
const {
return _mean_ghost_pt ;}
142 inline double actual_ghost_area()
const {
return _actual_ghost_area;}
143 inline int n_ghosts()
const {
return _n_ghosts;}
146 inline void set_ghost_area (
double val) {_ghost_area = val; _initialize();}
147 inline void set_ghost_rapmax (
double val) {_ghost_maxrap = val; _initialize();}
148 inline void set_ghost_maxrap (
double val) {_ghost_maxrap = val; _initialize();}
149 inline void set_ghost_etamax (
double val) {_ghost_maxrap = val; _initialize();}
150 inline void set_ghost_maxeta (
double val) {_ghost_maxrap = val; _initialize();}
151 inline void set_grid_scatter (
double val) {_grid_scatter = val; }
152 inline void set_pt_scatter (
double val) {_pt_scatter = val; }
153 inline void set_mean_ghost_pt(
double val) {_mean_ghost_pt = val; }
154 inline void set_repeat (
int val) {_repeat = val; }
156 inline void set_kt_scatter (
double val) {_pt_scatter = val; }
157 inline void set_mean_ghost_kt(
double val) {_mean_ghost_pt = val; }
176 FASTJET_DEPRECATED_MSG(
"This is deprecated since we strongly recomment to use the new ghost placement instead")
177 void set_fj2_placement(
bool val);
181 inline int nphi()
const {
return _nphi;}
182 inline int nrap()
const {
return _nrap;}
188 _random_generator.get_status(__iseed);}
196 _random_generator.set_status(__iseed);}
198 inline void checkpoint_random() {get_random_status(_random_checkpoint);}
199 inline void restore_checkpoint_random() {set_random_status(_random_checkpoint);}
202 std::string description()
const;
206 void add_ghosts(std::vector<PseudoJet> & )
const;
213 return _random_generator;}
218 double _ghost_maxrap;
219 double _ghost_rap_offset;
222 double _grid_scatter;
224 double _mean_ghost_pt;
230 double _actual_ghost_area, _dphi, _drap;
231 int _n_ghosts, _nphi, _nrap;
234 std::vector<int> _random_checkpoint;
235 static BasicRandom<double> _random_generator;
240 inline double _our_rand()
const {
return _random_generator();}
251 FASTJET_END_NAMESPACE
253 #endif // __FASTJET_GHOSTEDAREASPEC_HH__ BasicRandom< double > & generator_at_own_risk() const
very deprecated public access to the generator itself
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)
explicit constructor
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...
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)
explicit constructor
GhostedAreaSpec()
default constructor
class to provide facilities for giving warnings up to some maximum number of times and to provide glo...
int nphi() const
return nphi (ghosts layed out (-nrap, 0..nphi-1), (-nrap+1,0..nphi-1), ...
Class that encodes information about cuts and other selection criteria that can be applied to PseudoJ...
void set_random_status(const std::vector< int > &__iseed)
set the status of the random number generator, as obtained previously with get_random_status.
Parameters to configure the computation of jet areas using ghosts.
double random_at_own_risk() const
very deprecated public access to a random number from the internal generator