Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

ActiveAreaSpec.hh

Go to the documentation of this file.
00001 //STARTHEADER
00002 // $Id: ActiveAreaSpec.hh 514 2007-03-10 17:50:06Z salam $
00003 //
00004 // Copyright (c) 2005-2006, Matteo Cacciari and Gavin Salam
00005 //
00006 //----------------------------------------------------------------------
00007 // This file is part of FastJet.
00008 //
00009 //  FastJet is free software; you can redistribute it and/or modify
00010 //  it under the terms of the GNU General Public License as published by
00011 //  the Free Software Foundation; either version 2 of the License, or
00012 //  (at your option) any later version.
00013 //
00014 //  The algorithms that underlie FastJet have required considerable
00015 //  development and are described in hep-ph/0512210. If you use
00016 //  FastJet as part of work towards a scientific publication, please
00017 //  include a citation to the FastJet paper.
00018 //
00019 //  FastJet is distributed in the hope that it will be useful,
00020 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00021 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022 //  GNU General Public License for more details.
00023 //
00024 //  You should have received a copy of the GNU General Public License
00025 //  along with FastJet; if not, write to the Free Software
00026 //  Foundation, Inc.:
00027 //      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00028 //----------------------------------------------------------------------
00029 //ENDHEADER
00030 
00031 
00032 #ifndef __FASTJET_ACTIVEAREASPEC_HH__
00033 #define __FASTJET_ACTIVEAREASPEC_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      // defined in fastjet/internal/base.hh
00044 
00045 //----------------------------------------------------------------------
00048 class ActiveAreaSpec {
00049 public:
00051   ActiveAreaSpec(): _ghost_maxrap(6.0), _repeat(1), _ghost_area(0.01), 
00052                     _grid_scatter(1e-4), _kt_scatter(0.1), 
00053                     _mean_ghost_kt(1e-100),
00054                     _actual_ghost_area(-1.0) {_initialize();};
00055   
00057   explicit ActiveAreaSpec(double ghost_maxrap, 
00058                           int    repeat = 1,
00059                           double ghost_area=0.01, 
00060                           double grid_scatter = 1e-4, 
00061                           double kt_scatter = 0.1,
00062                           double mean_ghost_kt = 1e-100): 
00063     _ghost_maxrap(ghost_maxrap), 
00064     _repeat(repeat), 
00065     _ghost_area(ghost_area), 
00066     _grid_scatter(grid_scatter),  
00067     _kt_scatter(kt_scatter), 
00068     _mean_ghost_kt(mean_ghost_kt),
00069     _actual_ghost_area(-1.0) {_initialize();};
00070 
00071 
00073   void _initialize();
00074 
00075   // for accessing values set by the user
00076   inline double ghost_etamax() const {return _ghost_maxrap;};
00077   inline double ghost_maxrap() const {return _ghost_maxrap;};
00078   inline double ghost_area   () const {return _ghost_area   ;};
00079   inline double grid_scatter() const {return _grid_scatter;};
00080   inline double kt_scatter  () const {return _kt_scatter  ;};
00081   inline double mean_ghost_kt() const {return _mean_ghost_kt  ;};
00082   inline int    repeat      () const {return _repeat      ;};
00083 
00084   // for accessing values 
00085   inline double actual_ghost_area() const {return _actual_ghost_area;};
00086   inline int    n_ghosts()          const {return _n_ghosts;};
00087 
00088   // when explicitly modifying values, sometimes call the initializer
00089   inline void set_ghost_area   (double val) {_ghost_area    = val; _initialize();};
00090   inline void set_ghost_etamax(double val) {_ghost_maxrap = val; _initialize();};
00091   inline void set_ghost_maxrap(double val) {_ghost_maxrap = val; _initialize();};
00092   inline void set_grid_scatter(double val) {_grid_scatter   = val; };
00093   inline void set_kt_scatter  (double val) {_kt_scatter     = val; };
00094   inline void set_mean_ghost_kt(double val){_mean_ghost_kt  = val; };
00095   inline void set_repeat      (int    val) {_repeat         = val; };
00096   
00098   std::string description();
00099 
00101   void add_ghosts(std::vector<PseudoJet> & ) const;
00102 
00103 private:
00104   
00105   // quantities that determine nature and distribution of ghosts
00106   double _ghost_maxrap;
00107   int    _repeat      ;
00108   double _ghost_area   ;  
00109   double _grid_scatter;
00110   double _kt_scatter  ;
00111   double _mean_ghost_kt;
00112 
00113   // derived quantities
00114   double _actual_ghost_area, _dphi, _drap;
00115   int    _n_ghosts, _nphi, _nrap;
00116 
00117   //inline double _our_rand() const {return rand()*(1.0/RAND_MAX);};
00118   inline double _our_rand() const {return _random_generator();};
00119 
00120   static BasicRandom<double> _random_generator;
00121   //mutable BasicRandom<double> _random_generator;
00122 
00123   
00124 };
00125 
00126 FASTJET_END_NAMESPACE
00127 
00128 #endif // __FASTJET_ACTIVEAREASPEC_HH__

Generated on Mon Apr 2 20:57:48 2007 for fastjet by  doxygen 1.4.2