FastJet 3.0.6
ClusterSequence1GhostPassiveArea.hh
00001 //STARTHEADER
00002 // $Id: ClusterSequence1GhostPassiveArea.hh 2687 2011-11-14 11:17:51Z soyez $
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 #ifndef __FASTJET_CLUSTERSEQUENCE1GHOSTPASSIVEAREA_HH__
00030 #define __FASTJET_CLUSTERSEQUENCE1GHOSTPASSIVEAREA_HH__
00031 
00032 
00033 #include "fastjet/PseudoJet.hh"
00034 #include "fastjet/ClusterSequenceAreaBase.hh"
00035 #include "fastjet/ClusterSequenceActiveArea.hh"
00036 #include<iostream>
00037 #include<vector>
00038 
00039 FASTJET_BEGIN_NAMESPACE      // defined in fastjet/internal/base.hh
00040 
00041 //using namespace std;
00042 
00043 /// @ingroup sec_area_classes
00044 /// \class ClusterSequence1GhostPassiveArea
00045 /// Like ClusterSequence with computation of the passive jet area by
00046 /// adding a single ghost
00047 ///
00048 /// Class that behaves essentially like ClusterSequence except
00049 /// that it also provides access to the area of a jet (which
00050 /// will be a random quantity... Figure out what to do about seeds 
00051 /// later...)
00052 ///
00053 /// This class should not be used directly. Rather use
00054 /// ClusterSequenceArea
00055 class ClusterSequence1GhostPassiveArea : public ClusterSequenceActiveArea {
00056 public:
00057 
00058   ClusterSequence1GhostPassiveArea() {}
00059 
00060   /// constructor based on JetDefinition and 1GhostPassiveAreaSpec
00061   template<class L> ClusterSequence1GhostPassiveArea
00062          (const std::vector<L> & pseudojets, 
00063           const JetDefinition & jet_def_in,
00064           const GhostedAreaSpec & area_spec,
00065           const bool & writeout_combinations = false) ;
00066 
00067   /// return an estimate for the number of empty jets -- one uses the
00068   /// AreaBase one rather than the ActiveArea one (which for which we
00069   /// do not have the information).
00070   virtual double n_empty_jets(const Selector & selector) const {
00071     return ClusterSequenceAreaBase::n_empty_jets(selector);
00072   }
00073 
00074 protected:
00075   /// does the initialisation and running specific to the passive
00076   /// areas class
00077   void _initialise_and_run_1GPA (const JetDefinition & jet_def_in,
00078                                const GhostedAreaSpec & area_spec,
00079                                const bool & writeout_combinations = false);
00080 
00081 private:
00082 
00083   void _run_1GPA(const GhostedAreaSpec & area_spec);
00084 };
00085 
00086 
00087 
00088 
00089 template<class L> ClusterSequence1GhostPassiveArea::ClusterSequence1GhostPassiveArea 
00090 (const std::vector<L> & pseudojets, 
00091  const JetDefinition & jet_def_in,
00092  const GhostedAreaSpec & area_spec,
00093  const bool & writeout_combinations) {
00094 
00095   // transfer the initial jets (type L) into our own array
00096   _transfer_input_jets(pseudojets);
00097 
00098   // run the clustering for passive areas
00099   _initialise_and_run_1GPA(jet_def_in, area_spec, writeout_combinations);
00100 
00101 }
00102 
00103 
00104   
00105 FASTJET_END_NAMESPACE
00106 
00107 #endif // __FASTJET_CLUSTERSEQUENCE1GHOSTPASSIVEAREA_HH__
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends