Loading...
Searching...
No Matches
AreaDefinition.cc
//FJSTARTHEADER
// $Id$
//
// Copyright (c) 2005-2021, Matteo Cacciari, Gavin P. Salam and Gregory Soyez
//
//----------------------------------------------------------------------
// This file is part of FastJet.
//
// FastJet is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// The algorithms that underlie FastJet have required considerable
// development. They are described in the original FastJet paper,
// hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use
// FastJet as part of work towards a scientific publication, please
// quote the version you use and include a citation to the manual and
// optionally also to hep-ph/0512210.
//
// FastJet is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with FastJet. If not, see <http://www.gnu.org/licenses/>.
//----------------------------------------------------------------------
//FJENDHEADER
#include "fastjet/AreaDefinition.hh"
#include<sstream>
#include<string>
using namespace std;
FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
string VoronoiAreaSpec::description() const {
ostringstream ostr;
ostr << "Voronoi area with effective_Rfact = " << effective_Rfact() ;
return ostr.str();
}
//----------------------------------------------------------------------
/// return info about the type of area being used by this defn
string AreaDefinition::description() const {
ostringstream ostr;
switch(area_type()) {
case active_area:
ostr << "Active area (hidden ghosts) with " ;
ostr << ghost_spec().description();
break;
case active_area_explicit_ghosts:
ostr << "Active area (explicit ghosts) with " ;
ostr << ghost_spec().description();
break;
case one_ghost_passive_area:
ostr << "Passive area (one ghost at a time) with " ;
ostr << ghost_spec().description();
break;
case passive_area:
ostr << "Passive area (optimal alg. based on jet.def.), where relevant with " ;
ostr << ghost_spec().description() ;
break;
case voronoi_area:
ostr << voronoi_spec().description();
break;
default:
ostr << "Error: unrecognized area_type in AreaDefinition::description():"
<< area_type() << endl;
throw Error(ostr.str());
}
return ostr.str();
}
FASTJET_END_NAMESPACE // defined in fastjet/internal/base.hh
fastjet::AreaDefinition::ghost_spec
const GhostedAreaSpec & ghost_spec() const
return a reference to the active area spec
Definition AreaDefinition.hh:141
fastjet::AreaDefinition::voronoi_spec
const VoronoiAreaSpec & voronoi_spec() const
return a reference to the voronoi area spec
Definition AreaDefinition.hh:145
fastjet::AreaDefinition::description
std::string description() const
return a description of the current area definition
Definition AreaDefinition.cc:48
fastjet::AreaDefinition::area_type
AreaType area_type() const
return info about the type of area being used by this defn
Definition AreaDefinition.hh:138
fastjet::Error
base class corresponding to errors that can be thrown by FastJet
Definition Error.hh:52
fastjet::VoronoiAreaSpec::description
std::string description() const
return a textual description of the area definition.
Definition AreaDefinition.cc:39
fastjet::VoronoiAreaSpec::effective_Rfact
double effective_Rfact() const
return the value of effective_Rfact
Definition AreaDefinition.hh:61