fastjet 2.4.5
ClusterSequenceAreaBase.hh
Go to the documentation of this file.
00001 //STARTHEADER
00002 // $Id: ClusterSequenceAreaBase.hh 2261 2011-06-16 07:55:43Z soyez $
00003 //
00004 // Copyright (c) 2005-2006, Matteo Cacciari and Gavin Salam
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, write to the Free Software
00026 //  Foundation, Inc.:
00027 //      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00028 //----------------------------------------------------------------------
00029 //ENDHEADER
00030 
00031 #ifndef __FASTJET_CLUSTERSEQUENCEAREABASE_HH__
00032 #define __FASTJET_CLUSTERSEQUENCEAREABASE_HH__
00033 
00034 #include "fastjet/ClusterSequence.hh"
00035 #include "fastjet/internal/LimitedWarning.hh"
00036 #include "fastjet/RangeDefinition.hh"
00037 
00038 FASTJET_BEGIN_NAMESPACE
00039 
00045 class ClusterSequenceAreaBase : public ClusterSequence {
00046 public:
00047   
00050   template<class L> ClusterSequenceAreaBase
00051          (const std::vector<L> & pseudojets, 
00052           const JetDefinition & jet_def,
00053           const bool & writeout_combinations = false) :
00054            ClusterSequence(pseudojets, jet_def, writeout_combinations) {}
00055 
00056 
00058   ClusterSequenceAreaBase() {}
00059 
00060 
00062   virtual ~ClusterSequenceAreaBase() {}
00063 
00064 
00067   virtual double area       (const PseudoJet & ) const {return 0.0;}
00068 
00071   virtual double area_error (const PseudoJet & ) const {return 0.0;}
00072 
00084   virtual PseudoJet area_4vector(const PseudoJet & ) const {
00085     return PseudoJet(0.0,0.0,0.0,0.0);}
00086 
00092   virtual bool is_pure_ghost(const PseudoJet & ) const {
00093     return false;
00094   }
00095 
00101   virtual bool has_explicit_ghosts() const {
00102     return false;
00103   }
00104 
00107   virtual double empty_area(const RangeDefinition & range) const;
00108 
00111   double empty_area_from_jets(const std::vector<PseudoJet> & all_jets,
00112                               const RangeDefinition & range) const;
00113 
00119   virtual double n_empty_jets(const RangeDefinition & range) const {
00120     double R = jet_def().R();
00121     return empty_area(range)/(0.55*pi*R*R);
00122   }
00123 
00126   double median_pt_per_unit_area(const RangeDefinition & range) const;
00127 
00130   double median_pt_per_unit_area_4vector(const RangeDefinition & range) const;
00131   
00136   double median_pt_per_unit_something(
00137                     const RangeDefinition & range, bool use_area_4vector) const;
00138 
00159   virtual void get_median_rho_and_sigma(const RangeDefinition & range, 
00160                                         bool use_area_4vector,
00161                                         double & median, double & sigma,
00162                                         double & mean_area) const;
00163 
00179   virtual void get_median_rho_and_sigma(const std::vector<PseudoJet> & all_jets,
00180                                         const RangeDefinition & range, 
00181                                         bool use_area_4vector,
00182                                         double & median, double & sigma,
00183                                         double & mean_area,
00184                                         bool all_are_inclusive = false) const;
00185 
00188   virtual void get_median_rho_and_sigma(const RangeDefinition & range, 
00189                                 bool use_area_4vector,
00190                                 double & median, double & sigma) const {
00191     double mean_area;
00192     get_median_rho_and_sigma(range,  use_area_4vector,
00193                              median,  sigma, mean_area);
00194   }
00195   
00196 
00201   virtual void parabolic_pt_per_unit_area(double & a, double & b, 
00202                                           const RangeDefinition & range, 
00203                                           double exclude_above=-1.0, 
00204                                           bool use_area_4vector=false) const;
00205 
00210   std::vector<PseudoJet> subtracted_jets(const double rho,
00211                                          const double ptmin=0.0) const;
00212 
00217   std::vector<PseudoJet> subtracted_jets(const RangeDefinition & range, 
00218                                          const double ptmin=0.0) const;
00219 
00221   PseudoJet subtracted_jet(const PseudoJet & jet,
00222                            const double rho) const;
00223 
00228   PseudoJet subtracted_jet(const PseudoJet & jet,
00229                            const RangeDefinition & range) const;
00230 
00232   double subtracted_pt(const PseudoJet & jet,
00233                        const double rho,
00234                        bool use_area_4vector=false) const;
00235 
00239   double subtracted_pt(const PseudoJet & jet,
00240                        const RangeDefinition & range,
00241                        bool use_area_4vector=false) const;
00242 
00243 
00244 private:
00246   static LimitedWarning _warnings;
00247   static LimitedWarning _warnings_zero_area;
00248   static LimitedWarning _warnings_empty_area;
00249 
00251   void _check_jet_alg_good_for_median() const;
00252   
00253 };
00254 
00255 
00256 
00257 FASTJET_END_NAMESPACE
00258 
00259 #endif // __FASTJET_CLUSTERSEQUENCEAREABASE_HH__
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines