2 // $Id: ClusterSequence1GhostPassiveArea.hh 1134 2008-03-15 17:05:16Z salam $
4 // Copyright (c) 2005-2007, Matteo Cacciari, Gavin Salam and Gregory Soyez
6 //----------------------------------------------------------------------
7 // This file is part of FastJet.
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.
14 // The algorithms that underlie FastJet have required considerable
15 // development and are described in hep-ph/0512210. If you use
16 // FastJet as part of work towards a scientific publication, please
17 // include a citation to the FastJet paper.
19 // FastJet is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU General Public License for more details.
24 // You should have received a copy of the GNU General Public License
25 // along with FastJet; if not, write to the Free Software
27 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 //----------------------------------------------------------------------
31 #ifndef __FASTJET_CLUSTERSEQUENCE1GHOSTPASSIVEAREA_HH__
32 #define __FASTJET_CLUSTERSEQUENCE1GHOSTPASSIVEAREA_HH__
35 #include "fastjet/PseudoJet.hh"
36 #include "fastjet/ClusterSequenceAreaBase.hh"
37 #include "fastjet/ClusterSequenceActiveArea.hh"
41 namespace fastjet { // defined in fastjet/internal/base.hh
43 //using namespace std;
45 /// Class that behaves essentially like ClusterSequence except
46 /// that it also provides access to the area of a jet (which
47 /// will be a random quantity... Figure out what to do about seeds
49 class ClusterSequence1GhostPassiveArea : public ClusterSequenceActiveArea {
52 ClusterSequence1GhostPassiveArea() {}
54 /// constructor based on JetDefinition and 1GhostPassiveAreaSpec
55 template<class L> ClusterSequence1GhostPassiveArea
56 (const std::vector<L> & pseudojets,
57 const JetDefinition & jet_def,
58 const GhostedAreaSpec & area_spec,
59 const bool & writeout_combinations = false) ;
61 /// return an estimate for the number of empty jets -- one uses the
62 /// AreaBase one rather than the ActiveArea one (which for which we
63 /// do not have the information).
64 virtual double n_empty_jets(const RangeDefinition & range) const {
65 return ClusterSequenceAreaBase::n_empty_jets(range);
69 /// does the initialisation and running specific to the passive
71 void _initialise_and_run_1GPA (const JetDefinition & jet_def,
72 const GhostedAreaSpec & area_spec,
73 const bool & writeout_combinations = false);
77 void _run_1GPA(const GhostedAreaSpec & area_spec);
83 template<class L> ClusterSequence1GhostPassiveArea::ClusterSequence1GhostPassiveArea
84 (const std::vector<L> & pseudojets,
85 const JetDefinition & jet_def,
86 const GhostedAreaSpec & area_spec,
87 const bool & writeout_combinations) {
89 // transfer the initial jets (type L) into our own array
90 _transfer_input_jets(pseudojets);
92 // run the clustering for passive areas
93 _initialise_and_run_1GPA(jet_def, area_spec, writeout_combinations);
99 } // fastjet namespace
101 #endif // __FASTJET_CLUSTERSEQUENCE1GHOSTPASSIVEAREA_HH__