[Rivet-svn] r3432 - in branches/2011-07-aida2yoda: . include/Rivet include/Rivet/Projections include/Rivet/Tools src/Analyses src/Core src/Projections test

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Oct 11 01:16:41 BST 2011


Author: buckley
Date: Tue Oct 11 01:16:40 2011
New Revision: 3432

Log:
Reapply the PVertex removal and other cleanups (which were actually the ones causing trouble), and update several bits of the API to deal with the change of areaError -> areaErr in YODA.

Deleted:
   branches/2011-07-aida2yoda/include/Rivet/Projections/PVertex.hh
   branches/2011-07-aida2yoda/src/Projections/PVertex.cc
Modified:
   branches/2011-07-aida2yoda/ChangeLog
   branches/2011-07-aida2yoda/include/Rivet/AnalysisHandler.hh
   branches/2011-07-aida2yoda/include/Rivet/Makefile.am
   branches/2011-07-aida2yoda/include/Rivet/Rivet.hh
   branches/2011-07-aida2yoda/include/Rivet/Tools/Utils.hh
   branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_S9002537.cc
   branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_S9128077.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_1994_S2952106.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7541902.cc
   branches/2011-07-aida2yoda/src/Analyses/D0_2001_S4674421.cc
   branches/2011-07-aida2yoda/src/Analyses/MC_JetAnalysis.cc
   branches/2011-07-aida2yoda/src/Core/Analysis.cc
   branches/2011-07-aida2yoda/src/Projections/Makefile.am
   branches/2011-07-aida2yoda/test/testApi.cc

Modified: branches/2011-07-aida2yoda/ChangeLog
==============================================================================
--- branches/2011-07-aida2yoda/ChangeLog	Thu Oct  6 22:37:20 2011	(r3431)
+++ branches/2011-07-aida2yoda/ChangeLog	Tue Oct 11 01:16:40 2011	(r3432)
@@ -101,8 +101,10 @@
 
 2011-08-26  Andy Buckley  <andy at insectnation.org>
 
-	* Removing deprecated setBeams method from Analysis, and the
-	deprecated TotalVisibleMomentum projection.
+	* Removing deprecated features: the setBeams(...) method on
+	Analysis, the MaxRapidity constant, the split(...) function, the
+	default init() method from AnalysisHandler and its test, and the
+	deprecated TotalVisibleMomentum and PVertex projections.
 
 2011-08-23  Andy Buckley  <andy at insectnation.org>
 

Modified: branches/2011-07-aida2yoda/include/Rivet/AnalysisHandler.hh
==============================================================================
--- branches/2011-07-aida2yoda/include/Rivet/AnalysisHandler.hh	Thu Oct  6 22:37:20 2011	(r3431)
+++ branches/2011-07-aida2yoda/include/Rivet/AnalysisHandler.hh	Tue Oct 11 01:16:40 2011	(r3432)
@@ -152,10 +152,6 @@
     /// @name Main init/execute/finalise
     //@{
 
-    /// @deprecated Obsolete method, kept only for backwards compatibility
-    void init() {}
-
-
     /// Initialize a run, with the run beams taken from the example event.
     void init(const GenEvent& event);
 
@@ -171,9 +167,11 @@
 
     //@}
 
+
     /// Write all analyses' plots to the named file.
     void writeData(const std::string& filename);
 
+
   private:
 
     /// The collection of Analysis objects to be used.

Modified: branches/2011-07-aida2yoda/include/Rivet/Makefile.am
==============================================================================
--- branches/2011-07-aida2yoda/include/Rivet/Makefile.am	Thu Oct  6 22:37:20 2011	(r3431)
+++ branches/2011-07-aida2yoda/include/Rivet/Makefile.am	Tue Oct 11 01:16:40 2011	(r3432)
@@ -64,7 +64,6 @@
   Projections/Multiplicity.hh   \
   Projections/NeutralFinalState.hh \
   Projections/ParisiTensor.hh   \
-  Projections/PVertex.hh        \
   Projections/Sphericity.hh     \
   Projections/Spherocity.hh     \
   Projections/SVertex.hh	    \

Modified: branches/2011-07-aida2yoda/include/Rivet/Rivet.hh
==============================================================================
--- branches/2011-07-aida2yoda/include/Rivet/Rivet.hh	Thu Oct  6 22:37:20 2011	(r3431)
+++ branches/2011-07-aida2yoda/include/Rivet/Rivet.hh	Tue Oct 11 01:16:40 2011	(r3432)
@@ -22,8 +22,6 @@
 
   /// A sensible default maximum value of rapidity for Rivet analyses to use.
   static const double MAXRAPIDITY = 100000.0;
-  /// @deprecated
-  static const double MaxRapidity = 100000.0;
 
   /// A function to get the Rivet version string
   string version();

Modified: branches/2011-07-aida2yoda/include/Rivet/Tools/Utils.hh
==============================================================================
--- branches/2011-07-aida2yoda/include/Rivet/Tools/Utils.hh	Thu Oct  6 22:37:20 2011	(r3431)
+++ branches/2011-07-aida2yoda/include/Rivet/Tools/Utils.hh	Tue Oct 11 01:16:40 2011	(r3432)
@@ -74,10 +74,6 @@
     return dirs;
   }
 
-  /// @deprecated Use @c pathsplit instead.
-  inline vector<string> split(const string& path, const string& UNUSED(delim) = ":") {
-    return pathsplit(path);
-  }
 
   /// @brief Join several filesystem paths together with a delimiter character.
   /// Note that this does NOT join path elements together with a platform-portable

Modified: branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_S9002537.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_S9002537.cc	Thu Oct  6 22:37:20 2011	(r3431)
+++ branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_S9002537.cc	Tue Oct 11 01:16:40 2011	(r3432)
@@ -84,7 +84,7 @@
       for (int i=0; i<Nbins; i++) {
         double num   = _h_plus->bin(i).area() - _h_minus->bin(i).area();
         double denom = _h_plus->bin(i).area() + _h_minus->bin(i).area();
-        double err   = _h_plus->bin(i).areaError()  + _h_minus->bin(i).areaError();
+        double err   = _h_plus->bin(i).areaErr()  + _h_minus->bin(i).areaErr();
 
         double asym, asym_err;
         if (num==0 || denom==0) {

Modified: branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_S9128077.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_S9128077.cc	Thu Oct  6 22:37:20 2011	(r3431)
+++ branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_S9128077.cc	Tue Oct 11 01:16:40 2011	(r3432)
@@ -154,8 +154,8 @@
       for (int i = 0; i < Nbins-1; ++i) {
         if (_h_jet_multi_inclusive->bin(i).area() > 0.0 && _h_jet_multi_inclusive->bin(i+1).area() > 0.0) {
           ratio[i] = _h_jet_multi_inclusive->bin(i+1).area()/_h_jet_multi_inclusive->bin(i).area();
-          double relerr_i = _h_jet_multi_inclusive->bin(i).areaError()/_h_jet_multi_inclusive->bin(i).area();
-          double relerr_j = _h_jet_multi_inclusive->bin(i+1).areaError()/_h_jet_multi_inclusive->bin(i+1).area();
+          double relerr_i = _h_jet_multi_inclusive->bin(i).areaErr()/_h_jet_multi_inclusive->bin(i).area();
+          double relerr_j = _h_jet_multi_inclusive->bin(i+1).areaErr()/_h_jet_multi_inclusive->bin(i+1).area();
           err[i] = ratio[i] * (relerr_i + relerr_j);
         }
       }

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_1994_S2952106.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_1994_S2952106.cc	Thu Oct  6 22:37:20 2011	(r3431)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_1994_S2952106.cc	Tue Oct 11 01:16:40 2011	(r3432)
@@ -123,7 +123,7 @@
       vector<Point2D> points;
       for (size_t i = 0;  i < 40; ++i) {
         const double yval = _tmphistJet3eta->bin(i).area() * (eta3_CDF_sim[i]/eta3_Ideal_sim[i]);
-        const double yerr = _tmphistJet3eta->bin(i).areaError() * (eta3_CDF_sim_err[i]/eta3_Ideal_sim[i]);
+        const double yerr = _tmphistJet3eta->bin(i).areaErr() * (eta3_CDF_sim_err[i]/eta3_Ideal_sim[i]);
 	points.push_back(Point2D(0, yval/_sumw, 0, yerr/_sumw));
       }
       _histJet3eta->addPoints(points);
@@ -147,7 +147,7 @@
       points.clear();
       for (size_t i = 0;  i < 35; ++i) {
         const double yval = _tmphistR23->bin(i).area() * (R23_CDF_sim[i]/R23_Ideal_sim[i]);
-        const double yerr = _tmphistR23->bin(i).areaError() * (R23_CDF_sim_err[i]/R23_Ideal_sim[i]);
+        const double yerr = _tmphistR23->bin(i).areaErr() * (R23_CDF_sim_err[i]/R23_Ideal_sim[i]);
 	points.push_back(Point2D(0, yval/_sumw, 0, yerr/_sumw));
       }
       _histR23->addPoints(points);
@@ -171,8 +171,8 @@
       points.clear();
       for (size_t i = 0;  i < 40; ++i) {
         const double yval = _tmphistAlpha->bin(i).area() * (alpha_CDF_sim[i]/alpha_Ideal_sim[i]);
-        const double yerr = _tmphistAlpha->bin(i).areaError() * (alpha_CDF_sim_err[i]/alpha_Ideal_sim[i]);
-	points.push_back(Point2D(0, yval/_sumw, 0, yerr/_sumw));
+        const double yerr = _tmphistAlpha->bin(i).areaErr() * (alpha_CDF_sim_err[i]/alpha_Ideal_sim[i]);
+        points.push_back(Point2D(0, yval/_sumw, 0, yerr/_sumw));
       }
       _histAlpha->addPoints(points);
     }

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7541902.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7541902.cc	Thu Oct  6 22:37:20 2011	(r3431)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7541902.cc	Tue Oct 11 01:16:40 2011	(r3432)
@@ -129,10 +129,10 @@
       // if (_histJetMultNorm->bin(0).area() > 0.) ratio1to0 = _histJetMult[0]->bin(0).area()/_histJetMultNorm->bin(0).area();
       // // Get the fractional error on the ratio histogram
       // double frac_err1to0 = 0.;
-      // if (_histJetMult[0]->bin(0).area() > 0.)  frac_err1to0 = _histJetMult[0]->bin(0).areaError()/_histJetMult[0]->bin(0).area();
+      // if (_histJetMult[0]->bin(0).area() > 0.)  frac_err1to0 = _histJetMult[0]->bin(0).areaErr()/_histJetMult[0]->bin(0).area();
       // if (_histJetMultNorm->bin(0).area() > 0.) {
       //   frac_err1to0 *= frac_err1to0;
-      //   frac_err1to0 += pow(_histJetMultNorm->bin(0).areaError()/_histJetMultNorm->bin(0).area(),2.);
+      //   frac_err1to0 += pow(_histJetMultNorm->bin(0).areaErr()/_histJetMultNorm->bin(0).area(),2.);
       //   frac_err1to0 = sqrt(frac_err1to0);
       // }
 

Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2001_S4674421.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/D0_2001_S4674421.cc	Thu Oct  6 22:37:20 2011	(r3431)
+++ branches/2011-07-aida2yoda/src/Analyses/D0_2001_S4674421.cc	Tue Oct 11 01:16:40 2011	(r3432)
@@ -137,8 +137,8 @@
 	    double yval = scalefactor * _h_dsigdpt_w->bin(ibin).area() / _h_dsigdpt_z->bin(ibin).area();
             double dy2 = 0.;
             // binWidth(ibin) is needed because binHeight is actually sumofweights. It's AIDA. Don't ask.  :-((((
-            dy2 += pow(_h_dsigdpt_w->bin(ibin).areaError()/_h_dsigdpt_w->bin(ibin).height(),2);
-            dy2 += pow(_h_dsigdpt_z->bin(ibin).areaError()/_h_dsigdpt_z->bin(ibin).height(),2);
+            dy2 += pow(_h_dsigdpt_w->bin(ibin).areaErr()/_h_dsigdpt_w->bin(ibin).height(),2);
+            dy2 += pow(_h_dsigdpt_z->bin(ibin).areaErr()/_h_dsigdpt_z->bin(ibin).height(),2);
             double dy = scalefactor * _h_dsigdpt_w->bin(ibin).area()/_h_dsigdpt_z->bin(ibin).area() * sqrt(dy2);
 
 	    _h_dsigdpt_scaled_z->point(ibin) = Point2D(_h_dsigdpt_w->bin(ibin).midpoint(), yval,

Modified: branches/2011-07-aida2yoda/src/Analyses/MC_JetAnalysis.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/MC_JetAnalysis.cc	Thu Oct  6 22:37:20 2011	(r3431)
+++ branches/2011-07-aida2yoda/src/Analyses/MC_JetAnalysis.cc	Tue Oct 11 01:16:40 2011	(r3432)
@@ -235,8 +235,8 @@
     for (int i = 0; i < Nbins-1; ++i) {
       if (_h_jet_multi_inclusive->bin(i).area() > 0.0 && _h_jet_multi_inclusive->bin(i+1).area() > 0.0) {
         double ratio = _h_jet_multi_inclusive->bin(i+1).area()/_h_jet_multi_inclusive->bin(i).area();
-        double relerr_i = _h_jet_multi_inclusive->bin(i).areaError()/_h_jet_multi_inclusive->bin(i).area();
-        double relerr_j = _h_jet_multi_inclusive->bin(i+1).areaError()/_h_jet_multi_inclusive->bin(i+1).area();
+        double relerr_i = _h_jet_multi_inclusive->bin(i).areaErr()/_h_jet_multi_inclusive->bin(i).area();
+        double relerr_j = _h_jet_multi_inclusive->bin(i+1).areaErr()/_h_jet_multi_inclusive->bin(i+1).area();
         double err = ratio * (relerr_i + relerr_j);
 
 	Point2D & pt = _h_jet_multi_ratio->point(i);

Modified: branches/2011-07-aida2yoda/src/Core/Analysis.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Core/Analysis.cc	Thu Oct  6 22:37:20 2011	(r3431)
+++ branches/2011-07-aida2yoda/src/Core/Analysis.cc	Tue Oct 11 01:16:40 2011	(r3432)
@@ -436,7 +436,7 @@
       y.push_back(histo->bin(i).height()*scale);
 
       // We'd like to do this: ey.push_back(histo->binError(i) * scale);
-      ey.push_back(histo->bin(i).heightError()*scale);
+      ey.push_back(histo->bin(i).heightErr()*scale);
     }
 
     string title = histo->title();

Modified: branches/2011-07-aida2yoda/src/Projections/Makefile.am
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/Makefile.am	Thu Oct  6 22:37:20 2011	(r3431)
+++ branches/2011-07-aida2yoda/src/Projections/Makefile.am	Tue Oct 11 01:16:40 2011	(r3432)
@@ -28,7 +28,6 @@
   Multiplicity.cc \
   NeutralFinalState.cc \
   ParisiTensor.cc \
-  PVertex.cc \
   Sphericity.cc \
   Spherocity.cc \
   SVertex.cc \

Modified: branches/2011-07-aida2yoda/test/testApi.cc
==============================================================================
--- branches/2011-07-aida2yoda/test/testApi.cc	Thu Oct  6 22:37:20 2011	(r3431)
+++ branches/2011-07-aida2yoda/test/testApi.cc	Tue Oct 11 01:16:40 2011	(r3432)
@@ -16,9 +16,6 @@
   vector<string> moreanalyses(1, "MC_JETS");
   rivet.addAnalyses(moreanalyses);
 
-  // Initialise: obsolete, but allowed for compatibility
-  rivet.init();
-
   std::istream* file = new std::fstream("testApi.hepmc", std::ios::in);
   HepMC::IO_GenEvent hepmcio(*file);
   HepMC::GenEvent* evt = hepmcio.read_next_event();


More information about the Rivet-svn mailing list