[Rivet-svn] r4180 - in trunk: include/Rivet src/Analyses src/Core

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Mon Mar 4 12:24:55 GMT 2013


Author: buckley
Date: Mon Mar  4 12:24:54 2013
New Revision: 4180

Log:
Renaming the user-exposed Analysis::referenceData() method to the slightly neater to say/type refData()

Modified:
   trunk/include/Rivet/Analysis.hh
   trunk/src/Analyses/ATLAS_2010_S8894728.cc
   trunk/src/Analyses/ATLAS_2011_S8994773.cc
   trunk/src/Analyses/CDF_1994_S2952106.cc
   trunk/src/Analyses/CMS_2012_I1102908.cc
   trunk/src/Core/Analysis.cc

Modified: trunk/include/Rivet/Analysis.hh
==============================================================================
--- trunk/include/Rivet/Analysis.hh	Thu Feb 28 10:42:09 2013	(r4179)
+++ trunk/include/Rivet/Analysis.hh	Mon Mar  4 12:24:54 2013	(r4180)
@@ -376,11 +376,11 @@
     //@{
 
     /// Get reference data for a named histo
-    const YODA::Scatter2D & referenceData(const string& hname) const;
+    const YODA::Scatter2D & refData(const string& hname) const;
 
     /// Get reference data for a numbered histo
-    const YODA::Scatter2D & referenceData(size_t datasetId,
-                                          size_t xAxisId, size_t yAxisId) const;
+    const YODA::Scatter2D & refData(size_t datasetId,
+                                    size_t xAxisId, size_t yAxisId) const;
 
     /// Book a 1D histogram with @a nbins uniformly distributed across the range @a lower - @a upper .
     /// (NB. this returns a pointer rather than a reference since it will

Modified: trunk/src/Analyses/ATLAS_2010_S8894728.cc
==============================================================================
--- trunk/src/Analyses/ATLAS_2010_S8894728.cc	Thu Feb 28 10:42:09 2013	(r4179)
+++ trunk/src/Analyses/ATLAS_2010_S8894728.cc	Mon Mar  4 12:24:54 2013	(r4180)
@@ -40,8 +40,8 @@
       // Standard deviation profiles
       // First the higher moments of main profiles to calculate variance and error on variance...
       for (size_t i = 1; i < 4; ++i) {
-        _hist_nch_transverse_500[i].reset(new Profile1D(referenceData(1+isqrts, 1, 1)));
-        _hist_ptsum_transverse_500[i].reset(new Profile1D(referenceData(3+isqrts, 1, 1)));
+        _hist_nch_transverse_500[i].reset(new Profile1D(refData(1+isqrts, 1, 1)));
+        _hist_ptsum_transverse_500[i].reset(new Profile1D(refData(3+isqrts, 1, 1)));
       }
       // Then the data point sets into which the results will be inserted
       _dps_sdnch_transverse_500   = bookScatter2D(5+isqrts, 1, 1);
@@ -118,8 +118,8 @@
       vector<double> num500(3, 0), ptSum500(3, 0.0);
       // Temporary histos that bin Nch and pT in dPhi.
       // NB. Only one of each needed since binnings are the same for the energies and pT cuts
-      Histo1D hist_num_dphi_500(referenceData(13,1,1));
-      Histo1D hist_pt_dphi_500(referenceData(15,1,1));
+      Histo1D hist_num_dphi_500(refData(13,1,1));
+      Histo1D hist_pt_dphi_500(refData(15,1,1));
       foreach (const Particle& p, particles500) {
         const double pT = p.momentum().pT();
         const double dPhi = deltaPhi(philead, p.momentum().phi());
@@ -182,7 +182,7 @@
       // Note that we fill dN/dEtadPhi: dEta = 2*2.5, dPhi = 2*PI/nBins
       // The values tabulated in the note are for an (undefined) signed Delta(phi) rather than
       // |Delta(phi)| and so differ by a factor of 2: we have to actually norm for angular range = 2pi
-      const size_t nbins = referenceData(13,1,1).numPoints();
+      const size_t nbins = refData(13,1,1).numPoints();
       std::vector<double> ptcut;
       if (fuzzyEquals(sqrtS(), 900*GeV)) {
         ptcut += 1.0; ptcut += 1.5; ptcut += 2.0; ptcut += 2.5;

Modified: trunk/src/Analyses/ATLAS_2011_S8994773.cc
==============================================================================
--- trunk/src/Analyses/ATLAS_2011_S8994773.cc	Thu Feb 28 10:42:09 2013	(r4179)
+++ trunk/src/Analyses/ATLAS_2011_S8994773.cc	Mon Mar  4 12:24:54 2013	(r4180)
@@ -62,7 +62,7 @@
       vector<double> num500(3, 0), ptSum500(3, 0.0);
       // Temporary histos that bin N in dPhi.
       // NB. Only one of each needed since binnings are the same for the energies and pT cuts
-      Histo1D hist_num_dphi_500(referenceData(13+isqrts,1,1));
+      Histo1D hist_num_dphi_500(refData(13+isqrts,1,1));
       foreach (const Particle& p, particles500) {
         const double pT = p.momentum().pT();
         const double dPhi = deltaPhi(philead, p.momentum().phi());
@@ -88,7 +88,7 @@
       // Note that we fill dN/dEtadPhi: dEta = 2*2.5, dPhi = 2*PI/nBins
       // The values tabulated in the note are for an (undefined) signed Delta(phi) rather than
       // |Delta(phi)| and so differ by a factor of 2: we have to actually norm for angular range = 2pi
-      const size_t nbins = referenceData(13+isqrts,1,1).numPoints();
+      const size_t nbins = refData(13+isqrts,1,1).numPoints();
       for (size_t i = 0; i < nbins; ++i) {
         double mean = hist_num_dphi_500.bin(i).midpoint();
         double value = 0.;

Modified: trunk/src/Analyses/CDF_1994_S2952106.cc
==============================================================================
--- trunk/src/Analyses/CDF_1994_S2952106.cc	Thu Feb 28 10:42:09 2013	(r4179)
+++ trunk/src/Analyses/CDF_1994_S2952106.cc	Mon Mar  4 12:24:54 2013	(r4180)
@@ -41,9 +41,9 @@
       _histAlpha   = bookScatter2D(5,1,1);
 
       // Temporary histos: these are the ones we actually fill for the plots which require correction
-      _tmphistJet3eta.reset(new Histo1D(referenceData(3,1,1)));
-      _tmphistR23.reset(    new Histo1D(referenceData(4,1,1)));
-      _tmphistAlpha.reset(  new Histo1D(referenceData(5,1,1)));
+      _tmphistJet3eta.reset(new Histo1D(refData(3,1,1)));
+      _tmphistR23.reset(    new Histo1D(refData(4,1,1)));
+      _tmphistAlpha.reset(  new Histo1D(refData(5,1,1)));
     }
 
 

Modified: trunk/src/Analyses/CMS_2012_I1102908.cc
==============================================================================
--- trunk/src/Analyses/CMS_2012_I1102908.cc	Thu Feb 28 10:42:09 2013	(r4179)
+++ trunk/src/Analyses/CMS_2012_I1102908.cc	Mon Mar  4 12:24:54 2013	(r4180)
@@ -33,9 +33,9 @@
     _h_MN_dijet_ratio = bookScatter2D(2, 1, 1);
 
     // Temporary histograms (directly instantiated)
-    _h_DeltaY_exclusive = Histo1D(referenceData(1, 1, 1));
-    _h_DeltaY_inclusive = Histo1D(referenceData(1, 1, 1));
-    _h_DeltaY_MN = Histo1D(referenceData(1, 1, 1));
+    _h_DeltaY_exclusive = Histo1D(refData(1, 1, 1));
+    _h_DeltaY_inclusive = Histo1D(refData(1, 1, 1));
+    _h_DeltaY_MN = Histo1D(refData(1, 1, 1));
   }
 
 

Modified: trunk/src/Core/Analysis.cc
==============================================================================
--- trunk/src/Core/Analysis.cc	Thu Feb 28 10:42:09 2013	(r4179)
+++ trunk/src/Core/Analysis.cc	Mon Mar  4 12:24:54 2013	(r4180)
@@ -170,7 +170,7 @@
   }
 
 
-  const Scatter2D & Analysis::referenceData(const string& hname) const {
+  const Scatter2D & Analysis::refData(const string& hname) const {
     _cacheRefData();
     MSG_TRACE("Using histo bin edges for " << name() << ":" << hname);
     if (!_refdata[hname]) {
@@ -180,9 +180,9 @@
   }
 
 
-  const Scatter2D & Analysis::referenceData(size_t datasetId, size_t xAxisId, size_t yAxisId) const {
+  const Scatter2D & Analysis::refData(size_t datasetId, size_t xAxisId, size_t yAxisId) const {
     const string hname = makeAxisCode(datasetId, xAxisId, yAxisId);
-    return referenceData(hname);
+    return refData(hname);
   }
 
 
@@ -198,7 +198,7 @@
   Histo1DPtr Analysis::bookHisto1D(const string& hname, const string& title,
                                    const string& xtitle, const string& ytitle)
   {
-    const Scatter2D & refdata = referenceData(hname);
+    const Scatter2D & refdata = refData(hname);
     const string path = histoPath(hname);
     Histo1DPtr hist( new Histo1D(refdata, path) );
     addPlot(hist);
@@ -289,7 +289,7 @@
   Profile1DPtr Analysis::bookProfile1D(const string& hname, const string& title,
                                        const string& xtitle, const string& ytitle)
   {
-    const Scatter2D & refdata = referenceData(hname);
+    const Scatter2D & refdata = refData(hname);
     const string path = histoPath(hname);
     Profile1DPtr prof( new Profile1D(refdata, path) );
     addPlot(prof);


More information about the Rivet-svn mailing list