rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

OPAL_2002_S5361494

Charged particle multiplicities in heavy and light quark initiated events above the $Z^0$ peak
Experiment: OPAL (LEP 2)
Inspire ID: 601225
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Lett. B550 (2002) 33-46
  • hep-ex/0211007
Beams: e+ e-
Beam energies: (65.0, 65.0); (68.0, 68.0); (80.5, 80.5); (86.0, 86.0); (91.5, 91.5); (94.5, 94.5); (96.0, 96.0); (98.0, 98.0); (100.0, 100.0); (101.0, 101.0); (103.0, 103.0) GeV
Run details:
  • Hadronic Z decay events generated above the Z pole

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.

Source code: OPAL_2002_S5361494.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/Beam.hh"
  4#include "Rivet/Projections/ChargedFinalState.hh"
  5#include <cmath>
  6
  7#define I_KNOW_THE_INITIAL_QUARKS_PROJECTION_IS_DODGY_BUT_NEED_TO_USE_IT
  8#include "Rivet/Projections/InitialQuarks.hh"
  9
 10namespace Rivet {
 11
 12
 13  /// @brief OPAL multiplicities at various energies
 14  ///
 15  /// @author Peter Richardson
 16  class OPAL_2002_S5361494 : public Analysis {
 17  public:
 18
 19    RIVET_DEFAULT_ANALYSIS_CTOR(OPAL_2002_S5361494);
 20
 21
 22    /// @name Analysis methods
 23    /// @{
 24
 25    void init() {
 26      // Projections
 27      declare(Beam(), "Beams");
 28      declare(ChargedFinalState(), "CFS");
 29      declare(InitialQuarks(), "IQF");
 30
 31      // Histograms
 32      book(_cLight, "TMP/CLIGHT" );
 33      book(_wLight, "TMP/WLIGHT" );
 34      book(_cCharm, "TMP/CCHARM" );
 35      book(_wCharm, "TMP/WCHARM" );
 36      book(_cBottom, "TMP/CBOTTOM");
 37      book(_wBottom, "TMP/WBOTTOM");
 38    }
 39
 40
 41    void analyze(const Event& event) {
 42      // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
 43      const FinalState& cfs = apply<FinalState>(event, "CFS");
 44      if (cfs.size() < 2) vetoEvent;
 45
 46      int flavour = 0;
 47      const InitialQuarks& iqf = apply<InitialQuarks>(event, "IQF");
 48
 49      // If we only have two quarks (qqbar), just take the flavour.
 50      // If we have more than two quarks, look for the highest energetic q-qbar pair.
 51      if (iqf.particles().size() == 2) {
 52        flavour = iqf.particles().front().abspid();
 53      }
 54      else {
 55        map<int, double> quarkmap;
 56        for (const Particle& p : iqf.particles()) {
 57          if (quarkmap[p.pid()] < p.E()) {
 58            quarkmap[p.pid()] = p.E();
 59          }
 60        }
 61        double maxenergy = 0.;
 62        for (int i = 1; i <= 5; ++i) {
 63          if (quarkmap[i]+quarkmap[-i] > maxenergy) {
 64            flavour = i;
 65          }
 66        }
 67      }
 68      const size_t numParticles = cfs.particles().size();
 69      switch (flavour) {
 70      case 1: case 2: case 3:
 71        _wLight ->fill();
 72        _cLight ->fill(numParticles);
 73        break;
 74      case 4:
 75        _wCharm ->fill();
 76        _cCharm ->fill(numParticles);
 77        break;
 78      case 5:
 79        _wBottom->fill();
 80        _cBottom->fill(numParticles);
 81        break;
 82      }
 83
 84    }
 85
 86
 87    void finalize() {
 88      // calculate the averages and diffs
 89      if(_wLight ->numEntries()) scale( _cLight, 1./_wLight->val());
 90      if(_wCharm ->numEntries()) scale( _cCharm, 1./_wCharm->val());
 91      if(_wBottom->numEntries()) scale(_cBottom,1./_wBottom->val());
 92      Counter _cDiff = *_cBottom - *_cLight;
 93
 94      // fill the histograms
 95      for (unsigned int ix=1;ix<5;++ix) {
 96        double val(0.), err(0.0);
 97        if(ix==1) {
 98          val = _cBottom->val();
 99          err = _cBottom->err();
100        }
101        else if(ix==2) {
102          val = _cCharm->val();
103          err = _cCharm->err();
104        }
105        else if(ix==3) {
106          val = _cLight->val();
107          err = _cLight->err();
108        }
109        else if(ix==4) {
110          val = _cDiff.val();
111          err = _cDiff.err();
112        }
113
114        /// @todo TIDY!
115        Scatter2D temphisto(refData(1, 1, ix));
116        Scatter2DPtr mult;
117        book(mult, 1, 1, ix);
118        for (size_t b = 0; b < temphisto.numPoints(); b++) {
119          const double x  = temphisto.point(b).x();
120          pair<double,double> ex = temphisto.point(b).xErrs();
121          pair<double,double> ex2 = ex;
122          if(ex2.first ==0.) ex2. first=0.0001;
123          if(ex2.second==0.) ex2.second=0.0001;
124          if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
125            mult->addPoint(x, val, ex, make_pair(err,err));
126          } else {
127            mult->addPoint(x, 0., ex, make_pair(0.,.0));
128          }
129        }
130      }
131    }
132
133    /// @}
134
135
136  private:
137
138    /// @name Multiplicities
139    /// @todo Don't we have a Dbn1D-like type that can do both at once?
140    /// @{
141    CounterPtr _cLight, _wLight;
142    CounterPtr _cCharm, _wCharm;
143    CounterPtr _cBottom, _wBottom;
144    /// @}
145
146  };
147
148
149
150  RIVET_DECLARE_ALIASED_PLUGIN(OPAL_2002_S5361494, OPAL_2002_I601225);
151
152}