FastJet 3.0.6
|
00001 //STARTHEADER 00002 // $Id: PseudoJetStructureBase.cc 3071 2013-04-01 12:52:46Z cacciari $ 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 00030 #include "fastjet/PseudoJetStructureBase.hh" 00031 #include "fastjet/Error.hh" 00032 #include "fastjet/PseudoJet.hh" 00033 #include "fastjet/ClusterSequence.hh" 00034 #ifndef __FJCORE__ 00035 #include "fastjet/ClusterSequenceAreaBase.hh" 00036 #endif // __FJCORE__ 00037 00038 using namespace std; 00039 00040 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh 00041 00042 // PseudoJetStructureBase implementation 00043 // 00044 // Contains any information related to the clustering that should be 00045 // directly accessible to PseudoJet. 00046 // 00047 // By default, this class implements basic access to the 00048 // ClusterSequence related to a PseudoJet (like its constituents or 00049 // its area). But it can be overloaded in order e.g. to give access 00050 // to the jet substructure. 00051 // 00052 // Note that it accesses the underlying ClusterSequence through a 00053 // ClusterSequenceWrapper object so it can check when the former goes 00054 // out of scope. 00055 // 00056 00057 00058 //------------------------------------------------------------- 00059 // Direct access to the associated ClusterSequence object. 00060 // 00061 // Get access to the associated ClusterSequence (if any) 00062 //------------------------------------------------------------- 00063 00064 // get a (const) pointer to the parent ClusterSequence (NULL if 00065 // inexistent) 00066 const ClusterSequence* PseudoJetStructureBase::associated_cluster_sequence() const{ 00067 return NULL; 00068 } 00069 00070 // if the jet has a valid associated cluster sequence then return a 00071 // pointer to it; otherwise throw an error 00072 // 00073 // by default, an Error is thrown 00074 const ClusterSequence * PseudoJetStructureBase::validated_cs() const{ 00075 throw Error("This PseudoJet structure is not associated with a valid ClusterSequence"); 00076 } 00077 00078 #ifndef __FJCORE__ 00079 // if the jet has valid area information then return a pointer to 00080 // the associated ClusterSequenceAreaBase object; otherwise throw an error 00081 // 00082 // by default, an Error is thrown 00083 const ClusterSequenceAreaBase * PseudoJetStructureBase::validated_csab() const{ 00084 throw Error("This PseudoJet structure is not associated with a valid cluster sequence with area"); 00085 } 00086 #endif 00087 00088 00089 //------------------------------------------------------------- 00090 // Methods for access to information about jet structure 00091 // 00092 // These allow access to jet constituents, and other jet 00093 // subtructure information. They only work if the jet is associated 00094 // with a ClusterSequence. 00095 //------------------------------------------------------------- 00096 00097 // check if it has been recombined with another PseudoJet in which 00098 // case, return its partner through the argument. Otherwise, 00099 // 'partner' is set to 0. 00100 // 00101 // by default, an Error is thrown 00102 bool PseudoJetStructureBase::has_partner(const PseudoJet & /*reference */, PseudoJet & /*partner*/) const{ 00103 throw Error("This PseudoJet structure has no implementation for has_partner"); 00104 } 00105 00106 // check if it has been recombined with another PseudoJet in which 00107 // case, return its child through the argument. Otherwise, 'child' 00108 // is set to 0. 00109 // 00110 // by default, an Error is thrown 00111 bool PseudoJetStructureBase::has_child(const PseudoJet & /*reference*/, PseudoJet & /*child*/) const{ 00112 throw Error("This PseudoJet structure has no implementation for has_child"); 00113 } 00114 00115 // check if it is the product of a recombination, in which case 00116 // return the 2 parents through the 'parent1' and 'parent2' 00117 // arguments. Otherwise, set these to 0. 00118 // 00119 // by default, an Error is thrown 00120 bool PseudoJetStructureBase::has_parents(const PseudoJet & /*reference*/, PseudoJet &/*parent1*/, PseudoJet &/*parent2*/) const{ 00121 throw Error("This PseudoJet structure has no implementation for has_parents"); 00122 } 00123 00124 // check if the reference PseudoJet is contained in the second one 00125 // passed as argument. 00126 // 00127 // by default, an Error is thrown 00128 bool PseudoJetStructureBase::object_in_jet(const PseudoJet & /*reference*/, const PseudoJet & /*jet*/) const{ 00129 throw Error("This PseudoJet structure has no implementation for is_inside"); 00130 } 00131 00132 // retrieve the constituents. 00133 // 00134 // by default, an Error is thrown 00135 vector<PseudoJet> PseudoJetStructureBase::constituents(const PseudoJet &/*reference*/) const{ 00136 throw Error("This PseudoJet structure has no implementation for constituents"); 00137 } 00138 00139 // return a vector of all subjets of the current jet (in the sense 00140 // of the exclusive algorithm) that would be obtained when running 00141 // the algorithm with the given dcut. 00142 // 00143 // Time taken is O(m ln m), where m is the number of subjets that 00144 // are found. If m gets to be of order of the total number of 00145 // constituents in the jet, this could be substantially slower than 00146 // just getting that list of constituents. 00147 // 00148 // by default, an Error is thrown 00149 vector<PseudoJet> PseudoJetStructureBase::exclusive_subjets (const PseudoJet & /*reference*/, const double & /*dcut*/) const{ 00150 throw Error("This PseudoJet structure has no implementation for exclusive_subjets"); 00151 } 00152 00153 // return the size of exclusive_subjets(...); still n ln n with same 00154 // coefficient, but marginally more efficient than manually taking 00155 // exclusive_subjets.size() 00156 // 00157 // by default, an Error is thrown 00158 int PseudoJetStructureBase::n_exclusive_subjets(const PseudoJet & /*reference*/, const double & /*dcut*/) const{ 00159 throw Error("This PseudoJet structure has no implementation for n_exclusive_subjets"); 00160 } 00161 00162 // return the list of subjets obtained by unclustering the supplied 00163 // jet down to n subjets (or all constituents if there are fewer 00164 // than n). 00165 // 00166 // by default, an Error is thrown 00167 vector<PseudoJet> PseudoJetStructureBase::exclusive_subjets_up_to (const PseudoJet & /*reference*/, int /*nsub*/) const{ 00168 throw Error("This PseudoJet structure has no implementation for exclusive_subjets"); 00169 } 00170 00171 // return the dij that was present in the merging nsub+1 -> nsub 00172 // subjets inside this jet. 00173 // 00174 // by default, an Error is thrown 00175 double PseudoJetStructureBase::exclusive_subdmerge(const PseudoJet & /*reference*/, int /*nsub*/) const{ 00176 throw Error("This PseudoJet structure has no implementation for exclusive_submerge"); 00177 } 00178 00179 // return the maximum dij that occurred in the whole event at the 00180 // stage that the nsub+1 -> nsub merge of subjets occurred inside 00181 // this jet. 00182 // 00183 // by default, an Error is thrown 00184 double PseudoJetStructureBase::exclusive_subdmerge_max(const PseudoJet & /*reference*/, int /*nsub*/) const{ 00185 throw Error("This PseudoJet structure has no implementation for exclusive_submerge_max"); 00186 } 00187 00188 00189 // retrieve the pieces building the jet. 00190 // 00191 // by default, an Error is thrown 00192 std::vector<PseudoJet> PseudoJetStructureBase::pieces(const PseudoJet & /*reference*/) const{ 00193 throw Error("This PseudoJet structure has no implementation for pieces"); 00194 } 00195 00196 // the following ones require a computation of the area in the 00197 // parent ClusterSequence (See ClusterSequenceAreaBase for details) 00198 //------------------------------------------------------------------ 00199 #ifndef __FJCORE__ 00200 00201 // return the jet (scalar) area. 00202 // 00203 // by default, an Error is thrown 00204 double PseudoJetStructureBase::area(const PseudoJet & /*reference*/) const{ 00205 throw Error("This PseudoJet structure has no implementation for area"); 00206 } 00207 00208 // return the error (uncertainty) associated with the determination 00209 // of the area of this jet. 00210 // 00211 // by default, an Error is thrown 00212 double PseudoJetStructureBase::area_error(const PseudoJet & /*reference*/) const{ 00213 throw Error("This PseudoJet structure has no implementation for area_error"); 00214 } 00215 00216 // return the jet 4-vector area. 00217 // 00218 // by default, an Error is thrown 00219 PseudoJet PseudoJetStructureBase::area_4vector(const PseudoJet & /*reference*/) const{ 00220 throw Error("This PseudoJet structure has no implementation for area_4vector"); 00221 } 00222 00223 // true if this jet is made exclusively of ghosts. 00224 // 00225 // by default, an Error is thrown 00226 bool PseudoJetStructureBase::is_pure_ghost(const PseudoJet & /*reference*/) const{ 00227 throw Error("This PseudoJet structure has no implementation for is_pure_ghost"); 00228 } 00229 #endif // __FJCORE__ 00230 00231 FASTJET_END_NAMESPACE