[Rivet-svn] rivet: Tweak example analysis code generated by rivet-mkanalysis

Rivet Mercurial rivet at projects.hepforge.org
Tue Aug 9 17:00:02 BST 2016


details:   https://rivet.hepforge.org/hg/rivet/rev/69baf34d759a
branches:  release-2-5-x
changeset: 5398:69baf34d759a
user:      Andy Buckley <andy at insectnation.org>
date:      Tue Aug 09 16:57:21 2016 +0100
description:
Tweak example analysis code generated by rivet-mkanalysis

diffs (truncated from 53 to 50 lines):

--- a/bin/rivet-mkanalysis	Mon Aug 08 17:20:41 2016 +0100
+++ b/bin/rivet-mkanalysis	Tue Aug 09 16:57:21 2016 +0100
@@ -202,11 +202,12 @@
     void init() {
 
       // Initialise and register projections
-      // declare(FinalState(Cuts::pT > 100*MeV), "FS");
+      declare(FinalState(Cuts::abseta < 5 && Cuts::pT > 100*MeV), "FS");
 
       // Book histograms
-      // _h_XXXX = bookProfile1D(1, 1, 1);
-      // _h_YYYY = bookHisto1D(2, 1, 1);
+      _h_XXXX = bookProfile1D(1, 1, 1);
+      _h_YYYY = bookHisto1D(2, 1, 1);
+      _h_ZZZZ = bookCounter(3, 1, 1);
 
     }
 
@@ -222,8 +223,8 @@
     /// Normalise histograms etc., after the run
     void finalize() {
 
-      // scale(_h_YYYY, crossSection()/sumOfWeights()); // norm to cross section
-      // normalize(_h_YYYY); // normalize to unity
+      normalize(_h_YYYY); // normalize to unity
+      scale(_h_ZZZZ, crossSection()/picobarn/sumOfWeights()); // norm to cross section
 
     }
 
@@ -237,13 +238,13 @@
     //@{
     Profile1DPtr _h_XXXX;
     Histo1DPtr _h_YYYY;
+    CounterPtr _h_ZZZZ;
     //@}
 %(INLINEMETHODS)s
 
   };
 
 
-
   // The hook for the plugin system
   DECLARE_RIVET_PLUGIN(%(ANANAME)s);
 
@@ -297,8 +298,6 @@
 #Beams: <Insert beam pair(s), e.g. [p-, p+] or [[p-, e-], [p-, e+]]>
 #Energies: <Insert list of run energies or beam energy pairs in GeV,
 #           e.g. [1960] or [[8.0, 3.5]] or [630, 1800]. Order pairs to match "Beams">
-#PtCuts: <Insert list of kinematic pT cuts in GeV, e.g. [0, 20]>
-#NeedCrossSection: True


More information about the Rivet-svn mailing list