[Rivet-svn] r3211 - in branches/2011-07-aida2yoda: include/Rivet src/Analyses

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Jul 19 16:33:02 BST 2011


Author: dgrell
Date: Tue Jul 19 16:33:02 2011
New Revision: 3211

Log:
last scatter2D conversion

Modified:
   branches/2011-07-aida2yoda/include/Rivet/AnalysisHandler.hh
   branches/2011-07-aida2yoda/src/Analyses/ALEPH_2004_S5765862.cc
   branches/2011-07-aida2yoda/src/Analyses/ATLAS_2010_S8894728.cc
   branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_S9002537.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_1994_S2952106.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_1996_S3418421.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_2005_S6217184.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7541902.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7782535.cc
   branches/2011-07-aida2yoda/src/Analyses/D0_2001_S4674421.cc
   branches/2011-07-aida2yoda/src/Analyses/H1_1995_S3167097.cc
   branches/2011-07-aida2yoda/src/Analyses/JADE_OPAL_2000_S4300807.cc
   branches/2011-07-aida2yoda/src/Analyses/MC_XS.cc
   branches/2011-07-aida2yoda/src/Analyses/OPAL_1993_S2692198.cc
   branches/2011-07-aida2yoda/src/Analyses/STAR_2006_S6860818.cc
   branches/2011-07-aida2yoda/src/Analyses/UA5_1988_S1867512.cc

Modified: branches/2011-07-aida2yoda/include/Rivet/AnalysisHandler.hh
==============================================================================
--- branches/2011-07-aida2yoda/include/Rivet/AnalysisHandler.hh	Tue Jul 19 16:26:29 2011	(r3210)
+++ branches/2011-07-aida2yoda/include/Rivet/AnalysisHandler.hh	Tue Jul 19 16:33:02 2011	(r3211)
@@ -162,10 +162,8 @@
     void analyze(const GenEvent& event);
 
 
-    /// Finalize a run. This function first calls the AnalysisBase::finalize()
-    /// functions of all included analysis objects and converts all histograms
-    /// to AIDA DataPointSet objects in the AIDA tree. Using the histogram tree
-    /// for further analysis or writing to file is left to the API user.
+    /// Finalize a run. This function calls the AnalysisBase::finalize()
+    /// functions of all included analysis objects.
     void finalize();
 
     //@}

Modified: branches/2011-07-aida2yoda/src/Analyses/ALEPH_2004_S5765862.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/ALEPH_2004_S5765862.cc	Tue Jul 19 16:26:29 2011	(r3210)
+++ branches/2011-07-aida2yoda/src/Analyses/ALEPH_2004_S5765862.cc	Tue Jul 19 16:33:02 2011	(r3211)
@@ -270,7 +270,7 @@
       }
 
       const double avgNumParts = _weightedTotalChargedPartNum / sumOfWeights();
-      AIDA::IDataPointSet * mult = bookScatter2D(1, 1, 1);
+      Scatter2DPtr  mult = bookScatter2D(1, 1, 1);
       for (int i = 0; i < mult->size(); ++i) {
         if (fuzzyEquals(sqrtS(), mult->point(i)->coordinate(0)->value(), 0.01)) {
           mult->point(i)->coordinate(1)->setValue(avgNumParts);
@@ -313,7 +313,7 @@
     Histo1DPtr _h_oblateness;
     Histo1DPtr _h_sphericity;
 
-    AIDA::IDataPointSet *_h_R_Durham[6];
+    Scatter2DPtr _h_R_Durham[6];
     Histo1DPtr _h_y_Durham[5];
 
     double _weightedTotalChargedPartNum;

Modified: branches/2011-07-aida2yoda/src/Analyses/ATLAS_2010_S8894728.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/ATLAS_2010_S8894728.cc	Tue Jul 19 16:26:29 2011	(r3210)
+++ branches/2011-07-aida2yoda/src/Analyses/ATLAS_2010_S8894728.cc	Tue Jul 19 16:33:02 2011	(r3211)
@@ -11,7 +11,7 @@
 
   namespace {
 
-    inline void _moments_to_stddev(Profile1DPtr moment_profiles[], AIDA::IDataPointSet* target_dps) {
+    inline void _moments_to_stddev(Profile1DPtr moment_profiles[], Scatter2DPtr target_dps) {
       for (int b = 0; b < target_dps->size(); ++b) { // loop over bins
         /// @todo Assuming unit weights here! Should use N_effective = sumW**2/sumW2? How?
         const double numentries = moment_profiles[0]->binEntries(b);
@@ -294,8 +294,8 @@
     Profile1DPtr _hist_ptsum_toward_500;
     Profile1DPtr _hist_ptsum_away_500;
 
-    AIDA::IDataPointSet*  _dps_sdnch_transverse_500;
-    AIDA::IDataPointSet*  _dps_sdptsum_transverse_500;
+    Scatter2DPtr  _dps_sdnch_transverse_500;
+    Scatter2DPtr  _dps_sdptsum_transverse_500;
 
     Profile1DPtr _hist_ptavg_transverse_500;
     Profile1DPtr _hist_ptavg_toward_500;

Modified: branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_S9002537.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_S9002537.cc	Tue Jul 19 16:26:29 2011	(r3210)
+++ branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_S9002537.cc	Tue Jul 19 16:33:02 2011	(r3211)
@@ -100,7 +100,7 @@
 
   private:
     AIDA::IHistogram1D  *_h_plus, *_h_minus;
-    AIDA::IDataPointSet *_h_asym;
+    Scatter2DPtr _h_asym;
 
   };
 

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_1994_S2952106.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_1994_S2952106.cc	Tue Jul 19 16:26:29 2011	(r3210)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_1994_S2952106.cc	Tue Jul 19 16:33:02 2011	(r3211)
@@ -202,10 +202,10 @@
     Histo1DPtr _histJet1Et, _histJet2Et;
 
     /// Output histos which need to have correction factors applied
-    AIDA::IDataPointSet *_histR23, *_histJet3eta, *_histAlpha;
+    Scatter2DPtr _histR23, _histJet3eta, _histAlpha;
 
     /// Temporary histos, to be converted to DPSes
-    shared_ptr<LWH::IHistogram1D> _tmphistR23, _tmphistJet3eta, _tmphistAlpha;
+    Histo1DPtr _tmphistR23, _tmphistJet3eta, _tmphistAlpha;
 
     //@}
 

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_1996_S3418421.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_1996_S3418421.cc	Tue Jul 19 16:26:29 2011	(r3210)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_1996_S3418421.cc	Tue Jul 19 16:33:02 2011	(r3211)
@@ -113,7 +113,7 @@
     /// @name Histograms
     //@{
     BinnedHistogram<double> _h_chi;
-    AIDA::IDataPointSet* _h_ratio;
+    Scatter2DPtr _h_ratio;
     //@}
 
   };

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2005_S6217184.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_2005_S6217184.cc	Tue Jul 19 16:26:29 2011	(r3210)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_2005_S6217184.cc	Tue Jul 19 16:33:02 2011	(r3211)
@@ -126,7 +126,7 @@
     //@{
     Profile1DPtr _profhistRho_pT[18];
     Profile1DPtr _profhistPsi_pT[18];
-    AIDA::IDataPointSet* _profhistPsi_vs_pT;
+    Scatter2DPtr _profhistPsi_vs_pT;
     //@}
 
   };

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7541902.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7541902.cc	Tue Jul 19 16:26:29 2011	(r3210)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7541902.cc	Tue Jul 19 16:33:02 2011	(r3211)
@@ -195,7 +195,7 @@
     //@{
     Histo1DPtr _histJetEt[4];
     Histo1DPtr _histJetMultNorm;
-    AIDA::IDataPointSet* _histJetMultRatio[4];
+    Scatter2DPtr _histJetMultRatio[4];
     Histo1DPtr _histJetMult[4];
     //@}
 

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7782535.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7782535.cc	Tue Jul 19 16:26:29 2011	(r3210)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7782535.cc	Tue Jul 19 16:33:02 2011	(r3211)
@@ -128,7 +128,7 @@
     /// @name Histograms
     //@{
     Profile1DPtr _h_Psi_pT[4];
-    AIDA::IDataPointSet* _h_OneMinusPsi_vs_pT;
+    Scatter2DPtr _h_OneMinusPsi_vs_pT;
     //@}
 
   };

Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2001_S4674421.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/D0_2001_S4674421.cc	Tue Jul 19 16:26:29 2011	(r3210)
+++ branches/2011-07-aida2yoda/src/Analyses/D0_2001_S4674421.cc	Tue Jul 19 16:33:02 2011	(r3211)
@@ -178,7 +178,7 @@
     /// Histograms
     Histo1DPtr  _h_dsigdpt_w;
     Histo1DPtr  _h_dsigdpt_z;
-    AIDA::IDataPointSet* _h_dsigdpt_scaled_z;
+    Scatter2DPtr _h_dsigdpt_scaled_z;
     //@}
 
   };

Modified: branches/2011-07-aida2yoda/src/Analyses/H1_1995_S3167097.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/H1_1995_S3167097.cc	Tue Jul 19 16:26:29 2011	(r3210)
+++ branches/2011-07-aida2yoda/src/Analyses/H1_1995_S3167097.cc	Tue Jul 19 16:33:02 2011	(r3211)
@@ -105,7 +105,7 @@
       }
 
       /// @todo Automate this sort of thing so that the analysis code is more readable.
-      AIDA::IDataPointSet* h = 0;
+      Scatter2DPtr h = 0;
       h = histogramFactory().divide("/H1_1995_S3167097/21", *_hAvEt, *_hN);
       h->setTitle(_hAvEt->title());
       histogramFactory().destroy(_hAvEt);

Modified: branches/2011-07-aida2yoda/src/Analyses/JADE_OPAL_2000_S4300807.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/JADE_OPAL_2000_S4300807.cc	Tue Jul 19 16:26:29 2011	(r3210)
+++ branches/2011-07-aida2yoda/src/Analyses/JADE_OPAL_2000_S4300807.cc	Tue Jul 19 16:33:02 2011	(r3211)
@@ -181,8 +181,8 @@
 
     /// @name Histograms
     //@{
-    AIDA::IDataPointSet *_h_R_Jade[5];
-    AIDA::IDataPointSet *_h_R_Durham[5];
+    Scatter2DPtr _h_R_Jade[5];
+    Scatter2DPtr _h_R_Durham[5];
     Histo1DPtr _h_y_Durham[4];
     //@}
 

Modified: branches/2011-07-aida2yoda/src/Analyses/MC_XS.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/MC_XS.cc	Tue Jul 19 16:26:29 2011	(r3210)
+++ branches/2011-07-aida2yoda/src/Analyses/MC_XS.cc	Tue Jul 19 16:33:02 2011	(r3211)
@@ -64,7 +64,7 @@
 
     /// @name Histograms
     //@{
-    AIDA::IDataPointSet * _h_XS;
+    Scatter2DPtr  _h_XS;
     double _mc_xs, _mc_error;
     //@}
 

Modified: branches/2011-07-aida2yoda/src/Analyses/OPAL_1993_S2692198.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/OPAL_1993_S2692198.cc	Tue Jul 19 16:26:29 2011	(r3210)
+++ branches/2011-07-aida2yoda/src/Analyses/OPAL_1993_S2692198.cc	Tue Jul 19 16:33:02 2011	(r3211)
@@ -164,29 +164,28 @@
     /// Finalize
     void finalize() {
       const double fact = 1000./sumOfWeights();
-      normaliseDataPointSet(_nPhotonJade      ,fact);
-      normaliseDataPointSet(_nPhotonDurham    ,fact);
+      normaliseScatter2D(_nPhotonJade      ,fact);
+      normaliseScatter2D(_nPhotonDurham    ,fact);
       for(unsigned int ix=0;ix<4;++ix) {
-	normaliseDataPointSet(_nPhotonJetJade  [ix],fact);
-	normaliseDataPointSet(_nPhotonJetDurham[ix],fact);
+	normaliseScatter2D(_nPhotonJetJade  [ix],fact);
+	normaliseScatter2D(_nPhotonJetDurham[ix],fact);
       }
     }
 
     // normalise a data point set, default function does both x and y AHHH
-    void normaliseDataPointSet(AIDA::IDataPointSet * points, const double & fact) {
-      for (int i = 0; i < points->size(); ++i) {
-	points->point(i)->coordinate(1)->
-	  setValue(points->point(i)->coordinate(1)->value()*fact);
+    void normaliseScatter2D(Scatter2DPtr points, double fact) {
+      for (size_t i = 0; i < points->numPoints(); ++i) {
+	points->point(i).setY(points->point(i).y()*fact);
       }
     }
     //@}
 
   private:
 
-    AIDA::IDataPointSet *_nPhotonJade;
-    AIDA::IDataPointSet *_nPhotonDurham;
-    AIDA::IDataPointSet *_nPhotonJetJade  [4];
-    AIDA::IDataPointSet *_nPhotonJetDurham[4];
+    Scatter2DPtr _nPhotonJade;
+    Scatter2DPtr _nPhotonDurham;
+    Scatter2DPtr _nPhotonJetJade  [4];
+    Scatter2DPtr _nPhotonJetDurham[4];
 
   };
 

Modified: branches/2011-07-aida2yoda/src/Analyses/STAR_2006_S6860818.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/STAR_2006_S6860818.cc	Tue Jul 19 16:26:29 2011	(r3210)
+++ branches/2011-07-aida2yoda/src/Analyses/STAR_2006_S6860818.cc	Tue Jul 19 16:33:02 2011	(r3211)
@@ -196,7 +196,7 @@
     Histo1DPtr _h_pT_ximinus;
     Histo1DPtr _h_pT_xiplus;
     //Histo1DPtr _h_pT_omega;
-    AIDA::IDataPointSet* _h_antibaryon_baryon_ratio;
+    Scatter2DPtr _h_antibaryon_baryon_ratio;
     Profile1DPtr   _h_pT_vs_mass;
   };
 

Modified: branches/2011-07-aida2yoda/src/Analyses/UA5_1988_S1867512.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/UA5_1988_S1867512.cc	Tue Jul 19 16:26:29 2011	(r3210)
+++ branches/2011-07-aida2yoda/src/Analyses/UA5_1988_S1867512.cc	Tue Jul 19 16:33:02 2011	(r3211)
@@ -51,7 +51,7 @@
       addProjection(ChargedFinalState(-4.0, -3.0), "CFS40B");
 
       // Histogram booking, we have sqrt(s) = 200, 546 and 900 GeV
-      // TODO use DataPointSet to be able to output errors
+      // TODO use Scatter2D to be able to output errors
       if (fuzzyEquals(sqrtS()/GeV, 200.0, 1E-4)) {
         _hist_correl = bookScatter2D(2, 1, 1);
         _hist_correl_asym = bookScatter2D(3, 1, 1);
@@ -104,7 +104,7 @@
       //      the eta-intervals
       //
       
-      // Define vectors to be able to fill DataPointSets
+      // Define vectors to be able to fill Scatter2Ds
 
       vector<double> xvals;
       vector<double> xerrs;
@@ -216,9 +216,9 @@
     /// @name Histograms
     //@{
     // Symmetric eta intervals
-    AIDA::IDataPointSet *_hist_correl;
+    Scatter2DPtr _hist_correl;
     // For asymmetric eta intervals
-    AIDA::IDataPointSet *_hist_correl_asym;
+    Scatter2DPtr _hist_correl_asym;
     //@}
 
   };


More information about the Rivet-svn mailing list