|
[Rivet-svn] rivet: Add support for specifying bin edges as braced initialize...Rivet Mercurial rivet at projects.hepforge.orgWed Jul 19 11:00:01 BST 2017
details: https://rivet.hepforge.org/hg/rivet/rev/411f1652f592 branches: changeset: 5954:411f1652f592 user: Andy Buckley <andy at insectnation.org> date: Wed Jul 19 10:57:11 2017 +0100 description: Add support for specifying bin edges as braced initializer lists rather than explicit vector<double>. diffs (truncated from 248 to 50 lines): --- a/ChangeLog Tue Jul 18 22:38:45 2017 +0100 +++ b/ChangeLog Wed Jul 19 10:57:11 2017 +0100 @@ -1,3 +1,7 @@ +2017-07-19 Andy Buckley <andy.buckley at cern.ch> + + * Add support for specifying bin edges as braced initializer lists rather than explicit vector<double>. + 2017-07-18 Andy Buckley <andy.buckley at cern.ch> * Enable methods for booking of Histo2D and Profile2D from Scatter3D reference data. --- a/analyses/pluginMC/EXAMPLE.cc Tue Jul 18 22:38:45 2017 +0100 +++ b/analyses/pluginMC/EXAMPLE.cc Wed Jul 19 10:57:11 2017 +0100 @@ -16,21 +16,18 @@ /// Constructor DEFAULT_RIVET_ANALYSIS_CTOR(EXAMPLE); + /// @name Analysis methods //@{ /// Set up projections and book histograms void init() { // Projections - MSG_TRACE(0); - const FinalState cnfs(Cuts::abseta < 4 && Cuts::pT > 500*MeV); - MSG_TRACE(1); + const FinalState cnfs(Cuts::abseta < 2.5 && Cuts::pT > 500*MeV); const ChargedFinalState cfs(cnfs); - MSG_TRACE(2); declare(cnfs, "FS"); - MSG_TRACE(3); declare(cfs, "CFS"); - declare(FastJets(cnfs, FastJets::KT, 0.7), "Jets"); + declare(FastJets(cnfs, FastJets::ANTIKT, 0.4), "Jets"); declare(Thrust(cfs), "Thrust"); declare(Sphericity(cfs), "Sphericity"); @@ -42,11 +39,7 @@ _histMajor = bookHisto1D("Major", 10, 0.0, 0.6); _histSphericity = bookHisto1D("Sphericity", 10, 0.0, 0.8); _histAplanarity = bookHisto1D("Aplanarity", 10, 0.0, 0.3); - - // Non-uniform binning example: - double edges[11] = { 0.5, 0.6, 0.7, 0.80, 0.85, 0.9, 0.92, 0.94, 0.96, 0.98, 1.0 }; - vector<double> vedges(edges, edges+11); - _histThrust = bookHisto1D("Thrust", vedges); + _histThrust = bookHisto1D("Thrust", { 0.5, 0.6, 0.7, 0.80, 0.85, 0.9, 0.92, 0.94, 0.96, 0.98, 1.0 }); }
More information about the Rivet-svn mailing list |