|
[Rivet-svn] rivet: Add experimental Cutflow and Cutflows objects for BSM cut...Rivet Mercurial rivet at projects.hepforge.orgWed Sep 14 00:15:02 BST 2016
details: https://rivet.hepforge.org/hg/rivet/rev/3f51759607cf branches: release-2-5-x changeset: 5474:3f51759607cf user: Andy Buckley <andy at insectnation.org> date: Wed Sep 14 00:02:31 2016 +0100 description: Add experimental Cutflow and Cutflows objects for BSM cut tracking. diffs (truncated from 195 to 50 lines): --- a/ChangeLog Tue Sep 13 16:17:12 2016 +0100 +++ b/ChangeLog Wed Sep 14 00:02:31 2016 +0100 @@ -1,5 +1,7 @@ 2016-09-13 Andy Buckley <andy.buckley at cern.ch> + * Add experimental Cutflow and Cutflows objects for BSM cut tracking. + * Add 'direct' versions of any, all, none to Utils.hh, with an implicity bool() transforming function. --- a/include/Rivet/Makefile.am Tue Sep 13 16:17:12 2016 +0100 +++ b/include/Rivet/Makefile.am Wed Sep 14 00:02:31 2016 +0100 @@ -101,6 +101,7 @@ Tools/BinnedHistogram.hh \ Tools/Cmp.fhh \ Tools/Cmp.hh \ + Tools/Cutflow.hh \ Tools/Cuts.fhh \ Tools/Cuts.hh \ Tools/Exceptions.hh \ --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/Rivet/Tools/Cutflow.hh Wed Sep 14 00:02:31 2016 +0100 @@ -0,0 +1,172 @@ +#ifndef RIVET_Cutflow_HH +#define RIVET_Cutflow_HH + +#include "Rivet/Tools/Utils.hh" + +namespace Rivet { + + + /// A tracker of numbers & fractions of events passing sequential cuts + struct Cutflow { + + /// @todo Also provide single-cut filling/reading by index/name + /// @todo Provide a Cutflows wrapper with index/name access to contained CFs and index/name all-CF filling + /// @todo Print total and incremental acceptance percentages + + /// @brief Default constructor + /// + /// Does nothing! Just to allow storage in STL containers and use as a member variable without using the init list + Cutflow() {} + + /// Proper constructor + Cutflow(const string& cfname, const vector<string>& cutnames) + : name(cfname), ncuts(cutnames.size()), cuts(cutnames), counts(ncuts+1, 0) + { } + + /// @brief Fill the pre-cut counter + void fillinit() {
More information about the Rivet-svn mailing list |