FastJet 3.0.2
AreaDefinition.cc
00001 //STARTHEADER
00002 // $Id: AreaDefinition.cc 2577 2011-09-13 15:11:38Z salam $
00003 //
00004 // Copyright (c) 2005-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 #include "fastjet/AreaDefinition.hh"
00030 #include<sstream>
00031 #include<string>
00032 
00033 using namespace std;
00034 
00035 FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
00036 
00037 string VoronoiAreaSpec::description() const {
00038   ostringstream ostr;
00039   ostr << "Voronoi area with effective_Rfact = " << effective_Rfact() ;
00040   return ostr.str();
00041 }
00042 
00043 
00044 //----------------------------------------------------------------------
00045 ///  return info about the type of area being used by this defn
00046 string AreaDefinition::description() const {
00047   ostringstream ostr;
00048 
00049   switch(area_type()) {
00050   case active_area:
00051     ostr << "Active area (hidden ghosts) with " ;
00052     ostr << ghost_spec().description();
00053     break;
00054   case active_area_explicit_ghosts:
00055     ostr << "Active area (explicit ghosts) with " ;
00056     ostr << ghost_spec().description();
00057     break;
00058   case one_ghost_passive_area:
00059     ostr << "Passive area (one ghost at a time) with " ;
00060     ostr << ghost_spec().description();
00061     break;
00062   case passive_area:
00063     ostr << "Passive area (optimal alg. based on jet.def.), where relevant with " ;
00064     ostr << ghost_spec().description()  ;
00065     break;
00066   case voronoi_area:
00067     ostr << voronoi_spec().description();
00068     break;
00069   default:
00070     cerr << "Error: unrecognized area_type in AreaDefinition::description():" 
00071          << area_type() << endl;
00072     exit(-1);
00073   }
00074   return ostr.str();
00075 }
00076 
00077 FASTJET_END_NAMESPACE      // defined in fastjet/internal/base.hh
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends