Rivet analyses


title: TASSO_1989_I277658

Hadronic charged multiplicity measurement between 14 and 43.6 GeV

Experiment: TASSO (PEP)

Inspire ID: 277658

Status: VALIDATED

Authors: - Peter Richardson

References: - Z.Phys. C45 (1989) 193

Beams: e+ e-

Beam energies: (7.0, 7.0); (11.0, 11.0); (17.4, 17.4); (21.8, 21.8)GeV

Run details: - Hadronic e+ e- events generated below the Z pole.

The charged particle multiplicity distribution of hadronic $e^+e^-$ events as measured between 14 and 43.6 GeV using the TASSO detector at PEP.

Source code:TASSO_1989_I277658.cc

```c++ // -- C++ --

include "Rivet/Analysis.hh"

include "Rivet/Projections/ChargedFinalState.hh"

namespace Rivet {

/// @brief Add a short analysis description here class TASSO_1989_I277658 : public Analysis { public:

/// Constructor
RIVET_DEFAULT_ANALYSIS_CTOR(TASSO_1989_I277658);


/// @name Analysis methods
/// @{

/// Book histograms and initialise projections before the run
void init() {
  const ChargedFinalState cfs;
  declare(cfs, "CFS");

  size_t ih = 0;
  for (double eVal : allowedEnergies()) {
    const string en = toString(round(eVal / MeV));
    if (isCompatibleWithSqrtS(eVal)) {
      _sqs = en;
      _ie = ih + 1;
    }
    book(_h[en], 5, 1, ++ih);
    book(_c[en], "_sumW_" + en);
  }
  raiseBeamErrorIf(_sqs.empty());
  book(_p, 2, 1, 1);
}


/// Perform the per-event analysis
void analyze(const Event& event) {
  if (Ecm == "") Ecm = _p->bin(_ie).xEdge();
  const FinalState& cfs = apply<FinalState>(event, "CFS");
  MSG_DEBUG("Total charged multiplicity = " << cfs.size());
  _c[_sqs]->fill();
  _h[_sqs]->fill(cfs.size());
  _p->fill(Ecm, cfs.size());
}


/// Normalise histograms etc., after the run
void finalize() {
  scale(_h, crossSectionPerEvent());
  scale(_c, crossSectionPerEvent());
  for (auto& item : _h) {
    const double w = _c[item.first]->sumW();
    if (!isZero(w)) scale(item.second, 1.0 / w);
  }
}

/// @}

private:

/// @name Histograms
/// @{
map<string, BinnedHistoPtr<int>> _h;
BinnedProfilePtr<string> _p;
map<string, CounterPtr> _c;
string Ecm = "", _sqs = "";
size_t _ie = 0;
/// @}

};

RIVET_DECLARE_PLUGIN(TASSO_1989_I277658);

} ```