|
||||
File indexing completed on 2025-01-18 09:57:17
0001 //FJSTARTHEADER 0002 // $Id$ 0003 // 0004 // Copyright (c) 2005-2021, Matteo Cacciari, Gavin P. Salam and Gregory Soyez 0005 // 0006 //---------------------------------------------------------------------- 0007 // This file is part of FastJet. 0008 // 0009 // FastJet is free software; you can redistribute it and/or modify 0010 // it under the terms of the GNU General Public License as published by 0011 // the Free Software Foundation; either version 2 of the License, or 0012 // (at your option) any later version. 0013 // 0014 // The algorithms that underlie FastJet have required considerable 0015 // development. They are described in the original FastJet paper, 0016 // hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use 0017 // FastJet as part of work towards a scientific publication, please 0018 // quote the version you use and include a citation to the manual and 0019 // optionally also to hep-ph/0512210. 0020 // 0021 // FastJet is distributed in the hope that it will be useful, 0022 // but WITHOUT ANY WARRANTY; without even the implied warranty of 0023 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0024 // GNU General Public License for more details. 0025 // 0026 // You should have received a copy of the GNU General Public License 0027 // along with FastJet. If not, see <http://www.gnu.org/licenses/>. 0028 //---------------------------------------------------------------------- 0029 //FJENDHEADER 0030 0031 #ifndef __FASTJET_CLUSTERSEQUENCEVORONOIAREA_HH__ 0032 #define __FASTJET_CLUSTERSEQUENCEVORONOIAREA_HH__ 0033 0034 #include "fastjet/PseudoJet.hh" 0035 #include "fastjet/AreaDefinition.hh" 0036 #include "fastjet/ClusterSequenceAreaBase.hh" 0037 #include <memory> 0038 #include <vector> 0039 0040 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh 0041 0042 /// @ingroup sec_area_classes 0043 /// \class ClusterSequenceVoronoiArea 0044 /// Like ClusterSequence with computation of the Voronoi jet area 0045 /// 0046 /// Handle the computation of Voronoi jet area. 0047 /// 0048 /// This class should not be used directly. Rather use 0049 /// ClusterSequenceArea with the appropriate AreaDefinition 0050 class ClusterSequenceVoronoiArea : public ClusterSequenceAreaBase { 0051 public: 0052 /// template ctor 0053 /// \param pseudojet list of jets (template type) 0054 /// \param jet_def jet definition 0055 /// \param effective_Rfact effective radius 0056 /// \param writeout_combinations ?????? 0057 template<class L> ClusterSequenceVoronoiArea 0058 (const std::vector<L> & pseudojets, 0059 const JetDefinition & jet_def, 0060 const VoronoiAreaSpec & spec = VoronoiAreaSpec(), 0061 const bool & writeout_combinations = false); 0062 0063 /// default dtor 0064 ~ClusterSequenceVoronoiArea(); 0065 0066 /// return the area associated with the given jet 0067 virtual inline double area(const PseudoJet & jet) const FASTJET_OVERRIDE { 0068 return _voronoi_area[jet.cluster_hist_index()];} 0069 0070 /// return a 4-vector area associated with the given jet -- strictly 0071 /// this is not the exact 4-vector area, but rather an approximation 0072 /// made of sums of centres of all Voronoi cells in jet, each 0073 /// contributing with a normalisation equal to the area of the cell 0074 virtual inline PseudoJet area_4vector(const PseudoJet & jet) const FASTJET_OVERRIDE { 0075 return _voronoi_area_4vector[jet.cluster_hist_index()];} 0076 0077 /// return the error of the area associated with the given jet 0078 /// (0 by definition for a voronoi area) 0079 virtual inline double area_error(const PseudoJet & /*jet*/) const FASTJET_OVERRIDE { 0080 return 0.0;} 0081 0082 /// passive area calculator -- to be defined in the .cc file (it will do 0083 /// the true hard work) 0084 class VoronoiAreaCalc; 0085 0086 0087 private: 0088 /// initialisation of the Voronoi Area 0089 void _initializeVA(); 0090 0091 std::vector<double> _voronoi_area; ///< vector containing the result 0092 std::vector<PseudoJet> _voronoi_area_4vector; ///< vector containing approx 4-vect areas 0093 VoronoiAreaCalc *_pa_calc; ///< area calculator 0094 double _effective_Rfact; ///< effective radius 0095 }; 0096 0097 0098 0099 0100 /// template constructor need to be specified in the header! 0101 //---------------------------------------------------------------------- 0102 template<class L> ClusterSequenceVoronoiArea::ClusterSequenceVoronoiArea 0103 (const std::vector<L> &pseudojets, 0104 const JetDefinition &jet_def_in, 0105 const VoronoiAreaSpec & spec, 0106 const bool & writeout_combinations) : 0107 _effective_Rfact(spec.effective_Rfact()) { 0108 0109 // transfer the initial jets (type L) into our own array 0110 _transfer_input_jets(pseudojets); 0111 0112 // run the clustering 0113 _initialise_and_run(jet_def_in,writeout_combinations); 0114 0115 // the jet clustering's already been done, now worry about areas... 0116 _initializeVA(); 0117 } 0118 0119 FASTJET_END_NAMESPACE 0120 0121 #endif // __FASTJET_CLUSTERSEQUENCEVORONOIAREA_HH__
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |