FastJet 3.4.1
AreaDefinition.cc
1//FJSTARTHEADER
2// $Id$
3//
4// Copyright (c) 2005-2023, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
5//
6//----------------------------------------------------------------------
7// This file is part of FastJet.
8//
9// FastJet is free software; you can redistribute it and/or modify
10// it under the terms of the GNU General Public License as published by
11// the Free Software Foundation; either version 2 of the License, or
12// (at your option) any later version.
13//
14// The algorithms that underlie FastJet have required considerable
15// development. They are described in the original FastJet paper,
16// hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
17// FastJet as part of work towards a scientific publication, please
18// quote the version you use and include a citation to the manual and
19// optionally also to hep-ph/0512210.
20//
21// FastJet is distributed in the hope that it will be useful,
22// but WITHOUT ANY WARRANTY; without even the implied warranty of
23// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24// GNU General Public License for more details.
25//
26// You should have received a copy of the GNU General Public License
27// along with FastJet. If not, see <http://www.gnu.org/licenses/>.
28//----------------------------------------------------------------------
29//FJENDHEADER
30
31#include "fastjet/AreaDefinition.hh"
32#include<sstream>
33#include<string>
34
35using namespace std;
36
37FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
38
39string VoronoiAreaSpec::description() const {
40 ostringstream ostr;
41 ostr << "Voronoi area with effective_Rfact = " << effective_Rfact() ;
42 return ostr.str();
43}
44
45
46//----------------------------------------------------------------------
47/// return info about the type of area being used by this defn
48string AreaDefinition::description() const {
49 ostringstream ostr;
50
51 switch(area_type()) {
52 case active_area:
53 ostr << "Active area (hidden ghosts) with " ;
54 ostr << ghost_spec().description();
55 break;
56 case active_area_explicit_ghosts:
57 ostr << "Active area (explicit ghosts) with " ;
58 ostr << ghost_spec().description();
59 break;
60 case one_ghost_passive_area:
61 ostr << "Passive area (one ghost at a time) with " ;
62 ostr << ghost_spec().description();
63 break;
64 case passive_area:
65 ostr << "Passive area (optimal alg. based on jet.def.), where relevant with " ;
66 ostr << ghost_spec().description() ;
67 break;
68 case voronoi_area:
69 ostr << voronoi_spec().description();
70 break;
71 default:
72 ostr << "Error: unrecognized area_type in AreaDefinition::description():"
73 << area_type() << endl;
74 throw Error(ostr.str());
75 }
76 return ostr.str();
77}
78
79FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh
base class corresponding to errors that can be thrown by FastJet
Definition: Error.hh:52