00001 //STARTHEADER 00002 // $Id: AreaDefinition.hh 635 2007-05-10 18:37:10Z salam $ 00003 // 00004 // Copyright (c) 2006-2007, Matteo Cacciari, Gavin Salam and Gregory Soyez 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_AREADEFINITION_HH__ 00033 #define __FASTJET_AREADEFINITION_HH__ 00034 00035 #include "fastjet/GhostedAreaSpec.hh" 00036 00037 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh 00038 00039 //---------------------------------------------------------------------- 00040 // 00046 class VoronoiAreaSpec { 00047 public: 00048 00050 VoronoiAreaSpec() : _effective_Rfact(1.0) {}; 00051 00053 VoronoiAreaSpec(double effective_Rfact) : 00054 _effective_Rfact(effective_Rfact) {}; 00055 00057 double effective_Rfact() const {return _effective_Rfact;} 00058 00060 std::string description() const; 00061 00062 private: 00063 double _effective_Rfact; 00064 }; 00065 00066 00068 enum AreaType {invalid_area = -1, 00069 active_area = 0, active_area_explicit_ghosts = 1, 00070 one_ghost_passive_area = 10, passive_area = 11, 00071 voronoi_area=20}; 00072 00073 00074 //---------------------------------------------------------------------- 00077 class AreaDefinition { 00078 public: 00079 00082 AreaDefinition() { 00083 _area_type = active_area; 00084 _ghost_spec = GhostedAreaSpec(); 00085 } 00086 00089 AreaDefinition(AreaType type, const GhostedAreaSpec & spec) { 00090 _ghost_spec = spec; 00091 _area_type = type; 00092 assert(type != voronoi_area); 00093 } 00094 00097 AreaDefinition(AreaType type, const VoronoiAreaSpec & spec) { 00098 _voronoi_spec = spec; 00099 _area_type = type; 00100 assert(type == voronoi_area); 00101 } 00102 00105 AreaDefinition(AreaType type) { 00106 _area_type = type; 00107 if (type == voronoi_area) { 00108 _voronoi_spec = VoronoiAreaSpec(); 00109 } else { 00110 _ghost_spec = GhostedAreaSpec(); 00111 } 00112 } 00113 00116 AreaDefinition(const GhostedAreaSpec & spec, AreaType type = active_area) { 00117 _ghost_spec = spec; 00118 _area_type = type; 00119 assert(type != voronoi_area); 00120 } 00121 00124 AreaDefinition(const VoronoiAreaSpec & spec) { 00125 _voronoi_spec = spec; 00126 _area_type = voronoi_area; 00127 } 00128 00130 std::string description() const; 00131 00133 AreaType area_type() const {return _area_type;} 00134 00136 const GhostedAreaSpec & ghost_spec() const {return _ghost_spec;} 00137 GhostedAreaSpec & ghost_spec() {return _ghost_spec;} 00138 00140 const VoronoiAreaSpec & voronoi_spec() const {return _voronoi_spec;} 00141 00142 private: 00143 00144 AreaType _area_type; 00145 GhostedAreaSpec _ghost_spec; 00146 VoronoiAreaSpec _voronoi_spec; 00147 }; 00148 00149 FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh 00150 00151 00152 #endif // __FASTJET_AREADEFINITION_HH__