|
[Rivet-svn] rivet: Add (i)discardIfAnyDeltaRLess and (i)discardIfAnyDeltaPhi...Rivet Mercurial rivet at projects.hepforge.orgThu Apr 26 23:00:01 BST 2018
details: https://rivet.hepforge.org/hg/rivet/rev/d8e7e8d6bc92 branches: release-2-6-x changeset: 6281:d8e7e8d6bc92 user: Andy Buckley <andy at insectnation.org> date: Thu Apr 26 22:55:15 2018 +0100 description: Add (i)discardIfAnyDeltaRLess and (i)discardIfAnyDeltaPhiLess functions. Add pairMass and pairPt functions. diffs (truncated from 82 to 50 lines): --- a/ChangeLog Thu Apr 26 16:41:13 2018 +0100 +++ b/ChangeLog Thu Apr 26 22:55:15 2018 +0100 @@ -1,5 +1,9 @@ 2018-04-26 Andy Buckley <andy.buckley at cern.ch> + * Add pairMass and pairPt functions. + + * Add (i)discardIfAnyDeltaRLess and (i)discardIfAnyDeltaPhiLess functions. + * Add normalize() methods to Cutflow and Cutflows. * Add DirectFinalState and IndirectFinalState alias headers, for forward compatibility. 'Prompt' is confusing. --- a/include/Rivet/Math/MathUtils.hh Thu Apr 26 16:41:13 2018 +0100 +++ b/include/Rivet/Math/MathUtils.hh Thu Apr 26 22:55:15 2018 +0100 @@ -306,6 +306,9 @@ } + /// @todo geomspace + + /// @brief Make a list of @a nbins + 1 values spaced for equal area /// Breit-Wigner binning between @a start and @a end inclusive. @a /// mu and @a gamma are the Breit-Wigner parameters. --- a/include/Rivet/Tools/ParticleBaseUtils.hh Thu Apr 26 16:41:13 2018 +0100 +++ b/include/Rivet/Tools/ParticleBaseUtils.hh Thu Apr 26 22:55:15 2018 +0100 @@ -472,6 +472,38 @@ //@} + /// @name Isolation helper routines + //@{ + + template<typename PBCONTAINER1, typename PBCONTAINER2> + void idiscardIfAnyDeltaRLess(PBCONTAINER1& tofilter, const PBCONTAINER2& tocompare, double dR) { + for (const ParticleBase& pb : tocompare) + ifilter_discard(tofilter, deltaRLess(pb, dR)); + } + + template<typename PBCONTAINER1, typename PBCONTAINER2> + PBCONTAINER1 discardIfAnyDeltaRLess(const PBCONTAINER1& tofilter, const PBCONTAINER2& tocompare, double dR) { + PBCONTAINER1 tmp{tofilter}; + idiscardIfAnyDeltaRLess(tmp, tocompare, dR); + return tmp; + } + + template<typename PBCONTAINER1, typename PBCONTAINER2> + void idiscardIfAnyDeltaPhiLess(PBCONTAINER1& tofilter, const PBCONTAINER2& tocompare, double dphi) { + for (const ParticleBase& pb : tocompare) + ifilter_discard(tofilter, deltaPhiLess(pb, dphi));
More information about the Rivet-svn mailing list |