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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Thu Apr 12 09:29:50 BST 2012


Author: richardn
Date: Thu Apr 12 09:29:50 2012
New Revision: 3672

Log:
two analyses of charged particle multiplicity in light, c and b events in e+e- above MZ

Added:
   trunk/data/anainfo/OPAL_2002_S5361494.info
      - copied, changed from r3670, trunk/data/anainfo/OPAL_2000_S4418603.info
   trunk/data/plotinfo/DELPHI_2000_S4328825.plot
   trunk/data/plotinfo/OPAL_2002_S5361494.plot
   trunk/data/refdata/DELPHI_2000_S4328825.aida   (contents, props changed)
   trunk/data/refdata/OPAL_2002_S5361494.aida   (contents, props changed)
   trunk/src/Analyses/DELPHI_2000_S4328825.cc
      - copied, changed from r3670, trunk/src/Analyses/OPAL_2004_S6132243.cc
   trunk/src/Analyses/OPAL_2002_S5361494.cc
      - copied, changed from r3670, trunk/src/Analyses/OPAL_2004_S6132243.cc
Modified:
   trunk/data/anainfo/Makefile.am
   trunk/data/anainfo/OPAL_2000_S4418603.info
   trunk/data/plotinfo/Makefile.am
   trunk/data/refdata/Makefile.am
   trunk/src/Analyses/Makefile.am

Modified: trunk/data/anainfo/Makefile.am
==============================================================================
--- trunk/data/anainfo/Makefile.am	Wed Apr 11 15:14:55 2012	(r3671)
+++ trunk/data/anainfo/Makefile.am	Thu Apr 12 09:29:50 2012	(r3672)
@@ -122,6 +122,7 @@
   DELPHI_1995_S3137023.info \
   DELPHI_1996_S3430090.info \
   DELPHI_1999_S3960137.info \
+  DELPHI_2000_S4328825.info \
   DELPHI_2002_069_CONF_603.info \
   DELPHI_2003_WUD_03_11.info \
   EXAMPLE.info \
@@ -162,6 +163,7 @@
   OPAL_1998_S3749908.info \
   OPAL_2000_S4418603.info \
   OPAL_2001_S4553896.info \
+  OPAL_2002_S5361494.info \
   OPAL_2004_S6132243.info \
   PDG_HADRON_MULTIPLICITIES.info \
   PDG_HADRON_MULTIPLICITIES_RATIOS.info \

Modified: trunk/data/anainfo/OPAL_2000_S4418603.info
==============================================================================
--- trunk/data/anainfo/OPAL_2000_S4418603.info	Wed Apr 11 15:14:55 2012	(r3671)
+++ trunk/data/anainfo/OPAL_2000_S4418603.info	Thu Apr 12 09:29:50 2012	(r3672)
@@ -1,5 +1,5 @@
 Name: OPAL_2000_S4418603
-Year: 1998
+Year: 2000
 Summary: Multiplicities of $\pi^0$, $\eta$, $K^0$ and of charged particles in quark and gluon jets
 Experiment: OPAL
 Collider: LEP 1

Copied and modified: trunk/data/anainfo/OPAL_2002_S5361494.info (from r3670, trunk/data/anainfo/OPAL_2000_S4418603.info)
==============================================================================
--- trunk/data/anainfo/OPAL_2000_S4418603.info	Tue Apr 10 12:33:07 2012	(r3670, copy source)
+++ trunk/data/anainfo/OPAL_2002_S5361494.info	Thu Apr 12 09:29:50 2012	(r3672)
@@ -1,39 +1,39 @@
-Name: OPAL_2000_S4418603
-Year: 1998
-Summary: Multiplicities of $\pi^0$, $\eta$, $K^0$ and of charged particles in quark and gluon jets
+Name: OPAL_2002_S5361494
+Year: 2002
+Summary: Charged particle multiplicities in heavy and light quark initiated events above the $Z^0$ peak 
 Experiment: OPAL
-Collider: LEP 1
-SpiresID: 4418603
+Collider: LEP 2
+SpiresID: 5361494
 Status: VALIDATED
 Authors:
  - Peter Richardson <Peter.Richardson at durham.ac.uk>
 References:
- - Eur.Phys.J.C17:373-387,2000
- - hep-ex/0007017
+ - Phys.Lett. B550 (2002) 33-46
+ - hep-ex/0211007
 RunInfo:
   Hadronic Z decay events generated on the Z pole (sqrt(s) = 91.2 GeV)
 NumEvents: 1000000
 Beams: [e+, e-]
-Energies: [91.2]
+Energies: [130,136,161,172,183,189,192,196,200,202,206]
 PtCuts: [0]
-Description: Multiplicities of $\pi^0$, $\eta$, $K^0$ and of charged particles
-             in quark and gluon jets in 3-jet events, as measured by the OPAL
-             experiment at LEP. The main implemented measurement is the 
-             $K^0$ fragmentation function.
-BibKey: Abbiendi:2000cv
-BibTeX: '@article{Abbiendi:2000cv,
+Description: Measurements of the mean charged multiplicities separately for $b\bar b$,
+  $c\bar c$ and light quark ($uds$) initiated events in $e^+e^-$ interactions at energies
+  above the $Z^0$ mass. The data is from the LEP running periods between 1995 and 2000.
+BibKey: Abbiendi:2002vn
+BibTeX: '@article{Abbiendi:2002vn,
       author         = "Abbiendi, G. and others",
-      title          = "{Multiplicities of pi0, eta, K0 and of charged particles
-                        in quark and gluon jets}",
+      title          = "{Charged particle multiplicities in heavy and light quark
+                        initiated events above the Z0 peak}",
       collaboration  = "OPAL Collaboration",
-      journal        = "Eur.Phys.J.",
-      volume         = "C17",
-      pages          = "373-387",
-      doi            = "10.1007/s100520000505",
-      year           = "2000",
-      eprint         = "hep-ex/0007017",
+      journal        = "Phys.Lett.",
+      volume         = "B550",
+      pages          = "33-46",
+      doi            = "10.1016/S0370-2693(02)02935-0",
+      year           = "2002",
+      note           = "18 pages, 5 figures Report-no: CERN-EP-2002-0079",
+      eprint         = "hep-ex/0211007",
       archivePrefix  = "arXiv",
       primaryClass   = "hep-ex",
-      reportNumber   = "CERN-EP-2000-070",
-      SLACcitation   = "%%CITATION = HEP-EX/0007017;%%",
+      reportNumber   = "CERN-EP-2002-079",
+      SLACcitation   = "%%CITATION = HEP-EX/0211007;%%",
 }'

Added: trunk/data/plotinfo/DELPHI_2000_S4328825.plot
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/data/plotinfo/DELPHI_2000_S4328825.plot	Thu Apr 12 09:29:50 2012	(r3672)
@@ -0,0 +1,36 @@
+# BEGIN PLOT /DELPHI_2000_S4328825/d01-x01-y01
+Title=Charged multiplicity as a function of energy in $b$ events
+XLabel=$E_\mathrm{CMS}/GeV$
+YLabel=$\langle n\rangle_{b\bar b}$
+LegendXPos=0.20
+LegendYPos=0.85
+FullRange=1
+LogY=0
+# END PLOT
+# BEGIN PLOT /DELPHI_2000_S4328825/d01-x01-y02
+Title=Charged multiplicity as a function of energy in $c$ events
+XLabel=$E_\mathrm{CMS}/GeV$
+YLabel=$\langle n\rangle_{c\bar c}$
+LegendXPos=0.20
+LegendYPos=0.85
+FullRange=1
+LogY=0
+# END PLOT
+# BEGIN PLOT /DELPHI_2000_S4328825/d01-x01-y03
+Title=Charged multiplicity as a function of energy in $uds$ events
+XLabel=$E_\mathrm{CMS}/GeV$
+YLabel=$\langle n\rangle_{l\bar l}$
+LegendXPos=0.20
+LegendYPos=0.85
+FullRange=1
+LogY=0
+# END PLOT
+# BEGIN PLOT /DELPHI_2000_S4328825/d01-x01-y04
+Title=Difference in Charged multiplicity as a function of energy between $b$ and $uds$ events
+XLabel=$E_\mathrm{CMS}/GeV$
+YLabel=$\delta_{bl}$
+LegendXPos=0.20
+LegendYPos=0.85
+FullRange=1
+LogY=0
+# END PLOT

Modified: trunk/data/plotinfo/Makefile.am
==============================================================================
--- trunk/data/plotinfo/Makefile.am	Wed Apr 11 15:14:55 2012	(r3671)
+++ trunk/data/plotinfo/Makefile.am	Thu Apr 12 09:29:50 2012	(r3672)
@@ -117,6 +117,7 @@
   DELPHI_1995_S3137023.plot \
   DELPHI_1996_S3430090.plot \
   DELPHI_1999_S3960137.plot \
+  DELPHI_2000_S4328825.plot \
   DELPHI_2002_069_CONF_603.plot \
   DELPHI_2003_WUD_03_11.plot \
   EXAMPLE.plot \
@@ -157,6 +158,7 @@
   OPAL_1998_S3780481.plot \
   OPAL_2000_S4418603.plot \
   OPAL_2001_S4553896.plot \
+  OPAL_2002_S5361494.plot \
   OPAL_2004_S6132243.plot \
   PDG_HADRON_MULTIPLICITIES.plot \
   PDG_HADRON_MULTIPLICITIES_RATIOS.plot \

Added: trunk/data/plotinfo/OPAL_2002_S5361494.plot
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/data/plotinfo/OPAL_2002_S5361494.plot	Thu Apr 12 09:29:50 2012	(r3672)
@@ -0,0 +1,36 @@
+# BEGIN PLOT /OPAL_2002_S5361494/d01-x01-y01
+Title=Charged multiplicity as a function of energy in $b$ events
+XLabel=$E_\mathrm{CMS}/GeV$
+YLabel=$\langle n\rangle_{b\bar b}$
+LegendXPos=0.20
+LegendYPos=0.85
+FullRange=1
+LogY=0
+# END PLOT
+# BEGIN PLOT /OPAL_2002_S5361494/d01-x01-y02
+Title=Charged multiplicity as a function of energy in $c$ events
+XLabel=$E_\mathrm{CMS}/GeV$
+YLabel=$\langle n\rangle_{c\bar c}$
+LegendXPos=0.20
+LegendYPos=0.85
+FullRange=1
+LogY=0
+# END PLOT
+# BEGIN PLOT /OPAL_2002_S5361494/d01-x01-y03
+Title=Charged multiplicity as a function of energy in $uds$ events
+XLabel=$E_\mathrm{CMS}/GeV$
+YLabel=$\langle n\rangle_{l\bar l}$
+LegendXPos=0.20
+LegendYPos=0.85
+FullRange=1
+LogY=0
+# END PLOT
+# BEGIN PLOT /OPAL_2002_S5361494/d01-x01-y04
+Title=Difference in Charged multiplicity as a function of energy between $b$ and $uds$ events
+XLabel=$E_\mathrm{CMS}/GeV$
+YLabel=$\delta_{bl}$
+LegendXPos=0.20
+LegendYPos=0.85
+FullRange=1
+LogY=0
+# END PLOT

Added: trunk/data/refdata/DELPHI_2000_S4328825.aida
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/data/refdata/DELPHI_2000_S4328825.aida	Thu Apr 12 09:29:50 2012	(r3672)
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE aida SYSTEM "http://aida.freehep.org/schemas/3.3/aida.dtd">
+<aida version="3.3">
+  <implementation version="1.0" package="HepData"/>
+  <dataPointSet name="d01-x01-y01" dimension="2" path="/REF/DELPHI_2000_S4328825" title="MULT(Q=BB,C=CHARGED)" >
+    <dataPoint>
+      <measurement value="183.0" errorPlus="3.0" errorMinus="3.0"/>
+      <measurement value="29.79" errorPlus="1.11" errorMinus="1.11"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="189.0" errorPlus="1.5" errorMinus="3.0"/>
+      <measurement value="30.53" errorPlus="0.7" errorMinus="0.7"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="192.0" errorPlus="2.0" errorMinus="1.5"/>
+      <measurement value="27.57" errorPlus="1.56" errorMinus="1.56"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="196.0" errorPlus="2.0" errorMinus="2.0"/>
+      <measurement value="29.58" errorPlus="0.97" errorMinus="0.97"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="200.0" errorPlus="3.0" errorMinus="2.0"/>
+      <measurement value="29.38" errorPlus="0.65" errorMinus="0.65"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="206.0" errorPlus="3.0" errorMinus="3.0"/>
+      <measurement value="28.72" errorPlus="0.70" errorMinus="0.70"/>
+    </dataPoint>
+  </dataPointSet>
+  <dataPointSet name="d01-x01-y02" dimension="2" path="/REF/DELPHI_2000_S4328825" title="MULT(Q=CC,C=CHARGED)" >
+    <dataPoint>
+      <measurement value="183.0" errorPlus="3.0" errorMinus="3.0"/>
+      <measurement value="29.41" errorPlus="4.05" errorMinus="4.05"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="189.0" errorPlus="1.5" errorMinus="3.0"/>
+      <measurement value="28.63" errorPlus="2.81" errorMinus="2.81"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="192.0" errorPlus="2.0" errorMinus="1.5"/>
+      <measurement value="30.63" errorPlus="7.7" errorMinus="7.7"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="196.0" errorPlus="2.0" errorMinus="2.0"/>
+      <measurement value="26.75" errorPlus="4.45" errorMinus="4.45"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="200.0" errorPlus="3.0" errorMinus="2.0"/>
+      <measurement value="29.89" errorPlus="2.92" errorMinus="2.92"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="206.0" errorPlus="3.0" errorMinus="3.0"/>
+      <measurement value="36.32" errorPlus="3.08" errorMinus="3.08"/>
+    </dataPoint>
+  </dataPointSet>
+  <dataPointSet name="d01-x01-y03" dimension="2" path="/REF/DELPHI_2000_S4328825" title="MULT(Q=UDS,C=CHARGED)" >
+    <dataPoint>
+      <measurement value="183.0" errorPlus="3.0" errorMinus="3.0"/>
+      <measurement value="25.25" errorPlus="1.35" errorMinus="1.35"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="189.0" errorPlus="1.5" errorMinus="3.0"/>
+      <measurement value="26.1" errorPlus="0.97" errorMinus="0.97"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="192.0" errorPlus="2.0" errorMinus="1.5"/>
+      <measurement value="25.54" errorPlus="2.75" errorMinus="2.75"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="196.0" errorPlus="2.0" errorMinus="2.0"/>
+      <measurement value="27.12" errorPlus="1.58" errorMinus="1.58"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="200.0" errorPlus="3.0" errorMinus="2.0"/>
+      <measurement value="25.99" errorPlus="1.03" errorMinus="1.03"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="206.0" errorPlus="3.0" errorMinus="3.0"/>
+      <measurement value="24.22" errorPlus="1.09" errorMinus="1.09"/>
+    </dataPoint>
+  </dataPointSet>
+  <dataPointSet name="d01-x01-y04" dimension="2" path="/REF/DELPHI_2000_S4328825" title="MULT(Q=BB)-MULT(Q=UDS)" >
+    <dataPoint>
+      <measurement value="183.0" errorPlus="3.0" errorMinus="3.0"/>
+      <measurement value="4.55" errorPlus="1.31" errorMinus="1.31"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="189.0" errorPlus="1.5" errorMinus="3.0"/>
+      <measurement value="4.43" errorPlus="0.85" errorMinus="0.85"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="192.0" errorPlus="2.0" errorMinus="1.5"/>
+      <measurement value="2.03" errorPlus="2.36" errorMinus="2.36"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="196.0" errorPlus="2.0" errorMinus="2.0"/>
+      <measurement value="2.46" errorPlus="1.37" errorMinus="1.37"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="200.0" errorPlus="3.0" errorMinus="2.0"/>
+      <measurement value="4.79" errorPlus="1.34" errorMinus="1.34"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="206.0" errorPlus="3.0" errorMinus="3.0"/>
+      <measurement value="4.50" errorPlus="1.05" errorMinus="1.05"/>
+    </dataPoint>
+  </dataPointSet>
+  <dataPointSet name="d02-x01-y01" dimension="2" path="/REF/DELPHI_2000_S4328825" title="MULT(Q=BB)-MULT(Q=UDS)" >
+    <dataPoint>
+      <measurement value="183.0" errorPlus="3.0" errorMinus="3.0"/>
+      <measurement value="4.55" errorPlus="1.499666629621397" errorMinus="1.499666629621397"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="189.0" errorPlus="5.5" errorMinus="3.0"/>
+      <measurement value="4.43" errorPlus="1.046231331972045" errorMinus="1.046231331972045"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="200.0" errorPlus="5.5" errorMinus="5.5"/>
+      <measurement value="3.42" errorPlus="1.3461797799699713" errorMinus="1.3461797799699713"/>
+    </dataPoint>
+  </dataPointSet>
+</aida>

Modified: trunk/data/refdata/Makefile.am
==============================================================================
--- trunk/data/refdata/Makefile.am	Wed Apr 11 15:14:55 2012	(r3671)
+++ trunk/data/refdata/Makefile.am	Thu Apr 12 09:29:50 2012	(r3672)
@@ -46,6 +46,7 @@
   BABAR_2005_S6181155.aida \
   BABAR_2006_S6511112.aida \
   BABAR_2007_S6895344.aida \
+  BABAR_2007_S7266081.aida \
   BELLE_2001_S4598261.aida \
   BELLE_2006_S6265367.aida \
   CLEO_1997_S3486664.aida \
@@ -69,6 +70,7 @@
   DELPHI_1995_S3137023.aida \
   DELPHI_1996_S3430090.aida \
   DELPHI_1999_S3960137.aida \
+  DELPHI_2000_S4328825.aida \
   DELPHI_2002_069_CONF_603.aida \
   DELPHI_2003_WUD_03_11.aida \
   OPAL_1993_S2692198.aida \
@@ -81,6 +83,7 @@
   OPAL_1998_S3749908.aida \
   OPAL_2000_S4418603.aida \
   OPAL_2001_S4553896.aida \
+  OPAL_2002_S5361494.aida \
   OPAL_2004_S6132243.aida \
   H1_1994_S2919893.aida \
   H1_1995_S3167097.aida \

Added: trunk/data/refdata/OPAL_2002_S5361494.aida
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/data/refdata/OPAL_2002_S5361494.aida	Thu Apr 12 09:29:50 2012	(r3672)
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE aida SYSTEM "http://aida.freehep.org/schemas/3.3/aida.dtd">
+<aida version="3.3">
+  <implementation version="1.0" package="HepData"/>
+  <dataPointSet name="d01-x01-y01" dimension="2" path="/REF/OPAL_2002_S5361494" title="MULT(C=B BAR)" >
+    <dataPoint>
+      <measurement value="130.0" errorPlus="3.0" errorMinus="3.0"/>
+      <measurement value="25.9" errorPlus="1.2649110640673518" errorMinus="1.2649110640673518"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="136.0" errorPlus="12.5" errorMinus="3.0"/>
+      <measurement value="25.7" errorPlus="1.6763054614240211" errorMinus="1.6763054614240211"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="161.0" errorPlus="5.5" errorMinus="12.5"/>
+      <measurement value="24.1" errorPlus="1.6763054614240211" errorMinus="1.6763054614240211"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="172.0" errorPlus="5.5" errorMinus="5.5"/>
+      <measurement value="28.8" errorPlus="2.1587033144922905" errorMinus="2.1587033144922905"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="183.0" errorPlus="3.0" errorMinus="5.5"/>
+      <measurement value="28.3" errorPlus="1.2083045973594573" errorMinus="1.2083045973594573"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="189.0" errorPlus="1.5" errorMinus="3.0"/>
+      <measurement value="28.89" errorPlus="0.7746612162745725" errorMinus="0.7746612162745725"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="192.0" errorPlus="2.0" errorMinus="1.5"/>
+      <measurement value="28.5" errorPlus="1.3892443989449805" errorMinus="1.3892443989449805"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="196.0" errorPlus="2.0" errorMinus="2.0"/>
+      <measurement value="31.3" errorPlus="1.5231546211727816" errorMinus="1.5231546211727816"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="200.0" errorPlus="1.0" errorMinus="2.0"/>
+      <measurement value="30.3" errorPlus="1.252996408614167" errorMinus="1.252996408614167"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="202.0" errorPlus="2.0" errorMinus="1.0"/>
+      <measurement value="29.9" errorPlus="1.7088007490635064" errorMinus="1.7088007490635064"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="206.0" errorPlus="2.0" errorMinus="2.0"/>
+      <measurement value="30.08" errorPlus="1.0580170130957252" errorMinus="1.0580170130957252"/>
+    </dataPoint>
+  </dataPointSet>
+  <dataPointSet name="d01-x01-y02" dimension="2" path="/REF/OPAL_2002_S5361494" title="MULT(C=C CBAR)" >
+    <dataPoint>
+      <measurement value="130.0" errorPlus="3.0" errorMinus="3.0"/>
+      <measurement value="31.5" errorPlus="4.810405388322278" errorMinus="4.810405388322278"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="136.0" errorPlus="12.5" errorMinus="3.0"/>
+      <measurement value="26.2" errorPlus="4.517742799230607" errorMinus="4.517742799230607"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="161.0" errorPlus="5.5" errorMinus="12.5"/>
+      <measurement value="36.5" errorPlus="5.385164807134504" errorMinus="5.385164807134504"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="172.0" errorPlus="5.5" errorMinus="5.5"/>
+      <measurement value="21.7" errorPlus="5.818934610390462" errorMinus="5.818934610390462"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="183.0" errorPlus="3.0" errorMinus="5.5"/>
+      <measurement value="25.8" errorPlus="3.4409301068170506" errorMinus="3.4409301068170506"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="189.0" errorPlus="1.5" errorMinus="3.0"/>
+      <measurement value="29.8" errorPlus="2.6172504656604803" errorMinus="2.6172504656604803"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="192.0" errorPlus="2.0" errorMinus="1.5"/>
+      <measurement value="33.1" errorPlus="4.8754486972995625" errorMinus="4.8754486972995625"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="196.0" errorPlus="2.0" errorMinus="2.0"/>
+      <measurement value="23.6" errorPlus="3.807886552931954" errorMinus="3.807886552931954"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="200.0" errorPlus="1.0" errorMinus="2.0"/>
+      <measurement value="31.0" errorPlus="4.318564576337837" errorMinus="4.318564576337837"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="202.0" errorPlus="2.0" errorMinus="1.0"/>
+      <measurement value="34.2" errorPlus="5.232590180780452" errorMinus="5.232590180780452"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="206.0" errorPlus="2.0" errorMinus="2.0"/>
+      <measurement value="30.4" errorPlus="2.973213749463701" errorMinus="2.973213749463701"/>
+    </dataPoint>
+  </dataPointSet>
+  <dataPointSet name="d01-x01-y03" dimension="2" path="/REF/OPAL_2002_S5361494" title="MULT(C=LQ LQBAR)" >
+    <dataPoint>
+      <measurement value="130.0" errorPlus="3.0" errorMinus="3.0"/>
+      <measurement value="21.0" errorPlus="1.414213562373095" errorMinus="1.414213562373095"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="136.0" errorPlus="12.5" errorMinus="3.0"/>
+      <measurement value="23.0" errorPlus="1.6124515496597098" errorMinus="1.6124515496597098"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="161.0" errorPlus="5.5" errorMinus="12.5"/>
+      <measurement value="21.1" errorPlus="2.1023796041628637" errorMinus="2.1023796041628637"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="172.0" errorPlus="5.5" errorMinus="5.5"/>
+      <measurement value="26.8" errorPlus="2.154065922853802" errorMinus="2.154065922853802"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="183.0" errorPlus="3.0" errorMinus="5.5"/>
+      <measurement value="26.8" errorPlus="1.5620499351813308" errorMinus="1.5620499351813308"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="189.0" errorPlus="1.5" errorMinus="3.0"/>
+      <measurement value="25.41" errorPlus="1.046900186264192" errorMinus="1.046900186264192"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="192.0" errorPlus="2.0" errorMinus="1.5"/>
+      <measurement value="24.4" errorPlus="1.9235384061671343" errorMinus="1.9235384061671343"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="196.0" errorPlus="2.0" errorMinus="2.0"/>
+      <measurement value="28.6" errorPlus="1.5811388300841898" errorMinus="1.5811388300841898"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="200.0" errorPlus="1.0" errorMinus="2.0"/>
+      <measurement value="25.6" errorPlus="1.5264337522473748" errorMinus="1.5264337522473748"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="202.0" errorPlus="2.0" errorMinus="1.0"/>
+      <measurement value="25.5" errorPlus="1.9924858845171274" errorMinus="1.9924858845171274"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="206.0" errorPlus="2.0" errorMinus="2.0"/>
+      <measurement value="26.53" errorPlus="1.3780058055030102" errorMinus="1.3780058055030102"/>
+    </dataPoint>
+  </dataPointSet>
+  <dataPointSet name="d01-x01-y04" dimension="2" path="/REF/OPAL_2002_S5361494" title="MULT(C=B BAR) - MULT(C=LQ LQBAR)" >
+    <dataPoint>
+      <measurement value="130.0" errorPlus="3.0" errorMinus="3.0"/>
+      <measurement value="4.9" errorPlus="1.5524174696260025" errorMinus="1.5524174696260025"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="136.0" errorPlus="12.5" errorMinus="3.0"/>
+      <measurement value="2.8" errorPlus="2.0591260281974" errorMinus="2.0591260281974"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="161.0" errorPlus="5.5" errorMinus="12.5"/>
+      <measurement value="2.9" errorPlus="2.2825424421026654" errorMinus="2.2825424421026654"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="172.0" errorPlus="5.5" errorMinus="5.5"/>
+      <measurement value="2.1" errorPlus="2.5079872407968904" errorMinus="2.5079872407968904"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="183.0" errorPlus="3.0" errorMinus="5.5"/>
+      <measurement value="1.5" errorPlus="1.6401219466856727" errorMinus="1.6401219466856727"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="189.0" errorPlus="1.5" errorMinus="3.0"/>
+      <measurement value="3.48" errorPlus="1.2463145670335398" errorMinus="1.2463145670335398"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="192.0" errorPlus="2.0" errorMinus="1.5"/>
+      <measurement value="4.1" errorPlus="2.0248456731316584" errorMinus="2.0248456731316584"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="196.0" errorPlus="2.0" errorMinus="2.0"/>
+      <measurement value="2.7" errorPlus="1.7492855684535902" errorMinus="1.7492855684535902"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="200.0" errorPlus="1.0" errorMinus="2.0"/>
+      <measurement value="4.7" errorPlus="1.8384776310850237" errorMinus="1.8384776310850237"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="202.0" errorPlus="2.0" errorMinus="1.0"/>
+      <measurement value="4.4" errorPlus="1.96468827043885" errorMinus="1.96468827043885"/>
+    </dataPoint>
+    <dataPoint>
+      <measurement value="206.0" errorPlus="2.0" errorMinus="2.0"/>
+      <measurement value="3.55" errorPlus="1.245792920191795" errorMinus="1.245792920191795"/>
+    </dataPoint>
+  </dataPointSet>
+</aida>

Copied and modified: trunk/src/Analyses/DELPHI_2000_S4328825.cc (from r3670, trunk/src/Analyses/OPAL_2004_S6132243.cc)
==============================================================================
--- trunk/src/Analyses/OPAL_2004_S6132243.cc	Tue Apr 10 12:33:07 2012	(r3670, copy source)
+++ trunk/src/Analyses/DELPHI_2000_S4328825.cc	Thu Apr 12 09:29:50 2012	(r3672)
@@ -10,264 +10,141 @@
 #include "Rivet/Projections/FastJets.hh"
 #include "Rivet/Projections/ParisiTensor.hh"
 #include "Rivet/Projections/Hemispheres.hh"
+#include "Rivet/Projections/InitialQuarks.hh"
 #include <cmath>
 
 namespace Rivet {
 
 
-  /// @brief OPAL event shapes and moments at 91, 133, 177, and 197 GeV
-  /// @author Andy Buckley
-  class OPAL_2004_S6132243 : public Analysis {
+  /// @brief OPAL multiplicities at various energies
+  /// @author Peter Richardson
+  class DELPHI_2000_S4328825 : public Analysis {
   public:
 
     /// Constructor
-    OPAL_2004_S6132243()
-      : Analysis("OPAL_2004_S6132243"),
-        _isqrts(-1), _sumWTrack2(0.0), _sumWJet3(0.0)
-    {
-      //
-    }
-
+    DELPHI_2000_S4328825()
+      : Analysis("DELPHI_2000_S4328825"),
+	_weightedTotalChargedPartNumLight(0.),
+	_weightedTotalChargedPartNumCharm(0.),
+	_weightedTotalChargedPartNumBottom(0.),
+	_weightLight(0.),_weightCharm(0.),_weightBottom(0.)
+    {}
 
     /// @name Analysis methods
     //@{
 
-    /// Energies: 91, 133, 177 (161-183), 197 (189-209) => index 0..4
-    int getHistIndex(double sqrts) {
-      int ih = -1;
-      if (inRange(sqrts/GeV, 89.9, 91.5)) {
-        ih = 0;
-      } else if (fuzzyEquals(sqrts/GeV, 133)) {
-        ih = 1;
-      } else if (fuzzyEquals(sqrts/GeV, 177)) { // (161-183)
-        ih = 2;
-      } else if (fuzzyEquals(sqrts/GeV, 197)) { // (189-209)
-        ih = 3;
-      } else {
-        stringstream ss;
-        ss << "Invalid energy for OPAL_2004 analysis: "
-           << sqrts/GeV << " GeV != 91, 133, 177, or 197 GeV";
-        throw Error(ss.str());
-      }
-      assert(ih >= 0);
-      return ih;
-    }
-
 
     void init() {
       // Projections
       addProjection(Beam(), "Beams");
-      const FinalState fs;
-      addProjection(fs, "FS");
-      const ChargedFinalState cfs;
-      addProjection(cfs, "CFS");
-      addProjection(FastJets(fs, FastJets::DURHAM, 0.7), "DurhamJets");
-      addProjection(Sphericity(fs), "Sphericity");
-      addProjection(ParisiTensor(fs), "Parisi");
-      const Thrust thrust(fs);
-      addProjection(thrust, "Thrust");
-      addProjection(Hemispheres(thrust), "Hemispheres");
-
-      // Get beam energy index
-      _isqrts = getHistIndex(sqrtS());
-
-      // Book histograms
-      _hist1MinusT[_isqrts]    = bookHistogram1D(1, 1, _isqrts+1);
-      _histHemiMassH[_isqrts]  = bookHistogram1D(2, 1, _isqrts+1);
-      _histCParam[_isqrts]     = bookHistogram1D(3, 1, _isqrts+1);
-      _histHemiBroadT[_isqrts] = bookHistogram1D(4, 1, _isqrts+1);
-      _histHemiBroadW[_isqrts] = bookHistogram1D(5, 1, _isqrts+1);
-      _histY23Durham[_isqrts]  = bookHistogram1D(6, 1, _isqrts+1);
-      _histTMajor[_isqrts]     = bookHistogram1D(7, 1, _isqrts+1);
-      _histTMinor[_isqrts]     = bookHistogram1D(8, 1, _isqrts+1);
-      _histAplanarity[_isqrts] = bookHistogram1D(9, 1, _isqrts+1);
-      _histSphericity[_isqrts] = bookHistogram1D(10, 1, _isqrts+1);
-      _histOblateness[_isqrts] = bookHistogram1D(11, 1, _isqrts+1);
-      _histHemiMassL[_isqrts]  = bookHistogram1D(12, 1, _isqrts+1);
-      _histHemiBroadN[_isqrts] = bookHistogram1D(13, 1, _isqrts+1);
-      _histDParam[_isqrts]     = bookHistogram1D(14, 1, _isqrts+1);
-      //
-      _hist1MinusTMom[_isqrts]    = bookHistogram1D(15, 1, _isqrts+1);
-      _histHemiMassHMom[_isqrts]  = bookHistogram1D(16, 1, _isqrts+1);
-      _histCParamMom[_isqrts]     = bookHistogram1D(17, 1, _isqrts+1);
-      _histHemiBroadTMom[_isqrts] = bookHistogram1D(18, 1, _isqrts+1);
-      _histHemiBroadWMom[_isqrts] = bookHistogram1D(19, 1, _isqrts+1);
-      _histY23DurhamMom[_isqrts]  = bookHistogram1D(20, 1, _isqrts+1);
-      _histTMajorMom[_isqrts]     = bookHistogram1D(21, 1, _isqrts+1);
-      _histTMinorMom[_isqrts]     = bookHistogram1D(22, 1, _isqrts+1);
-      _histSphericityMom[_isqrts] = bookHistogram1D(23, 1, _isqrts+1);
-      _histOblatenessMom[_isqrts] = bookHistogram1D(24, 1, _isqrts+1);
-      _histHemiMassLMom[_isqrts]  = bookHistogram1D(25, 1, _isqrts+1);
-      _histHemiBroadNMom[_isqrts] = bookHistogram1D(26, 1, _isqrts+1);
+      addProjection(ChargedFinalState(), "CFS");
+      addProjection(InitialQuarks(), "IQF");
+
     }
 
 
     void analyze(const Event& event) {
+      const double weight = event.weight();
       // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
       const FinalState& cfs = applyProjection<FinalState>(event, "CFS");
       if (cfs.size() < 2) vetoEvent;
 
-      // Increment passed-cuts weight sum
-      const double weight = event.weight();
-      _sumWTrack2 += weight;
-
-      // Thrusts
-      const Thrust& thrust = applyProjection<Thrust>(event, "Thrust");
-      _hist1MinusT[_isqrts]->fill(1-thrust.thrust(), weight);
-      _histTMajor[_isqrts]->fill(thrust.thrustMajor(), weight);
-      _histTMinor[_isqrts]->fill(thrust.thrustMinor(), weight);
-      _histOblateness[_isqrts]->fill(thrust.oblateness(), weight);
-      for (int n = 1; n <= 5; ++n) {
-        _hist1MinusTMom[_isqrts]->fill(n, pow(1-thrust.thrust(), n)*weight);
-        _histTMajorMom[_isqrts]->fill(n, pow(thrust.thrustMajor(), n)*weight);
-        _histTMinorMom[_isqrts]->fill(n, pow(thrust.thrustMinor(), n)*weight);
-        _histOblatenessMom[_isqrts]->fill(n, pow(thrust.oblateness(), n)*weight);
-      }
 
-      // Jets
-      const FastJets& durjet = applyProjection<FastJets>(event, "DurhamJets");
-      if (durjet.clusterSeq()) {
-        _sumWJet3 += weight;
-        const double y23 = durjet.clusterSeq()->exclusive_ymerge_max(2);
-        _histY23Durham[_isqrts]->fill(y23, weight);
-        for (int n = 1; n <= 5; ++n) {
-          _histY23DurhamMom[_isqrts]->fill(n, pow(y23, n)*weight);
+      int flavour = 0;
+      const InitialQuarks& iqf = applyProjection<InitialQuarks>(event, "IQF");
+      
+      // If we only have two quarks (qqbar), just take the flavour.
+      // If we have more than two quarks, look for the highest energetic q-qbar pair.
+      if (iqf.particles().size() == 2) {
+        flavour = abs( iqf.particles().front().pdgId() );
+      }
+      else {
+        map<int, double> quarkmap;
+        foreach (const Particle& p, iqf.particles()) {
+          if (quarkmap[p.pdgId()] < p.momentum().E()) {
+            quarkmap[p.pdgId()] = p.momentum().E();
+          }
+        }
+        double maxenergy = 0.;
+        for (int i = 1; i <= 5; ++i) {
+          if (quarkmap[i]+quarkmap[-i] > maxenergy) {
+            flavour = i;
+          }
         }
       }
-
-      // Sphericities
-      const Sphericity& sphericity = applyProjection<Sphericity>(event, "Sphericity");
-      const double sph = sphericity.sphericity();
-      const double apl = sphericity.aplanarity();
-      _histSphericity[_isqrts]->fill(sph, weight);
-      _histAplanarity[_isqrts]->fill(apl, weight);
-      for (int n = 1; n <= 5; ++n) {
-        _histSphericityMom[_isqrts]->fill(n, pow(sph, n)*weight);
-      }
-
-      // C & D params
-      const ParisiTensor& parisi = applyProjection<ParisiTensor>(event, "Parisi");
-      const double cparam = parisi.C();
-      const double dparam = parisi.D();
-      _histCParam[_isqrts]->fill(cparam, weight);
-      _histDParam[_isqrts]->fill(dparam, weight);
-      for (int n = 1; n <= 5; ++n) {
-        _histCParamMom[_isqrts]->fill(n, pow(cparam, n)*weight);
+      const size_t numParticles = cfs.particles().size();
+      switch (flavour) {
+      case 1: case 2: case 3:
+	_weightLight  += weight;
+        _weightedTotalChargedPartNumLight  += numParticles * weight;
+        break;
+      case 4:
+	_weightCharm  += weight;
+        _weightedTotalChargedPartNumCharm  += numParticles * weight;
+        break;
+      case 5:
+	_weightBottom += weight;
+        _weightedTotalChargedPartNumBottom += numParticles * weight;
+        break;
       }
 
-      // Hemispheres
-      const Hemispheres& hemi = applyProjection<Hemispheres>(event, "Hemispheres");
-      // The paper says that M_H/L are scaled by sqrt(s), but scaling by E_vis is the way that fits the data...
-      const double hemi_mh = hemi.scaledMhigh();
-      const double hemi_ml = hemi.scaledMlow();
-      /// @todo This shouldn't be necessary... what's going on? Memory corruption suspected :(
-      // if (isnan(hemi_ml)) {
-      //   MSG_ERROR("NaN in HemiL! Event = " << numEvents());
-      //   MSG_ERROR(hemi.M2low() << ", " << hemi.E2vis());
-      // }
-      if (!std::isnan(hemi_mh) && !std::isnan(hemi_ml)) {
-        const double hemi_bmax = hemi.Bmax();
-        const double hemi_bmin = hemi.Bmin();
-        const double hemi_bsum = hemi.Bsum();
-        _histHemiMassH[_isqrts]->fill(hemi_mh, weight);
-        _histHemiMassL[_isqrts]->fill(hemi_ml, weight);
-        _histHemiBroadW[_isqrts]->fill(hemi_bmax, weight);
-        _histHemiBroadN[_isqrts]->fill(hemi_bmin, weight);
-        _histHemiBroadT[_isqrts]->fill(hemi_bsum, weight);
-        for (int n = 1; n <= 5; ++n) {
-          // if (isnan(pow(hemi_ml, n))) MSG_ERROR("NaN in HemiL moment! Event = " << numEvents());
-          _histHemiMassHMom[_isqrts]->fill(n, pow(hemi_mh, n)*weight);
-          _histHemiMassLMom[_isqrts]->fill(n, pow(hemi_ml, n)*weight);
-          _histHemiBroadWMom[_isqrts]->fill(n, pow(hemi_bmax, n)*weight);
-          _histHemiBroadNMom[_isqrts]->fill(n, pow(hemi_bmin, n)*weight);
-          _histHemiBroadTMom[_isqrts]->fill(n, pow(hemi_bsum, n)*weight);
-        }
-      }
     }
 
 
     void finalize() {
-      scale(_hist1MinusT[_isqrts], 1.0/_sumWTrack2);
-      scale(_histTMajor[_isqrts], 1.0/_sumWTrack2);
-      scale(_histTMinor[_isqrts], 1.0/_sumWTrack2);
-      scale(_histOblateness[_isqrts], 1.0/_sumWTrack2);
-      scale(_histSphericity[_isqrts], 1.0/_sumWTrack2);
-      scale(_histAplanarity[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiMassH[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiMassL[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiBroadW[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiBroadN[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiBroadT[_isqrts], 1.0/_sumWTrack2);
-      scale(_histCParam[_isqrts], 1.0/_sumWTrack2);
-      scale(_histDParam[_isqrts], 1.0/_sumWTrack2);
-      scale(_histY23Durham[_isqrts], 1.0/_sumWJet3);
-      //
-      scale(_hist1MinusTMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histTMajorMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histTMinorMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histOblatenessMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histSphericityMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiMassHMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiMassLMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiBroadWMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiBroadNMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiBroadTMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histCParamMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histY23DurhamMom[_isqrts], 1.0/_sumWJet3);
+      // bottom
+      const double avgNumPartsBottom = _weightedTotalChargedPartNumBottom / _weightBottom;
+      AIDA::IDataPointSet * multB = bookDataPointSet(1, 1, 1);
+      for (int i = 0; i < multB->size(); ++i) {
+        if (fuzzyEquals(sqrtS(), multB->point(i)->coordinate(0)->value(), 0.01)) {
+          multB->point(i)->coordinate(1)->setValue(avgNumPartsBottom);
+        }
+      }
+      // charm
+      const double avgNumPartsCharm = _weightedTotalChargedPartNumCharm / _weightCharm;
+      AIDA::IDataPointSet * multC = bookDataPointSet(1, 1, 2);
+      for (int i = 0; i < multC->size(); ++i) {
+        if (fuzzyEquals(sqrtS(), multC->point(i)->coordinate(0)->value(), 0.01)) {
+          multC->point(i)->coordinate(1)->setValue(avgNumPartsCharm);
+        }
+      }
+      // light
+      const double avgNumPartsLight = _weightedTotalChargedPartNumLight / _weightLight;
+      AIDA::IDataPointSet * multL = bookDataPointSet(1, 1, 3);
+      for (int i = 0; i < multL->size(); ++i) {
+        if (fuzzyEquals(sqrtS(), multL->point(i)->coordinate(0)->value(), 0.01)) {
+          multL->point(i)->coordinate(1)->setValue(avgNumPartsLight);
+        }
+      }
+      // bottom-light
+      AIDA::IDataPointSet * multD = bookDataPointSet(1, 1, 4);
+      for (int i = 0; i < multD->size(); ++i) {
+        if (fuzzyEquals(sqrtS(), multD->point(i)->coordinate(0)->value(), 0.01)) {
+          multD->point(i)->coordinate(1)->setValue(avgNumPartsBottom-avgNumPartsLight);
+        }
+      }
     }
-
     //@}
 
 
   private:
 
-    /// Beam energy index for histograms
-    int _isqrts;
-
-    /// @name Counters of event weights passing the cuts
-    //@{
-    double _sumWTrack2, _sumWJet3;
-    //@}
-
-    /// @name Event shape histos at 4 energies
+    /// @name Multiplicities
     //@{
-    AIDA::IHistogram1D* _hist1MinusT[4];
-    AIDA::IHistogram1D* _histHemiMassH[4];
-    AIDA::IHistogram1D* _histCParam[4];
-    AIDA::IHistogram1D* _histHemiBroadT[4];
-    AIDA::IHistogram1D* _histHemiBroadW[4];
-    AIDA::IHistogram1D* _histY23Durham[4];
-    AIDA::IHistogram1D* _histTMajor[4];
-    AIDA::IHistogram1D* _histTMinor[4];
-    AIDA::IHistogram1D* _histAplanarity[4];
-    AIDA::IHistogram1D* _histSphericity[4];
-    AIDA::IHistogram1D* _histOblateness[4];
-    AIDA::IHistogram1D* _histHemiMassL[4];
-    AIDA::IHistogram1D* _histHemiBroadN[4];
-    AIDA::IHistogram1D* _histDParam[4];
+    double _weightedTotalChargedPartNumLight;
+    double _weightedTotalChargedPartNumCharm;
+    double _weightedTotalChargedPartNumBottom;
     //@}
 
-    /// @name Event shape moment histos at 4 energies
+    /// @name Weights
     //@{
-    AIDA::IHistogram1D* _hist1MinusTMom[4];
-    AIDA::IHistogram1D* _histHemiMassHMom[4];
-    AIDA::IHistogram1D* _histCParamMom[4];
-    AIDA::IHistogram1D* _histHemiBroadTMom[4];
-    AIDA::IHistogram1D* _histHemiBroadWMom[4];
-    AIDA::IHistogram1D* _histY23DurhamMom[4];
-    AIDA::IHistogram1D* _histTMajorMom[4];
-    AIDA::IHistogram1D* _histTMinorMom[4];
-    AIDA::IHistogram1D* _histSphericityMom[4];
-    AIDA::IHistogram1D* _histOblatenessMom[4];
-    AIDA::IHistogram1D* _histHemiMassLMom[4];
-    AIDA::IHistogram1D* _histHemiBroadNMom[4];
+    double _weightLight;
+    double _weightCharm;
+    double _weightBottom;
     //@}
-
   };
 
-
-
   // The hook for the plugin system
-  DECLARE_RIVET_PLUGIN(OPAL_2004_S6132243);
+  DECLARE_RIVET_PLUGIN(DELPHI_2000_S4328825);
 
 }

Modified: trunk/src/Analyses/Makefile.am
==============================================================================
--- trunk/src/Analyses/Makefile.am	Wed Apr 11 15:14:55 2012	(r3671)
+++ trunk/src/Analyses/Makefile.am	Thu Apr 12 09:29:50 2012	(r3672)
@@ -211,6 +211,7 @@
     DELPHI_1995_S3137023.cc \
     DELPHI_1996_S3430090.cc \
     DELPHI_1999_S3960137.cc \
+    DELPHI_2000_S4328825.cc \
     OPAL_1994_S2927284.cc \
     OPAL_1995_S3198391.cc \
     OPAL_1997_S3396100.cc \
@@ -220,6 +221,7 @@
     OPAL_1998_S3780481.cc \
     OPAL_2000_S4418603.cc \
     OPAL_2001_S4553896.cc \
+    OPAL_2002_S5361494.cc \
     OPAL_2004_S6132243.cc \
     SLD_1999_S3743934.cc \
     SLD_2002_S4869273.cc 

Copied and modified: trunk/src/Analyses/OPAL_2002_S5361494.cc (from r3670, trunk/src/Analyses/OPAL_2004_S6132243.cc)
==============================================================================
--- trunk/src/Analyses/OPAL_2004_S6132243.cc	Tue Apr 10 12:33:07 2012	(r3670, copy source)
+++ trunk/src/Analyses/OPAL_2002_S5361494.cc	Thu Apr 12 09:29:50 2012	(r3672)
@@ -10,264 +10,141 @@
 #include "Rivet/Projections/FastJets.hh"
 #include "Rivet/Projections/ParisiTensor.hh"
 #include "Rivet/Projections/Hemispheres.hh"
+#include "Rivet/Projections/InitialQuarks.hh"
 #include <cmath>
 
 namespace Rivet {
 
 
-  /// @brief OPAL event shapes and moments at 91, 133, 177, and 197 GeV
-  /// @author Andy Buckley
-  class OPAL_2004_S6132243 : public Analysis {
+  /// @brief OPAL multiplicities at various energies
+  /// @author Peter Richardson
+  class OPAL_2002_S5361494 : public Analysis {
   public:
 
     /// Constructor
-    OPAL_2004_S6132243()
-      : Analysis("OPAL_2004_S6132243"),
-        _isqrts(-1), _sumWTrack2(0.0), _sumWJet3(0.0)
-    {
-      //
-    }
-
+    OPAL_2002_S5361494()
+      : Analysis("OPAL_2002_S5361494"),
+	_weightedTotalChargedPartNumLight(0.),
+	_weightedTotalChargedPartNumCharm(0.),
+	_weightedTotalChargedPartNumBottom(0.),
+	_weightLight(0.),_weightCharm(0.),_weightBottom(0.)
+    {}
 
     /// @name Analysis methods
     //@{
 
-    /// Energies: 91, 133, 177 (161-183), 197 (189-209) => index 0..4
-    int getHistIndex(double sqrts) {
-      int ih = -1;
-      if (inRange(sqrts/GeV, 89.9, 91.5)) {
-        ih = 0;
-      } else if (fuzzyEquals(sqrts/GeV, 133)) {
-        ih = 1;
-      } else if (fuzzyEquals(sqrts/GeV, 177)) { // (161-183)
-        ih = 2;
-      } else if (fuzzyEquals(sqrts/GeV, 197)) { // (189-209)
-        ih = 3;
-      } else {
-        stringstream ss;
-        ss << "Invalid energy for OPAL_2004 analysis: "
-           << sqrts/GeV << " GeV != 91, 133, 177, or 197 GeV";
-        throw Error(ss.str());
-      }
-      assert(ih >= 0);
-      return ih;
-    }
-
 
     void init() {
       // Projections
       addProjection(Beam(), "Beams");
-      const FinalState fs;
-      addProjection(fs, "FS");
-      const ChargedFinalState cfs;
-      addProjection(cfs, "CFS");
-      addProjection(FastJets(fs, FastJets::DURHAM, 0.7), "DurhamJets");
-      addProjection(Sphericity(fs), "Sphericity");
-      addProjection(ParisiTensor(fs), "Parisi");
-      const Thrust thrust(fs);
-      addProjection(thrust, "Thrust");
-      addProjection(Hemispheres(thrust), "Hemispheres");
-
-      // Get beam energy index
-      _isqrts = getHistIndex(sqrtS());
-
-      // Book histograms
-      _hist1MinusT[_isqrts]    = bookHistogram1D(1, 1, _isqrts+1);
-      _histHemiMassH[_isqrts]  = bookHistogram1D(2, 1, _isqrts+1);
-      _histCParam[_isqrts]     = bookHistogram1D(3, 1, _isqrts+1);
-      _histHemiBroadT[_isqrts] = bookHistogram1D(4, 1, _isqrts+1);
-      _histHemiBroadW[_isqrts] = bookHistogram1D(5, 1, _isqrts+1);
-      _histY23Durham[_isqrts]  = bookHistogram1D(6, 1, _isqrts+1);
-      _histTMajor[_isqrts]     = bookHistogram1D(7, 1, _isqrts+1);
-      _histTMinor[_isqrts]     = bookHistogram1D(8, 1, _isqrts+1);
-      _histAplanarity[_isqrts] = bookHistogram1D(9, 1, _isqrts+1);
-      _histSphericity[_isqrts] = bookHistogram1D(10, 1, _isqrts+1);
-      _histOblateness[_isqrts] = bookHistogram1D(11, 1, _isqrts+1);
-      _histHemiMassL[_isqrts]  = bookHistogram1D(12, 1, _isqrts+1);
-      _histHemiBroadN[_isqrts] = bookHistogram1D(13, 1, _isqrts+1);
-      _histDParam[_isqrts]     = bookHistogram1D(14, 1, _isqrts+1);
-      //
-      _hist1MinusTMom[_isqrts]    = bookHistogram1D(15, 1, _isqrts+1);
-      _histHemiMassHMom[_isqrts]  = bookHistogram1D(16, 1, _isqrts+1);
-      _histCParamMom[_isqrts]     = bookHistogram1D(17, 1, _isqrts+1);
-      _histHemiBroadTMom[_isqrts] = bookHistogram1D(18, 1, _isqrts+1);
-      _histHemiBroadWMom[_isqrts] = bookHistogram1D(19, 1, _isqrts+1);
-      _histY23DurhamMom[_isqrts]  = bookHistogram1D(20, 1, _isqrts+1);
-      _histTMajorMom[_isqrts]     = bookHistogram1D(21, 1, _isqrts+1);
-      _histTMinorMom[_isqrts]     = bookHistogram1D(22, 1, _isqrts+1);
-      _histSphericityMom[_isqrts] = bookHistogram1D(23, 1, _isqrts+1);
-      _histOblatenessMom[_isqrts] = bookHistogram1D(24, 1, _isqrts+1);
-      _histHemiMassLMom[_isqrts]  = bookHistogram1D(25, 1, _isqrts+1);
-      _histHemiBroadNMom[_isqrts] = bookHistogram1D(26, 1, _isqrts+1);
+      addProjection(ChargedFinalState(), "CFS");
+      addProjection(InitialQuarks(), "IQF");
+
     }
 
 
     void analyze(const Event& event) {
+      const double weight = event.weight();
       // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
       const FinalState& cfs = applyProjection<FinalState>(event, "CFS");
       if (cfs.size() < 2) vetoEvent;
 
-      // Increment passed-cuts weight sum
-      const double weight = event.weight();
-      _sumWTrack2 += weight;
-
-      // Thrusts
-      const Thrust& thrust = applyProjection<Thrust>(event, "Thrust");
-      _hist1MinusT[_isqrts]->fill(1-thrust.thrust(), weight);
-      _histTMajor[_isqrts]->fill(thrust.thrustMajor(), weight);
-      _histTMinor[_isqrts]->fill(thrust.thrustMinor(), weight);
-      _histOblateness[_isqrts]->fill(thrust.oblateness(), weight);
-      for (int n = 1; n <= 5; ++n) {
-        _hist1MinusTMom[_isqrts]->fill(n, pow(1-thrust.thrust(), n)*weight);
-        _histTMajorMom[_isqrts]->fill(n, pow(thrust.thrustMajor(), n)*weight);
-        _histTMinorMom[_isqrts]->fill(n, pow(thrust.thrustMinor(), n)*weight);
-        _histOblatenessMom[_isqrts]->fill(n, pow(thrust.oblateness(), n)*weight);
-      }
 
-      // Jets
-      const FastJets& durjet = applyProjection<FastJets>(event, "DurhamJets");
-      if (durjet.clusterSeq()) {
-        _sumWJet3 += weight;
-        const double y23 = durjet.clusterSeq()->exclusive_ymerge_max(2);
-        _histY23Durham[_isqrts]->fill(y23, weight);
-        for (int n = 1; n <= 5; ++n) {
-          _histY23DurhamMom[_isqrts]->fill(n, pow(y23, n)*weight);
+      int flavour = 0;
+      const InitialQuarks& iqf = applyProjection<InitialQuarks>(event, "IQF");
+      
+      // If we only have two quarks (qqbar), just take the flavour.
+      // If we have more than two quarks, look for the highest energetic q-qbar pair.
+      if (iqf.particles().size() == 2) {
+        flavour = abs( iqf.particles().front().pdgId() );
+      }
+      else {
+        map<int, double> quarkmap;
+        foreach (const Particle& p, iqf.particles()) {
+          if (quarkmap[p.pdgId()] < p.momentum().E()) {
+            quarkmap[p.pdgId()] = p.momentum().E();
+          }
+        }
+        double maxenergy = 0.;
+        for (int i = 1; i <= 5; ++i) {
+          if (quarkmap[i]+quarkmap[-i] > maxenergy) {
+            flavour = i;
+          }
         }
       }
-
-      // Sphericities
-      const Sphericity& sphericity = applyProjection<Sphericity>(event, "Sphericity");
-      const double sph = sphericity.sphericity();
-      const double apl = sphericity.aplanarity();
-      _histSphericity[_isqrts]->fill(sph, weight);
-      _histAplanarity[_isqrts]->fill(apl, weight);
-      for (int n = 1; n <= 5; ++n) {
-        _histSphericityMom[_isqrts]->fill(n, pow(sph, n)*weight);
-      }
-
-      // C & D params
-      const ParisiTensor& parisi = applyProjection<ParisiTensor>(event, "Parisi");
-      const double cparam = parisi.C();
-      const double dparam = parisi.D();
-      _histCParam[_isqrts]->fill(cparam, weight);
-      _histDParam[_isqrts]->fill(dparam, weight);
-      for (int n = 1; n <= 5; ++n) {
-        _histCParamMom[_isqrts]->fill(n, pow(cparam, n)*weight);
+      const size_t numParticles = cfs.particles().size();
+      switch (flavour) {
+      case 1: case 2: case 3:
+	_weightLight  += weight;
+        _weightedTotalChargedPartNumLight  += numParticles * weight;
+        break;
+      case 4:
+	_weightCharm  += weight;
+        _weightedTotalChargedPartNumCharm  += numParticles * weight;
+        break;
+      case 5:
+	_weightBottom += weight;
+        _weightedTotalChargedPartNumBottom += numParticles * weight;
+        break;
       }
 
-      // Hemispheres
-      const Hemispheres& hemi = applyProjection<Hemispheres>(event, "Hemispheres");
-      // The paper says that M_H/L are scaled by sqrt(s), but scaling by E_vis is the way that fits the data...
-      const double hemi_mh = hemi.scaledMhigh();
-      const double hemi_ml = hemi.scaledMlow();
-      /// @todo This shouldn't be necessary... what's going on? Memory corruption suspected :(
-      // if (isnan(hemi_ml)) {
-      //   MSG_ERROR("NaN in HemiL! Event = " << numEvents());
-      //   MSG_ERROR(hemi.M2low() << ", " << hemi.E2vis());
-      // }
-      if (!std::isnan(hemi_mh) && !std::isnan(hemi_ml)) {
-        const double hemi_bmax = hemi.Bmax();
-        const double hemi_bmin = hemi.Bmin();
-        const double hemi_bsum = hemi.Bsum();
-        _histHemiMassH[_isqrts]->fill(hemi_mh, weight);
-        _histHemiMassL[_isqrts]->fill(hemi_ml, weight);
-        _histHemiBroadW[_isqrts]->fill(hemi_bmax, weight);
-        _histHemiBroadN[_isqrts]->fill(hemi_bmin, weight);
-        _histHemiBroadT[_isqrts]->fill(hemi_bsum, weight);
-        for (int n = 1; n <= 5; ++n) {
-          // if (isnan(pow(hemi_ml, n))) MSG_ERROR("NaN in HemiL moment! Event = " << numEvents());
-          _histHemiMassHMom[_isqrts]->fill(n, pow(hemi_mh, n)*weight);
-          _histHemiMassLMom[_isqrts]->fill(n, pow(hemi_ml, n)*weight);
-          _histHemiBroadWMom[_isqrts]->fill(n, pow(hemi_bmax, n)*weight);
-          _histHemiBroadNMom[_isqrts]->fill(n, pow(hemi_bmin, n)*weight);
-          _histHemiBroadTMom[_isqrts]->fill(n, pow(hemi_bsum, n)*weight);
-        }
-      }
     }
 
 
     void finalize() {
-      scale(_hist1MinusT[_isqrts], 1.0/_sumWTrack2);
-      scale(_histTMajor[_isqrts], 1.0/_sumWTrack2);
-      scale(_histTMinor[_isqrts], 1.0/_sumWTrack2);
-      scale(_histOblateness[_isqrts], 1.0/_sumWTrack2);
-      scale(_histSphericity[_isqrts], 1.0/_sumWTrack2);
-      scale(_histAplanarity[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiMassH[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiMassL[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiBroadW[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiBroadN[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiBroadT[_isqrts], 1.0/_sumWTrack2);
-      scale(_histCParam[_isqrts], 1.0/_sumWTrack2);
-      scale(_histDParam[_isqrts], 1.0/_sumWTrack2);
-      scale(_histY23Durham[_isqrts], 1.0/_sumWJet3);
-      //
-      scale(_hist1MinusTMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histTMajorMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histTMinorMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histOblatenessMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histSphericityMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiMassHMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiMassLMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiBroadWMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiBroadNMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histHemiBroadTMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histCParamMom[_isqrts], 1.0/_sumWTrack2);
-      scale(_histY23DurhamMom[_isqrts], 1.0/_sumWJet3);
+      // bottom
+      const double avgNumPartsBottom = _weightedTotalChargedPartNumBottom / _weightBottom;
+      AIDA::IDataPointSet * multB = bookDataPointSet(1, 1, 1);
+      for (int i = 0; i < multB->size(); ++i) {
+        if (fuzzyEquals(sqrtS(), multB->point(i)->coordinate(0)->value(), 0.01)) {
+          multB->point(i)->coordinate(1)->setValue(avgNumPartsBottom);
+        }
+      }
+      // charm
+      const double avgNumPartsCharm = _weightedTotalChargedPartNumCharm / _weightCharm;
+      AIDA::IDataPointSet * multC = bookDataPointSet(1, 1, 2);
+      for (int i = 0; i < multC->size(); ++i) {
+        if (fuzzyEquals(sqrtS(), multC->point(i)->coordinate(0)->value(), 0.01)) {
+          multC->point(i)->coordinate(1)->setValue(avgNumPartsCharm);
+        }
+      }
+      // light
+      const double avgNumPartsLight = _weightedTotalChargedPartNumLight / _weightLight;
+      AIDA::IDataPointSet * multL = bookDataPointSet(1, 1, 3);
+      for (int i = 0; i < multL->size(); ++i) {
+        if (fuzzyEquals(sqrtS(), multL->point(i)->coordinate(0)->value(), 0.01)) {
+          multL->point(i)->coordinate(1)->setValue(avgNumPartsLight);
+        }
+      }
+      // bottom-light
+      AIDA::IDataPointSet * multD = bookDataPointSet(1, 1, 4);
+      for (int i = 0; i < multD->size(); ++i) {
+        if (fuzzyEquals(sqrtS(), multD->point(i)->coordinate(0)->value(), 0.01)) {
+          multD->point(i)->coordinate(1)->setValue(avgNumPartsBottom-avgNumPartsLight);
+        }
+      }
     }
-
     //@}
 
 
   private:
 
-    /// Beam energy index for histograms
-    int _isqrts;
-
-    /// @name Counters of event weights passing the cuts
-    //@{
-    double _sumWTrack2, _sumWJet3;
-    //@}
-
-    /// @name Event shape histos at 4 energies
+    /// @name Multiplicities
     //@{
-    AIDA::IHistogram1D* _hist1MinusT[4];
-    AIDA::IHistogram1D* _histHemiMassH[4];
-    AIDA::IHistogram1D* _histCParam[4];
-    AIDA::IHistogram1D* _histHemiBroadT[4];
-    AIDA::IHistogram1D* _histHemiBroadW[4];
-    AIDA::IHistogram1D* _histY23Durham[4];
-    AIDA::IHistogram1D* _histTMajor[4];
-    AIDA::IHistogram1D* _histTMinor[4];
-    AIDA::IHistogram1D* _histAplanarity[4];
-    AIDA::IHistogram1D* _histSphericity[4];
-    AIDA::IHistogram1D* _histOblateness[4];
-    AIDA::IHistogram1D* _histHemiMassL[4];
-    AIDA::IHistogram1D* _histHemiBroadN[4];
-    AIDA::IHistogram1D* _histDParam[4];
+    double _weightedTotalChargedPartNumLight;
+    double _weightedTotalChargedPartNumCharm;
+    double _weightedTotalChargedPartNumBottom;
     //@}
 
-    /// @name Event shape moment histos at 4 energies
+    /// @name Weights
     //@{
-    AIDA::IHistogram1D* _hist1MinusTMom[4];
-    AIDA::IHistogram1D* _histHemiMassHMom[4];
-    AIDA::IHistogram1D* _histCParamMom[4];
-    AIDA::IHistogram1D* _histHemiBroadTMom[4];
-    AIDA::IHistogram1D* _histHemiBroadWMom[4];
-    AIDA::IHistogram1D* _histY23DurhamMom[4];
-    AIDA::IHistogram1D* _histTMajorMom[4];
-    AIDA::IHistogram1D* _histTMinorMom[4];
-    AIDA::IHistogram1D* _histSphericityMom[4];
-    AIDA::IHistogram1D* _histOblatenessMom[4];
-    AIDA::IHistogram1D* _histHemiMassLMom[4];
-    AIDA::IHistogram1D* _histHemiBroadNMom[4];
+    double _weightLight;
+    double _weightCharm;
+    double _weightBottom;
     //@}
-
   };
 
-
-
   // The hook for the plugin system
-  DECLARE_RIVET_PLUGIN(OPAL_2004_S6132243);
+  DECLARE_RIVET_PLUGIN(OPAL_2002_S5361494);
 
 }


More information about the Rivet-svn mailing list