rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

OPAL_2001_I536266

Charged particle multiplicities for u, d, s events at the Z pole
Experiment: OPAL (LEP)
Inspire ID: 536266
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Eur.Phys.J. C19 (2001) 257-268
Beams: e+ e-
Beam energies: (45.6, 45.6) GeV
Run details:
  • Hadronic Z decay events at the Z pole

Measurements of the mean charged multiplicities separately for $d\bar d$, $u\bar u$ and $s\bar s$ initiated events in $e^+e^-$ interactions at the $Z^0$ mass.

Source code: OPAL_2001_I536266.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/Beam.hh"
  4#include "Rivet/Projections/ChargedFinalState.hh"
  5
  6#define I_KNOW_THE_INITIAL_QUARKS_PROJECTION_IS_DODGY_BUT_NEED_TO_USE_IT
  7#include "Rivet/Projections/InitialQuarks.hh"
  8
  9namespace Rivet {
 10
 11
 12  /// @brief multiplicities in u, d, s events
 13  class OPAL_2001_I536266 : public Analysis {
 14  public:
 15
 16    /// Constructor
 17    RIVET_DEFAULT_ANALYSIS_CTOR(OPAL_2001_I536266);
 18
 19
 20    /// @name Analysis methods
 21    //@{
 22
 23    /// Book histograms and initialise projections before the run
 24    void init() {
 25      // Projections
 26      declare(Beam(), "Beams");
 27      declare(ChargedFinalState(), "CFS");
 28      declare(InitialQuarks(), "IQF");
 29      book(_cDown   , "/TMP/CDOWN"   );
 30      book(_cUp     , "/TMP/CUP"     );
 31      book(_cStrange, "/TMP/CSTRANGE");
 32      book(_wDown   , "/TMP/WDOWN"   );
 33      book(_wUp     , "/TMP/WUP"     );
 34      book(_wStrange, "/TMP/WSTRANGE");
 35    }
 36
 37
 38    /// Perform the per-event analysis
 39    void analyze(const Event& event) {
 40      // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
 41      const FinalState& cfs = apply<FinalState>(event, "CFS");
 42      if (cfs.size() < 2) vetoEvent;
 43
 44
 45      int flavour = 0;
 46      const InitialQuarks& iqf = apply<InitialQuarks>(event, "IQF");
 47
 48      // If we only have two quarks (qqbar), just take the flavour.
 49      // If we have more than two quarks, look for the highest energetic q-qbar pair.
 50      if (iqf.particles().size() == 2) {
 51        flavour = iqf.particles().front().abspid();
 52      }
 53      else {
 54        map<int, double> quarkmap;
 55        for (const Particle& p : iqf.particles()) {
 56          if (quarkmap[p.pid()] < p.E()) {
 57            quarkmap[p.pid()] = p.E();
 58          }
 59        }
 60        double maxenergy = 0.;
 61        for (int i = 1; i <= 5; ++i) {
 62          if (quarkmap[i]+quarkmap[-i] > maxenergy) {
 63            flavour = i;
 64          }
 65        }
 66      }
 67      const size_t numParticles = cfs.particles().size();
 68      switch (flavour) {
 69      case 1:
 70	_wDown->fill();
 71        _cDown->fill(numParticles);
 72        break;
 73      case 2:
 74        _wUp->fill();
 75	_cUp->fill(numParticles);
 76        break;
 77      case 3:
 78        _wStrange->fill();
 79        _cStrange->fill(numParticles);
 80        break;
 81      }
 82    }
 83
 84
 85    /// Normalise histograms etc., after the run
 86    void finalize() {
 87      // calculate the averages and ratios
 88      if(_wUp      ->effNumEntries()!=0. ) scale( _cUp     , 1./ *_wUp);
 89      if(_wDown    ->effNumEntries()!=0. ) scale( _cDown   , 1./ *_wDown);
 90      if(_wStrange ->effNumEntries()!=0. ) scale( _cStrange, 1./ *_wStrange);
 91      for(unsigned int ix=1;ix<3;++ix) {
 92	for(unsigned int iy=1;iy<4;++iy) {
 93	  double val;
 94	  std::pair<double,double> errs;
 95	  if(ix==1) {
 96	    CounterPtr cTemp;
 97	    if(iy==1)      cTemp = _cUp;
 98	    else if(iy==2) cTemp = _cDown;
 99	    else if(iy==3) cTemp = _cStrange;
100	    val  = cTemp->val();
101	    errs = make_pair(cTemp->err(),cTemp->err()); 
102	  }
103	  else {
104	    Scatter1D temp;
105	    if(iy==1)      temp = *_cUp     / *_cDown;
106	    else if(iy==2) temp = *_cStrange/ *_cDown;
107	    else if(iy==3) temp = *_cStrange/ *_cUp  ;
108	    val  = temp.points()[0].x();
109	    errs = temp.points()[0].xErrs(); 
110	  }
111	  Scatter2DPtr  mult;
112	  book(mult, ix, 1, iy);
113	  mult->addPoint(45.6, val, make_pair(0.5,0.5), errs);
114	}
115      }
116    }
117
118    //@}
119
120    /// @name Multiplicities
121    //@{
122    CounterPtr _cDown;
123    CounterPtr _cUp;
124    CounterPtr _cStrange;
125    //@}
126
127    /// @name Weights
128    //@{
129    CounterPtr _wDown;
130    CounterPtr _wUp;
131    CounterPtr _wStrange;
132    //@}
133
134
135  };
136
137
138  // The hook for the plugin system
139  RIVET_DECLARE_PLUGIN(OPAL_2001_I536266);
140
141
142}