|
[Rivet-svn] rivet: 10 new changesetsRivet Mercurial rivet at projects.hepforge.orgThu Sep 8 23:00:02 BST 2016
details: https://rivet.hepforge.org/hg/rivet/rev/d82171982f2d branches: release-2-5-x changeset: 5443:d82171982f2d user: Andy Buckley <andy at insectnation.org> date: Wed Sep 07 22:14:17 2016 +0100 description: Start adding a decay mode arg to the partonic top finder, and rename it as PartonicTops details: https://rivet.hepforge.org/hg/rivet/rev/afd0b7c1e3f6 branches: release-2-5-x changeset: 5444:afd0b7c1e3f6 user: Andy Buckley <andy at insectnation.org> date: Wed Sep 07 22:15:14 2016 +0100 description: Add templated functor filtering args to the Particle parent/child/descendent methods. details: https://rivet.hepforge.org/hg/rivet/rev/41d6b936ce8e branches: release-2-5-x changeset: 5445:41d6b936ce8e user: Andy Buckley <andy at insectnation.org> date: Thu Sep 08 12:05:15 2016 +0100 description: PartonicTops decay mode selection ~done details: https://rivet.hepforge.org/hg/rivet/rev/5391522615e4 branches: release-2-5-x changeset: 5446:5391522615e4 user: Andy Buckley <andy at insectnation.org> date: Thu Sep 08 14:48:06 2016 +0100 description: Add missing delta{Phi,Eta,Rap}{Gtr,Less} functors to ParticleBaseUtils.hh details: https://rivet.hepforge.org/hg/rivet/rev/411e2d835c27 branches: release-2-5-x changeset: 5447:411e2d835c27 user: Andy Buckley <andy at insectnation.org> date: Thu Sep 08 16:12:39 2016 +0100 description: Change canonical isChLepton to isChargedLepton details: https://rivet.hepforge.org/hg/rivet/rev/a5914c15f4ca branches: release-2-5-x changeset: 5448:a5914c15f4ca user: Andy Buckley <andy at insectnation.org> date: Thu Sep 08 16:13:22 2016 +0100 description: TODO comment tweak details: https://rivet.hepforge.org/hg/rivet/rev/efae19c04d0a branches: release-2-5-x changeset: 5449:efae19c04d0a user: Andy Buckley <andy at insectnation.org> date: Thu Sep 08 16:28:33 2016 +0100 description: Add == and != operators for cuts applied to integers. details: https://rivet.hepforge.org/hg/rivet/rev/9710380a366c branches: release-2-5-x changeset: 5450:9710380a366c user: Andy Buckley <andy at insectnation.org> date: Thu Sep 08 21:03:49 2016 +0100 description: Provide required extra explicit functor constructors from ParticleBase: not sure what the ambiguities are, but this fixes compilation details: https://rivet.hepforge.org/hg/rivet/rev/b7dd71c10353 branches: release-2-5-x changeset: 5451:b7dd71c10353 user: Andy Buckley <andy at insectnation.org> date: Thu Sep 08 21:58:41 2016 +0100 description: Add C-array version of multi-target Analysis::scale() and normalize(), and fix (semantic) constness. details: https://rivet.hepforge.org/hg/rivet/rev/190330805c98 branches: release-2-5-x changeset: 5452:190330805c98 user: Andy Buckley <andy at insectnation.org> date: Thu Sep 08 22:48:15 2016 +0100 description: Oops, the constness was necessary for rvalue ref init lists to work... reinstated, even though it's semantically weird diffs (truncated from 757 to 50 lines): --- a/ChangeLog Tue Sep 06 19:54:40 2016 +0100 +++ b/ChangeLog Thu Sep 08 22:48:15 2016 +0100 @@ -1,3 +1,15 @@ +2016-09-08 Andy Buckley <andy.buckley at cern.ch> + + * Add C-array version of multi-target Analysis::scale() and normalize(), and fix (semantic) constness. + + * Add == and != operators for cuts applied to integers. + + * Add missing delta{Phi,Eta,Rap}{Gtr,Less} functors to ParticleBaseUtils.hh + +2016-09-07 Andy Buckley <andy.buckley at cern.ch> + + * Add templated functor filtering args to the Particle parent/child/descendent methods. + 2016-09-06 Andy Buckley <andy.buckley at cern.ch> * Add ATLAS Run 1 medium and tight electron ID efficiency functions. @@ -19,7 +31,7 @@ 2016-09-01 Andy Buckley <andy.buckley at cern.ch> - * Add a PartonicTopFinder projection. + * Add a PartonicTops projection. * Add overloaded versions of the Event::allParticles() method with selection Cut or templated selection function arguments. --- a/include/Rivet/Analysis.hh Tue Sep 06 19:54:40 2016 +0100 +++ b/include/Rivet/Analysis.hh Thu Sep 08 22:48:15 2016 +0100 @@ -640,40 +640,78 @@ void scale(CounterPtr cnt, double factor); /// Multiplicatively scale the given counters, @a cnts, by factor @s factor. + /// @note Constness intentional, if weird, to allow passing rvalue refs of smart ptrs (argh) + /// @todo Use SFINAE for a generic iterable of CounterPtrs void scale(const std::vector<CounterPtr>& cnts, double factor) { - for (const auto& c : cnts) scale(c, factor); + for (auto& c : cnts) scale(c, factor); } + /// @todo YUCK! + template <std::size_t array_size> + void scale(const CounterPtr (&cnts)[array_size], double factor) { + // for (size_t i = 0; i < std::extent<decltype(cnts)>::value; ++i) scale(cnts[i], factor); + for (auto& c : cnts) scale(c, factor); + } + /// Normalize the given histogram, @a histo, to area = @a norm. void normalize(Histo1DPtr histo, double norm=1.0, bool includeoverflows=true);
More information about the Rivet-svn mailing list |