Changeset 35cdc46 in git for external/fastjet/PseudoJet.cc
- Timestamp:
- Sep 3, 2014, 3:18:54 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- be2222c
- Parents:
- 5b5a56b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
external/fastjet/PseudoJet.cc
r5b5a56b r35cdc46 1 // STARTHEADER2 // $Id $3 // 4 // Copyright (c) 2005-201 1, Matteo Cacciari, Gavin P. Salam and Gregory Soyez1 //FJSTARTHEADER 2 // $Id: PseudoJet.cc 3565 2014-08-11 15:24:39Z salam $ 3 // 4 // Copyright (c) 2005-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez 5 5 // 6 6 //---------------------------------------------------------------------- … … 13 13 // 14 14 // The algorithms that underlie FastJet have required considerable 15 // development and are described in hep-ph/0512210. If you use 15 // development. They are described in the original FastJet paper, 16 // hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use 16 17 // FastJet as part of work towards a scientific publication, please 17 // include a citation to the FastJet paper. 18 // quote the version you use and include a citation to the manual and 19 // optionally also to hep-ph/0512210. 18 20 // 19 21 // FastJet is distributed in the hope that it will be useful, … … 25 27 // along with FastJet. If not, see <http://www.gnu.org/licenses/>. 26 28 //---------------------------------------------------------------------- 27 // ENDHEADER29 //FJENDHEADER 28 30 29 31 … … 176 178 // return the product, coeff * jet 177 179 PseudoJet operator* (double coeff, const PseudoJet & jet) { 180 // see the comment in operator*= about ensuring valid rap phi 181 // before a multiplication to handle case of multiplication by 182 // zero, while maintaining rapidity and phi 183 jet._ensure_valid_rap_phi(); 178 184 //return PseudoJet(coeff*jet.four_mom()); 179 185 // the following code is hopefully more efficient … … 198 204 /// multiply the jet's momentum by the coefficient 199 205 void PseudoJet::operator*=(double coeff) { 206 // operator*= aims to maintain the rapidity and azimuth 207 // for the PseudoJet; if they have already been evaluated 208 // this is fine, but if they haven't and coeff is sufficiently 209 // small as to cause a zero or underflow result, then a subsequent 210 // invocation of rap or phi will lead to a non-sensical result. 211 // So, here, we preemptively ensure that rapidity and phi 212 // are correctly cached 213 _ensure_valid_rap_phi(); 200 214 _px *= coeff; 201 215 _py *= coeff; … … 261 275 262 276 //---------------------------------------------------------------------- 263 /// transform this jet (given in lab) into a jet in the rest264 /// frame of prest277 /// transform this jet (given in the rest frame of prest) into a jet 278 /// in the lab frame 265 279 // 266 280 // NB: code adapted from that in herwig f77 (checked how it worked … … 288 302 289 303 //---------------------------------------------------------------------- 290 /// transform this jet (given in the rest frame of prest) into a jet291 /// in the lab frame;304 /// transform this jet (given in lab) into a jet in the rest 305 /// frame of prest 292 306 // 293 307 // NB: code adapted from that in herwig f77 (checked how it worked … … 587 601 // an Error is thrown if this PseudoJet has no currently valid 588 602 // associated ClusterSequence 589 std::vector<PseudoJet> PseudoJet::exclusive_subjets (const double &dcut) const {603 std::vector<PseudoJet> PseudoJet::exclusive_subjets (const double dcut) const { 590 604 return validated_structure_ptr()->exclusive_subjets(*this, dcut); 591 605 } … … 598 612 // an Error is thrown if this PseudoJet has no currently valid 599 613 // associated ClusterSequence 600 int PseudoJet::n_exclusive_subjets(const double &dcut) const {614 int PseudoJet::n_exclusive_subjets(const double dcut) const { 601 615 return validated_structure_ptr()->n_exclusive_subjets(*this, dcut); 602 616 }
Note:
See TracChangeset
for help on using the changeset viewer.