Rivet analyses


title: DESY147_1978_I131524

Measurement of $R$ for energies between 9.41 and 10.63 GeV

Experiment: DESY147 (DORIS)

Inspire ID: 131524

Status: VALIDATED

Authors: - Peter Richardson

References: - Phys.Lett. B78 (1978) 360-363, 1978

Beams: e- e+

Beam energies: (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (5.0, 5.0); (4.7, 4.7); (4.7, 4.7); (4.7, 4.7); (4.7, 4.7); (4.7, 4.7); (4.7, 4.7); (4.7, 4.7); (4.7, 4.7); (4.7, 4.7); (4.8, 4.8); (4.8, 4.8); (5.0, 5.0)GeV

Run details: - e+ e- to hadrons and e+ e- to mu+ mu- (for normalization)

Measurement of $R$ in $e^+e^-$ collisions for energies between 9.41 and 9.51, and 9.98 and 10.63 GeV. The individual hadronic and muonic cross sections are also outputted to the yoda file so that ratio $R$ can be recalculated if runs are combined.

Source code:DESY147_1978_I131524.cc

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

include "Rivet/Analysis.hh"

include "Rivet/Projections/FinalState.hh"

namespace Rivet {

/// @brief R measurement class DESY147_1978_I131524 : public Analysis { public:

/// Constructor
RIVET_DEFAULT_ANALYSIS_CTOR(DESY147_1978_I131524);


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

/// Book histograms and initialise projections before the run
void init() {
  // Initialise and register projections
  declare(FinalState(), "FS");

  // Book histograms
  for (size_t ix = 0; ix < 2; ++ix) {
    const auto& ref = refData<YODA::BinnedEstimate<string>>(1 + ix, 1, 1);
    book(_c_hadrons[ix], "/TMP/sigma_hadrons_" + toString(ix + 1), ref);
    book(_c_muons[ix], "/TMP/sigma_muons_" + toString(ix + 1), ref);
    for (const string& en : _c_hadrons[ix].binning().edges<0>()) {
      double eval = stod(en);
      if (isCompatibleWithSqrtS(eval)) {
        _sqs[ix] = en;
        break;
      }
    }
  }
  raiseBeamErrorIf(_sqs[0].empty() && _sqs[1].empty());
}


/// Perform the per-event analysis
void analyze(const Event& event) {
  const FinalState& fs = apply<FinalState>(event, "FS");

  map<long, int> nCount;
  int ntotal(0);
  for (const Particle& p : fs.particles()) {
    nCount[p.pid()] += 1;
    ++ntotal;
  }
  // mu+mu- + photons
  if (nCount[-13] == 1 and nCount[13] == 1 && ntotal == 2 + nCount[22]) {
    for (size_t ix = 0; ix < 2; ++ix) _c_muons[ix]->fill(_sqs[ix]);
  }
  // everything else
  else {
    for (size_t ix = 0; ix < 2; ++ix) _c_hadrons[ix]->fill(_sqs[ix]);
  }
}


/// Normalise histograms etc., after the run
void finalize() {
  for (size_t ix = -0; ix < 2; ++ix) {
    BinnedEstimatePtr<string> mult;
    book(mult, 1 + ix, 1, 1);
    divide(_c_hadrons[ix], _c_muons[ix], mult);
  }
}

/// @}


/// @name Histograms
/// @{
BinnedHistoPtr<string> _c_hadrons[2], _c_muons[2];
string _sqs[2];
/// @}

};

RIVET_DECLARE_PLUGIN(DESY147_1978_I131524);

} ```