00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef __FASTJET_GHOSTEDAREASPEC_HH__
00033 #define __FASTJET_GHOSTEDAREASPEC_HH__
00034
00035 #include<vector>
00036 #include<string>
00037 #include "fastjet/PseudoJet.hh"
00038 #include "fastjet/internal/BasicRandom.hh"
00039
00040
00041 #define STATIC_GENERATOR 1
00042
00043 FASTJET_BEGIN_NAMESPACE
00044
00046 namespace gas {
00047 const double def_ghost_maxrap = 6.0;
00048 const int def_repeat = 1;
00049 const double def_ghost_area = 0.01;
00050 const double def_grid_scatter = 1.0;
00051 const double def_kt_scatter = 0.1;
00052 const double def_mean_ghost_kt = 1e-100;
00053 }
00054
00055
00058 class GhostedAreaSpec {
00059 public:
00061 GhostedAreaSpec(): _ghost_maxrap (gas::def_ghost_maxrap),
00062 _repeat (gas::def_repeat),
00063 _ghost_area (gas::def_ghost_area),
00064 _grid_scatter (gas::def_grid_scatter),
00065 _kt_scatter (gas::def_kt_scatter),
00066 _mean_ghost_kt(gas::def_mean_ghost_kt),
00067 _actual_ghost_area(-1.0) {_initialize();};
00068
00070 explicit GhostedAreaSpec(double ghost_maxrap,
00071 int repeat = gas::def_repeat,
00072 double ghost_area = gas::def_ghost_area,
00073 double grid_scatter = gas::def_grid_scatter,
00074 double kt_scatter = gas::def_kt_scatter,
00075 double mean_ghost_kt = gas::def_mean_ghost_kt
00076 ):
00077 _ghost_maxrap(ghost_maxrap),
00078 _repeat(repeat),
00079 _ghost_area(ghost_area),
00080 _grid_scatter(grid_scatter),
00081 _kt_scatter(kt_scatter),
00082 _mean_ghost_kt(mean_ghost_kt),
00083 _actual_ghost_area(-1.0) {_initialize();};
00084
00085
00087 void _initialize();
00088
00089
00090 inline double ghost_etamax() const {return _ghost_maxrap;};
00091 inline double ghost_maxrap() const {return _ghost_maxrap;};
00092 inline double ghost_area () const {return _ghost_area ;};
00093 inline double grid_scatter() const {return _grid_scatter;};
00094 inline double kt_scatter () const {return _kt_scatter ;};
00095 inline double mean_ghost_kt() const {return _mean_ghost_kt ;};
00096 inline int repeat () const {return _repeat ;};
00097
00098
00099 inline double actual_ghost_area() const {return _actual_ghost_area;};
00100 inline int n_ghosts() const {return _n_ghosts;};
00101
00102
00103 inline void set_ghost_area (double val) {_ghost_area = val; _initialize();};
00104 inline void set_ghost_etamax(double val) {_ghost_maxrap = val; _initialize();};
00105 inline void set_ghost_maxrap(double val) {_ghost_maxrap = val; _initialize();};
00106 inline void set_grid_scatter(double val) {_grid_scatter = val; };
00107 inline void set_kt_scatter (double val) {_kt_scatter = val; };
00108 inline void set_mean_ghost_kt(double val){_mean_ghost_kt = val; };
00109 inline void set_repeat (int val) {_repeat = val; };
00110
00113 inline int nphi() const {return _nphi;}
00114 inline int nrap() const {return _nrap;}
00115
00119 inline void get_random_status(std::vector<int> & __iseed) const {
00120 _random_generator.get_status(__iseed);}
00121
00127 inline void set_random_status(const std::vector<int> & __iseed) {
00128 _random_generator.set_status(__iseed);}
00129
00130 inline void checkpoint_random() {get_random_status(_random_checkpoint);}
00131 inline void restore_checkpoint_random() {set_random_status(_random_checkpoint);}
00132
00134 std::string description() const;
00135
00137 void add_ghosts(std::vector<PseudoJet> & ) const;
00138
00141 inline double random_at_own_risk() const {return _our_rand();};
00143 inline BasicRandom<double> & generator_at_own_risk() const {
00144 return _random_generator;}
00145
00146 private:
00147
00148
00149 double _ghost_maxrap;
00150 int _repeat ;
00151 double _ghost_area ;
00152 double _grid_scatter;
00153 double _kt_scatter ;
00154 double _mean_ghost_kt;
00155
00156
00157 double _actual_ghost_area, _dphi, _drap;
00158 int _n_ghosts, _nphi, _nrap;
00159
00160
00161 std::vector<int> _random_checkpoint;
00162 static BasicRandom<double> _random_generator;
00163
00164
00165 inline double _our_rand() const {return _random_generator();};
00166
00167 };
00168
00170
00171
00172
00173
00174 FASTJET_END_NAMESPACE
00175
00176 #endif // __FASTJET_GHOSTEDAREASPEC_HH__