[Rivet-svn] r4051 - in trunk: . data/anainfo data/plotinfo data/refdata src/Analyses

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Nov 27 23:41:52 GMT 2012


Author: buckley
Date: Tue Nov 27 23:41:51 2012
New Revision: 4051

Log:
Adding CMS_2012_I1102908 analysis and converting it to use YODA.

Added:
   trunk/data/anainfo/CMS_2012_I1102908.info
      - copied unchanged from r4015, branches/2012-06-aidarivet/data/anainfo/CMS_2012_I1102908.info
   trunk/data/plotinfo/CMS_2012_I1102908.plot
      - copied unchanged from r4015, branches/2012-06-aidarivet/data/plotinfo/CMS_2012_I1102908.plot
   trunk/data/refdata/CMS_2012_I1102908.aida
      - copied unchanged from r4015, branches/2012-06-aidarivet/data/refdata/CMS_2012_I1102908.aida
   trunk/src/Analyses/CMS_2012_I1102908.cc
      - copied, changed from r4015, branches/2012-06-aidarivet/src/Analyses/CMS_2012_I1102908.cc
Modified:
   trunk/ChangeLog
   trunk/data/anainfo/Makefile.am
   trunk/data/plotinfo/Makefile.am
   trunk/data/refdata/Makefile.am
   trunk/src/Analyses/Makefile.am

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	Tue Nov 27 23:40:08 2012	(r4050)
+++ trunk/ChangeLog	Tue Nov 27 23:41:51 2012	(r4051)
@@ -1,5 +1,7 @@
 2012-11-27  Andy Buckley  <andy.buckley at cern.ch>
 
+	* Converting CMS_2012_I1102908 analysis to use YODA.
+
 	* Adding XLabel and YLabel setting in histo/profile/scatter booking.
 
 2012-11-14  Hendrik Hoeth <hendrik.hoeth at cern.ch>

Copied: trunk/data/anainfo/CMS_2012_I1102908.info (from r4015, branches/2012-06-aidarivet/data/anainfo/CMS_2012_I1102908.info)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/data/anainfo/CMS_2012_I1102908.info	Tue Nov 27 23:41:51 2012	(r4051, copy of r4015, branches/2012-06-aidarivet/data/anainfo/CMS_2012_I1102908.info)
@@ -0,0 +1,57 @@
+Name: CMS_2012_I1102908
+Year: 2012
+Summary: Measurement of inclusive and exclusive dijet production
+   ratio at large rapidity intervals at center-of-mass energy 7 TeV.
+Experiment: CMS
+Collider: LHC
+NeedCrossSection: no
+InspireID: 1102908
+Status: VALIDATED
+Authors:
+ - Grzegorz Brona
+ - Vladimir Gavrilov
+ - Hannes Jung
+ - Victor Kim
+ - Victor Murzin
+ - Vadim Oreshkin
+ - Grigory Pivovarov
+ - Ivan Pozdnyakov
+ - Grigory Safronov
+References:
+ - CMS-FWD-10-014
+ - CERN-PH-EP-2012-088 
+ - arXiv:1204.0696 [hep-ex]
+ - Submitted to the EPJ C 
+RunInfo:
+   Inclusive QCD at 7TeV comEnergy, ptHat (or equivalent) greater than 15 GeV
+NumEvents: 500M with ptHat > 15
+Beams: [p+, p+]
+Energies: [[3500, 3500]]
+PtCuts: [15]
+Description:
+   This is a measurement of the ratio of inclusive to exclusive
+   dijet production as a function of the absolute distance in
+   rapidity, $\Delta y$, between jets. The ratio of the
+   Mueller-Navelet to exclusive dijet production is also
+   measured.  These measurements were performed with the CMS
+   detector in proton-proton collisions at $\sqrt s = 7$ TeV for
+   jets with $p_T > 35$ GeV and $|y| < 4.7$ taken from a mixture
+   of two data samples, one of which containing dijets with
+   moderate rapidity separation and the other containing dijets
+   with large rapidity separation, with integrated luminosity of
+   33/nb and 5/pb respectively. The measured observables are
+   corrected for detector effects.
+BibKey: Chatrchyan:2012pb
+BibTeX: '@article{Chatrchyan:2012pb,
+      author         = "Chatrchyan, Serguei and others",
+      title          = "{Ratios of dijet production cross sections as a function
+                        of the absolute difference in rapidity between jets in
+                        proton-proton collisions at sqrt(s) = 7 TeV}",
+      collaboration  = "CMS Collaboration",
+      year           = "2012",
+      eprint         = "1204.0696",
+      archivePrefix  = "arXiv",
+      primaryClass   = "hep-ex",
+      reportNumber   = "CMS-FWD-10-014, CERN-PH-EP-2012-088",
+      SLACcitation   = "%%CITATION = ARXIV:1204.0696;%%",}'
+

Modified: trunk/data/anainfo/Makefile.am
==============================================================================
--- trunk/data/anainfo/Makefile.am	Tue Nov 27 23:40:08 2012	(r4050)
+++ trunk/data/anainfo/Makefile.am	Tue Nov 27 23:41:51 2012	(r4051)
@@ -125,6 +125,7 @@
   CMS_2011_S9088458.info \
   CMS_2011_S9120041.info \
   CMS_2012_I1087342.info \
+  CMS_2012_I1102908.info \
   CMS_2012_I1107658.info \
   CMS_QCD_10_024.info \
   D0_1996_S3214044.info \

Copied: trunk/data/plotinfo/CMS_2012_I1102908.plot (from r4015, branches/2012-06-aidarivet/data/plotinfo/CMS_2012_I1102908.plot)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/data/plotinfo/CMS_2012_I1102908.plot	Tue Nov 27 23:41:51 2012	(r4051, copy of r4015, branches/2012-06-aidarivet/data/plotinfo/CMS_2012_I1102908.plot)
@@ -0,0 +1,19 @@
+# BEGIN PLOT /CMS_2012_I1102908/d01-x01-y01
+Title=Inclusive to exclusive dijet production ratio
+XLabel=$\Delta y$
+YLabel=$\frac{\mathrm{d} \sigma^\text{inc}} {\mathrm{d} y}  /  \frac{\mathrm{d} \sigma^\text{exc}}{\mathrm{d} y}$
+LegendXPos=0.7
+LegendYPos=0.2
+FullRange=1
+LogY=0
+# END PLOT
+
+# BEGIN PLOT /CMS_2012_I1102908/d02-x01-y01
+Title=Mueller-Navelet to exclusive dijet production ratio
+XLabel=$\Delta y$
+YLabel=$\frac{\mathrm{d} \sigma^\text{MN}}{\mathrm{d} y} / \frac{\mathrm{d} \sigma^\text{exc}}{\mathrm{d} y}$
+LegendXPos=0.7
+LegendYPos=0.2
+FullRange=1
+LogY=0
+# END PLOT

Modified: trunk/data/plotinfo/Makefile.am
==============================================================================
--- trunk/data/plotinfo/Makefile.am	Tue Nov 27 23:40:08 2012	(r4050)
+++ trunk/data/plotinfo/Makefile.am	Tue Nov 27 23:41:51 2012	(r4051)
@@ -122,6 +122,7 @@
   CMS_2011_S9120041.plot \
   CMS_2011_S9215166.plot \
   CMS_2012_I1087342.plot \
+  CMS_2012_I1102908.plot \
   CMS_2012_I1107658.plot \
   CMS_QCD_10_024.plot \
   D0_1996_S3214044.plot \

Copied: trunk/data/refdata/CMS_2012_I1102908.aida (from r4015, branches/2012-06-aidarivet/data/refdata/CMS_2012_I1102908.aida)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/data/refdata/CMS_2012_I1102908.aida	Tue Nov 27 23:41:51 2012	(r4051, copy of r4015, branches/2012-06-aidarivet/data/refdata/CMS_2012_I1102908.aida)
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE aida SYSTEM "http://aida.freehep.org/schemas/3.3/aida.dtd">
+<aida version="3.3">
+  <implementation version="1.1" package="FreeHEP"/>
+  <dataPointSet name="d01-x01-y01" dimension="2"
+      path="/REF/CMS_2012_I1102908" title="inclusive-to-exclusive-dijets-ratio">
+    <annotation>
+      <item key="Title" value="" sticky="true"/>
+      <item key="AidaPath" value="/REF/d01-x01-y01" sticky="true"/>
+    </annotation>
+    <dataPoint>
+      <measurement errorPlus="5.000000e-01" value="5.000000e-01" errorMinus="5.000000e-01"/>
+      <measurement errorPlus="2.085304e-03" value="1.285790e+00" errorMinus="2.085304e-03"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="1.250000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="2.815086e-03" value="1.259766e+00" errorMinus="2.815086e-03"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="1.750000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="2.971532e-03" value="1.257731e+00" errorMinus="2.971532e-03"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="2.250000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="3.340244e-03" value="1.264337e+00" errorMinus="3.340244e-03"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="2.750000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="4.064577e-03" value="1.281168e+00" errorMinus="4.064577e-03"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="3.250000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="5.180541e-03" value="1.311960e+00" errorMinus="5.180541e-03"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="3.750000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="7.053265e-03" value="1.348930e+00" errorMinus="7.053265e-03"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="4.250000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="9.310764e-03" value="1.370016e+00" errorMinus="9.310764e-03"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="4.750000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="1.278989e-02" value="1.395372e+00" errorMinus="1.278989e-02"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="5.250000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="1.750055e-02" value="1.397625e+00" errorMinus="1.750055e-02"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="5.750000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="2.641841e-02" value="1.444445e+00" errorMinus="2.641841e-02"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="5.000000e-01" value="6.500000e+00" errorMinus="5.000000e-01"/>
+      <measurement errorPlus="2.827189e-02" value="1.427092e+00" errorMinus="2.827189e-02"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="5.000000e-01" value="7.500000e+00" errorMinus="5.000000e-01"/>
+      <measurement errorPlus="4.348717e-02" value="1.466756e+00" errorMinus="4.348717e-02"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="6.000000e-01" value="8.600000e+00" errorMinus="6.000000e-01"/>
+      <measurement errorPlus="3.010924e-02" value="1.387657e+00" errorMinus="3.010924e-02"/>
+    </dataPoint>
+  </dataPointSet>
+  <dataPointSet name="d02-x01-y01" dimension="2"
+      path="/REF/CMS_2012_I1102908" title="MN-to-exclusive-dijets-ratio">
+    <annotation>
+      <item key="Title" value="" sticky="true"/>
+      <item key="AidaPath" value="/REF/d02-x01-y01" sticky="true"/>
+    </annotation>
+    <dataPoint>
+      <measurement errorPlus="5.000000e-01" value="5.000000e-01" errorMinus="5.000000e-01"/>
+      <measurement errorPlus="5.383991e-04" value="1.022948e+00" errorMinus="5.383991e-04"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="1.250000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="1.173515e-03" value="1.051822e+00" errorMinus="1.173515e-03"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="1.750000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="1.486924e-03" value="1.073364e+00" errorMinus="1.486924e-03"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="2.250000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="1.943143e-03" value="1.100906e+00" errorMinus="1.943143e-03"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="2.750000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="2.592440e-03" value="1.127861e+00" errorMinus="2.592440e-03"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="3.250000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="3.648154e-03" value="1.171354e+00" errorMinus="3.648154e-03"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="3.750000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="5.412816e-03" value="1.222222e+00" errorMinus="5.412816e-03"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="4.250000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="7.604860e-03" value="1.262895e+00" errorMinus="7.604860e-03"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="4.750000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="1.114202e-02" value="1.313324e+00" errorMinus="1.114202e-02"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="5.250000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="1.586938e-02" value="1.334646e+00" errorMinus="1.586938e-02"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="2.500000e-01" value="5.750000e+00" errorMinus="2.500000e-01"/>
+      <measurement errorPlus="2.447298e-02" value="1.385624e+00" errorMinus="2.447298e-02"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="5.000000e-01" value="6.500000e+00" errorMinus="5.000000e-01"/>
+      <measurement errorPlus="2.735960e-02" value="1.393627e+00" errorMinus="2.735960e-02"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="5.000000e-01" value="7.500000e+00" errorMinus="5.000000e-01"/>
+      <measurement errorPlus="4.332298e-02" value="1.454774e+00" errorMinus="4.332298e-02"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement errorPlus="6.000000e-01" value="8.600000e+00" errorMinus="6.000000e-01"/>
+      <measurement errorPlus="2.995671e-02" value="1.385074e+00" errorMinus="2.995671e-02"/>
+    </dataPoint>
+  </dataPointSet>
+</aida>

Modified: trunk/data/refdata/Makefile.am
==============================================================================
--- trunk/data/refdata/Makefile.am	Tue Nov 27 23:40:08 2012	(r4050)
+++ trunk/data/refdata/Makefile.am	Tue Nov 27 23:41:51 2012	(r4051)
@@ -78,6 +78,7 @@
   CMS_2011_S9120041.aida \
   CMS_2011_S9215166.aida \
   CMS_2012_I1087342.aida \
+  CMS_2012_I1102908.aida \
   CMS_2012_I1107658.aida \
   CMS_QCD_10_024.aida \
   DELPHI_1994_S3021912.aida \

Copied and modified: trunk/src/Analyses/CMS_2012_I1102908.cc (from r4015, branches/2012-06-aidarivet/src/Analyses/CMS_2012_I1102908.cc)
==============================================================================
--- branches/2012-06-aidarivet/src/Analyses/CMS_2012_I1102908.cc	Wed Nov 14 19:01:56 2012	(r4015, copy source)
+++ trunk/src/Analyses/CMS_2012_I1102908.cc	Tue Nov 27 23:41:51 2012	(r4051)
@@ -4,163 +4,88 @@
 #include "Rivet/Tools/BinnedHistogram.hh"
 #include "Rivet/Projections/FinalState.hh"
 #include "Rivet/Projections/FastJets.hh"
-#include "Rivet/RivetAIDA.hh"
-
-#include "LWH/HistogramFactory.h"
-#include "LWH/Histogram1D.h"
-
-
-// exclusive events are a subset of inclusive events
-// so we need special error estimation treatment
-void divide_set_by_subset_with_binomial_errors(AIDA::IDataPointSet* h, const AIDA::IHistogram1D & hist1, const AIDA::IHistogram1D & hist2);
-
-
+#include "Rivet/RivetYODA.hh"
 #include <sstream>
 
-
 namespace Rivet {
 
+  /// @cond
+  inline double _invert(double x) { return (x > 0) ? 1/x : 0; }
+  /// @endcond
 
-   // CMS Measurement of inclusive and exclusive dijet production
-   // ratio at large rapidity intervals
-
-
-class CMS_2012_I1102908 : public Analysis {
-public:
 
-  CMS_2012_I1102908() : Analysis("CMS_2012_I1102908") {}
+  /// @brief CMS inclusive and exclusive dijet production ratio at large rapidity intervals
+  class CMS_2012_I1102908 : public Analysis {
+  public:
+
+    CMS_2012_I1102908()
+      : Analysis("CMS_2012_I1102908")
+    {  }
 
 
-  // ======================================================== init
-
   void init() {
+    // Projections
+    addProjection(FastJets(FinalState(), FastJets::ANTIKT, 0.5), "antikT");
 
-    FinalState fs;
-    FastJets akt(fs, FastJets::ANTIKT, 0.5);
-    addProjection(akt, "antikT");
-
-    // dijet ratio
-    _h_dijet_ratio = bookDataPointSet(1,1,1);
-    // MN dijet ratio
-    _h_MN_dijet_ratio = bookDataPointSet(2,1,1);
-    // exclusive dijets
-    _h_DeltaY_exclusive = bookHistogram1D("DeltaY_exclusive", binEdges(1, 1, 1));
-    // inclusive dijets
-    _h_DeltaY_inclusive = bookHistogram1D("DeltaY_inclusive", binEdges(1, 1, 1));
-    // Mueller-Navelet dijets
-    _h_DeltaY_MN = bookHistogram1D("DeltaY_MN", binEdges(1, 1, 1));
-
+    // Histograms
+    /// @todo Can we manage to only register these as they are "really" created in the finalize()?
+    _h_dijet_ratio = bookScatter2D(1, 1, 1);
+    _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));
   }
 
-  // ======================================================== analyze
-
 
   void analyze(const Event & event) {
     const double weight = event.weight();
 
     // Jets with  pT > 35.0, -4.7 < y < 4.7
-    JetAlg const &jet_alg = applyProjection<JetAlg>(event, "antikT");
+    const JetAlg& jet_alg = applyProjection<JetAlg>(event, "antikT");
     const Jets& jets = jet_alg.jets(35.0/GeV, Rivet::MAXDOUBLE, -4.7, 4.7, RAPIDITY);
 
-    // veto event if number of jets less than 2
-    if(jets.size() < 2) return;
+    // Veto event if number of jets less than 2
+    if (jets.size() < 2) return;
 
-    // loop over jet pairs
+    // Loop over jet pairs
     double deltaY_MN = 0.0;
-    for(Jets::const_iterator jet1 = jets.begin(); jet1 != jets.end(); ++jet1) {
-      for(Jets::const_iterator jet2 = jet1 + 1; jet2 != jets.end(); ++jet2) {
-        const double y1 = jet1->momentum().rapidity(), y2 = jet2->momentum().rapidity();
-        const double deltaY = fabs(y1 - y2);
-
-        // exclusive case:
-        if(jets.size()==2) {
-          _h_DeltaY_exclusive->fill(deltaY, weight);
-        }
-
-        // inclusive case:
-        _h_DeltaY_inclusive->fill(deltaY, weight);
-
+    for (size_t ij1 = 0; ij1 < jets.size(); ++ij1) {
+      for (size_t ij2 = ij1 + 1; ij2 < jets.size(); ++ij2) {
+        const double deltaY = fabs(jets[ij1].momentum().rapidity() - jets[ij1].momentum().rapidity());
+        // Exclusive dijet case:
+        if (jets.size() == 2) _h_DeltaY_exclusive.fill(deltaY, weight);
+        // Inclusive jets case:
+        _h_DeltaY_inclusive.fill(deltaY, weight);
         // Mueller-Navelet:
-        if(deltaY > deltaY_MN) {
-          deltaY_MN = deltaY;
-        }
+        if (deltaY > deltaY_MN) deltaY_MN = deltaY;
       }
     }
-    _h_DeltaY_MN->fill(deltaY_MN, weight);
+    _h_DeltaY_MN.fill(deltaY_MN, weight);
   }
 
-  // ======================================================== finalize
 
 
   void finalize() {
-    // computing the ratio -- note that in YODA this can be replaced by a regular
-    // divide with erroropt=BINOMIAL -- see comment below!!!!!
-    divide_set_by_subset_with_binomial_errors(_h_dijet_ratio, *_h_DeltaY_inclusive, *_h_DeltaY_exclusive);
-    divide_set_by_subset_with_binomial_errors(_h_MN_dijet_ratio, *_h_DeltaY_MN, *_h_DeltaY_exclusive);
-    // removing unnecessary histograms
-    histogramFactory().destroy(_h_DeltaY_inclusive);
-    histogramFactory().destroy(_h_DeltaY_exclusive);
-    histogramFactory().destroy(_h_DeltaY_MN);
+    *_h_dijet_ratio = YODA::efficiency(_h_DeltaY_inclusive, _h_DeltaY_exclusive);
+    *_h_MN_dijet_ratio = YODA::efficiency(_h_DeltaY_MN, _h_DeltaY_exclusive);
+    transformY(*_h_dijet_ratio, _invert);
+    transformY(*_h_MN_dijet_ratio, _invert);
   }
 
-private:
 
-  /// @name Histograms
-  //@{
-  AIDA::IHistogram1D*  _h_DeltaY_inclusive;
-  AIDA::IHistogram1D*  _h_DeltaY_exclusive;
-  AIDA::IHistogram1D*  _h_DeltaY_MN;
-  AIDA::IDataPointSet* _h_dijet_ratio;
-  AIDA::IDataPointSet* _h_MN_dijet_ratio;
-  //@}
+  private:
 
-};
+    /// @name Histograms
+    //@{
+    Scatter2DPtr _h_dijet_ratio, _h_MN_dijet_ratio;
+    Histo1D _h_DeltaY_inclusive, _h_DeltaY_exclusive, _h_DeltaY_MN;
+    //@}
 
-  // This global object acts as a hook for the plugin system
-  DECLARE_RIVET_PLUGIN(CMS_2012_I1102908);
-}
+  };
 
 
-////////// @todo YODA: This can be deleted. Use erroropt=BINOMIAL in YODA divide() instead. But we need
-//////////             to be careful because this is "superset/subset" and not "subset/superset" as in the
-//////////             YODA implementation, so we need to use the inverse.
-
-// adapted from HistogramFactory::divide
-// in order to change treatment of errors
-void divide_set_by_subset_with_binomial_errors(AIDA::IDataPointSet* h,
-                                               const AIDA::IHistogram1D & hist1, const AIDA::IHistogram1D & hist2) {
-  using namespace AIDA;
-  using namespace Rivet;
-  using namespace LWH;
-  const LWH::Histogram1D& h1 = dynamic_cast<const LWH::Histogram1D &>(hist1);
-  const LWH::Histogram1D& h2 = dynamic_cast<const LWH::Histogram1D &>(hist2);
-  for (int i = 0; i < h1.axis().bins(); ++i) {
-    AIDA::IDataPoint* point = h->point(i);
-    double yval(0), yerr(0);
-    if ( h1.binHeight(i) == 0 || h2.binHeight(i) == 0 ) {
-      /// @todo Bad way of handling div by zero!
-      yval = 0.0;
-      yerr = 0.0;
-    } else {
-      const double b1 = h2.binHeight(i); // subset
-      const double b2 = h1.binHeight(i); // super-set
-      const double w  = b1/b2;
-      double e1 = h2.binError(i);
-      double e2 = h1.binError(i);
-      // see http://root.cern.ch/root/html/src/TH1.cxx.html#2592:
-      double w_error = 0;
-      if(b1 < b2) w_error = sqrt( ((1.-2.*w)*e1*e1 + w*w*e2*e2 )/(b2*b2) );
-      // taking the inverse:
-      yval = 1/w;
-      if(w!=0) {
-        yerr = w_error/pow(w,2);
-      } else {
-        yerr = 0;
-      }
-    }
-    IMeasurement* y = point->coordinate(1);
-    y->setValue(yval);
-    y->setErrorPlus(yerr);
-    y->setErrorMinus(yerr);
-  }
+  DECLARE_RIVET_PLUGIN(CMS_2012_I1102908);
+
 }

Modified: trunk/src/Analyses/Makefile.am
==============================================================================
--- trunk/src/Analyses/Makefile.am	Tue Nov 27 23:40:08 2012	(r4050)
+++ trunk/src/Analyses/Makefile.am	Tue Nov 27 23:41:51 2012	(r4051)
@@ -124,6 +124,7 @@
     CMS_2011_S9120041.cc \
     CMS_2011_S9215166.cc \
     CMS_2012_I1087342.cc \
+    CMS_2012_I1102908.cc \
     CMS_2012_I1107658.cc
 if ENABLE_PRELIMINARY
 RivetCMSAnalyses_la_SOURCES += \


More information about the Rivet-svn mailing list