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_AREADEFINITION_HH__
00033 #define __FASTJET_AREADEFINITION_HH__
00034
00035 #include "fastjet/GhostedAreaSpec.hh"
00036
00037 FASTJET_BEGIN_NAMESPACE
00038
00039
00040
00050 class VoronoiAreaSpec {
00051 public:
00052
00054 VoronoiAreaSpec() : _effective_Rfact(1.0) {};
00055
00057 VoronoiAreaSpec(double effective_Rfact) :
00058 _effective_Rfact(effective_Rfact) {};
00059
00061 double effective_Rfact() const {return _effective_Rfact;}
00062
00064 std::string description() const;
00065
00066 private:
00067 double _effective_Rfact;
00068 };
00069
00070
00072 enum AreaType {invalid_area = -1,
00073 active_area = 0, active_area_explicit_ghosts = 1,
00074 one_ghost_passive_area = 10, passive_area = 11,
00075 voronoi_area=20};
00076
00077
00078
00082 class AreaDefinition {
00083 public:
00084
00087 AreaDefinition() {
00088 _area_type = active_area;
00089 _ghost_spec = GhostedAreaSpec();
00090 }
00091
00094 AreaDefinition(AreaType type, const GhostedAreaSpec & spec) {
00095 _ghost_spec = spec;
00096 _area_type = type;
00097 assert(type != voronoi_area);
00098 }
00099
00102 AreaDefinition(AreaType type, const VoronoiAreaSpec & spec) {
00103 _voronoi_spec = spec;
00104 _area_type = type;
00105 assert(type == voronoi_area);
00106 }
00107
00110 AreaDefinition(AreaType type) {
00111 _area_type = type;
00112 if (type == voronoi_area) {
00113 _voronoi_spec = VoronoiAreaSpec();
00114 } else {
00115 _ghost_spec = GhostedAreaSpec();
00116 }
00117 }
00118
00121 AreaDefinition(const GhostedAreaSpec & spec, AreaType type = active_area) {
00122 _ghost_spec = spec;
00123 _area_type = type;
00124 assert(type != voronoi_area);
00125 }
00126
00129 AreaDefinition(const VoronoiAreaSpec & spec) {
00130 _voronoi_spec = spec;
00131 _area_type = voronoi_area;
00132 }
00133
00135 std::string description() const;
00136
00138 AreaType area_type() const {return _area_type;}
00139
00141 const GhostedAreaSpec & ghost_spec() const {return _ghost_spec;}
00142 GhostedAreaSpec & ghost_spec() {return _ghost_spec;}
00143
00145 const VoronoiAreaSpec & voronoi_spec() const {return _voronoi_spec;}
00146
00147 private:
00148
00149 AreaType _area_type;
00150 GhostedAreaSpec _ghost_spec;
00151 VoronoiAreaSpec _voronoi_spec;
00152 };
00153
00154 FASTJET_END_NAMESPACE
00155
00156
00157 #endif // __FASTJET_AREADEFINITION_HH__