Changeset 973b92a in git for external/fastjet/contribs/Nsubjettiness/ExtraRecombiners.cc
- Timestamp:
- Oct 9, 2015, 2:47:38 PM (9 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 8713dee
- Parents:
- f118021
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
external/fastjet/contribs/Nsubjettiness/ExtraRecombiners.cc
rf118021 r973b92a 5 5 // Jesse Thaler, Ken Van Tilburg, Christopher K. Vermilion, and TJ Wilkason 6 6 // 7 // $Id: WinnerTakeAllRecombiner.cc 597 2014-04-16 23:07:55Z jthaler $7 // $Id: ExtraRecombiners.cc 842 2015-08-20 13:44:31Z jthaler $ 8 8 //---------------------------------------------------------------------- 9 9 // This file is part of FastJet contrib. … … 23 23 //---------------------------------------------------------------------- 24 24 25 #include " WinnerTakeAllRecombiner.hh"25 #include "ExtraRecombiners.hh" 26 26 27 27 FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh 28 28 29 29 namespace contrib{ 30 31 std::string GeneralEtSchemeRecombiner::description() const { 32 return "General Et-scheme recombination"; 33 } 34 35 // recombine pa and pb according to a generalized Et-scheme parameterized by the power delta 36 void GeneralEtSchemeRecombiner::recombine(const fastjet::PseudoJet & pa, const fastjet::PseudoJet & pb, fastjet::PseudoJet & pab) const { 37 38 // Define new weights for recombination according to delta 39 // definition of ratio done so that we do not encounter issues about numbers being too large for huge values of delta 40 double ratio; 41 if (std::abs(_delta - 1.0) < std::numeric_limits<double>::epsilon()) ratio = pb.perp()/pa.perp(); // save computation time of pow() 42 else ratio = pow(pb.perp()/pa.perp(), _delta); 43 double weighta = 1.0/(1.0 + ratio); 44 double weightb = 1.0/(1.0 + 1.0/ratio); 45 46 double perp_ab = pa.perp() + pb.perp(); 47 // reweight the phi and rap sums according to the weights above 48 if (perp_ab != 0.0) { 49 double y_ab = (weighta * pa.rap() + weightb * pb.rap()); 50 51 double phi_a = pa.phi(), phi_b = pb.phi(); 52 if (phi_a - phi_b > pi) phi_b += twopi; 53 if (phi_a - phi_b < -pi) phi_b -= twopi; 54 double phi_ab = (weighta * phi_a + weightb * phi_b); 55 56 pab.reset_PtYPhiM(perp_ab, y_ab, phi_ab); 57 58 } 59 else { 60 pab.reset(0.0,0.0,0.0,0.0); 61 } 62 } 63 30 64 31 65 std::string WinnerTakeAllRecombiner::description() const { 32 return "Winner Take All schemerecombination";66 return "Winner-Take-All recombination"; 33 67 } 34 68
Note:
See TracChangeset
for help on using the changeset viewer.