FastJet 3.0.2
|
00001 //STARTHEADER 00002 // $Id: AreaDefinition.hh 2687 2011-11-14 11:17:51Z soyez $ 00003 // 00004 // Copyright (c) 2006-2011, Matteo Cacciari, Gavin P. 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, see <http://www.gnu.org/licenses/>. 00026 //---------------------------------------------------------------------- 00027 //ENDHEADER 00028 00029 00030 #ifndef __FASTJET_AREADEFINITION_HH__ 00031 #define __FASTJET_AREADEFINITION_HH__ 00032 00033 #include "fastjet/GhostedAreaSpec.hh" 00034 00035 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh 00036 00037 //---------------------------------------------------------------------- 00038 // 00039 /// @ingroup area_classes 00040 /// \class VoronoiAreaSpec 00041 /// Specification for the computation of the Voronoi jet area 00042 /// 00043 /// class for holding a "Voronoi area" specification; an area will be 00044 /// assigned to each particle, which is the area of the intersection 00045 /// of the particle's Voronoi cell with a circle of radius 00046 /// R*effective_Rfact. 00047 /// 00048 class VoronoiAreaSpec { 00049 public: 00050 00051 /// default constructor (effective_Rfact = 1); 00052 VoronoiAreaSpec() : _effective_Rfact(1.0) {}; 00053 00054 /// constructor that allows you to set effective_Rfact. 00055 VoronoiAreaSpec(double effective_Rfact_in) : 00056 _effective_Rfact(effective_Rfact_in) {}; 00057 00058 /// return the value of effective_Rfact 00059 double effective_Rfact() const {return _effective_Rfact;} 00060 00061 /// return a textual description of the area definition. 00062 std::string description() const; 00063 00064 private: 00065 double _effective_Rfact; 00066 }; 00067 00068 00069 /// the different types of area that are supported 00070 enum AreaType {invalid_area = -1, 00071 active_area = 0, active_area_explicit_ghosts = 1, 00072 one_ghost_passive_area = 10, passive_area = 11, 00073 voronoi_area=20}; 00074 00075 00076 //---------------------------------------------------------------------- 00077 /// @ingroup area_classes 00078 /// \class AreaDefinition 00079 /// class that holds a generic area definition 00080 class AreaDefinition { 00081 public: 00082 00083 /// default constructor, which provides a ghosted active area, with 00084 /// sensible defaults for the ghosts. 00085 AreaDefinition() { 00086 _area_type = active_area; 00087 _ghost_spec = GhostedAreaSpec(); 00088 } 00089 00090 /// constructor for an area definition based on an area type and a 00091 /// ghosted area specification 00092 AreaDefinition(AreaType type, const GhostedAreaSpec & spec) { 00093 _ghost_spec = spec; 00094 _area_type = type; 00095 assert(type != voronoi_area); 00096 } 00097 00098 /// constructor for an area definition based on an area type and a 00099 /// voronoi area specification (type must be voronoi_area) 00100 AreaDefinition(AreaType type, const VoronoiAreaSpec & spec) { 00101 _voronoi_spec = spec; 00102 _area_type = type; 00103 assert(type == voronoi_area); 00104 } 00105 00106 /// constructor for an area definition based on an area type and 00107 /// which attempts to provide sensible defaults for everything else 00108 AreaDefinition(AreaType type) { 00109 _area_type = type; 00110 if (type == voronoi_area) { 00111 _voronoi_spec = VoronoiAreaSpec(); 00112 } else { 00113 _ghost_spec = GhostedAreaSpec(); 00114 } 00115 } 00116 00117 /// constructor for an area definition based on an ghosted area 00118 /// specification, and an option to select which ghosted area you want 00119 AreaDefinition(const GhostedAreaSpec & spec, AreaType type = active_area) { 00120 _ghost_spec = spec; 00121 _area_type = type; 00122 assert(type != voronoi_area); 00123 } 00124 00125 /// constructor for an area definition based on a voronoi area 00126 /// specification 00127 AreaDefinition(const VoronoiAreaSpec & spec) { 00128 _voronoi_spec = spec; 00129 _area_type = voronoi_area; 00130 } 00131 00132 /// return a description of the current area definition 00133 std::string description() const; 00134 00135 /// return info about the type of area being used by this defn 00136 AreaType area_type() const {return _area_type;} 00137 00138 /// return a reference to the active area spec 00139 const GhostedAreaSpec & ghost_spec() const {return _ghost_spec;} 00140 GhostedAreaSpec & ghost_spec() {return _ghost_spec;} 00141 00142 /// return a reference to the voronoi area spec 00143 const VoronoiAreaSpec & voronoi_spec() const {return _voronoi_spec;} 00144 00145 private: 00146 00147 AreaType _area_type; 00148 GhostedAreaSpec _ghost_spec; 00149 VoronoiAreaSpec _voronoi_spec; 00150 }; 00151 00152 FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh 00153 00154 00155 #endif // __FASTJET_AREADEFINITION_HH__