Rivet analyses


title: CLEO_1983_I188805

Measurement of the hadronic cross section between9.46 and 10.355 GeV

Experiment: CLEO (CESR)

Inspire ID: 188805

Status: VALIDATED

Authors: - Peter Richardson

References: - Phys.Rev.Lett. 50 (1983) 807

Beams: e- e+

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

Run details: - e+e- to hadrons

Measurement of the hadronic cross section between 9.46 and 10.355 GeV

Source code:CLEO_1983_I188805.cc

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

include "Rivet/Analysis.hh"

include "Rivet/Projections/FinalState.hh"

namespace Rivet {

/// @brief Hadronic cross section class CLEO_1983_I188805 : public Analysis { public:

/// Constructor
RIVET_DEFAULT_ANALYSIS_CTOR(CLEO_1983_I188805);


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

/// Book histograms and initialise projections before the run
void init() {
  declare(FinalState(), "FS");
  // Book histograms
  book(_c_hadrons, 1, 1, 1);
  for (const string& en : _c_hadrons.binning().edges<0>()) {
    double eval = stod(en);
    if (isCompatibleWithSqrtS(eval)) {
      _sqs = en;
      break;
    }
  }
  raiseBeamErrorIf(_sqs.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])
    vetoEvent;
  else { // everything else
    _c_hadrons->fill(_sqs);
  }
}


/// Normalise histograms etc., after the run
void finalize() {
  scale(_c_hadrons, crossSection() / sumOfWeights() / nanobarn);
}

/// @}


/// @name Histograms
/// @{
BinnedHistoPtr<string> _c_hadrons, _c_muons;
string _sqs = "";
/// @}

};

RIVET_DECLARE_PLUGIN(CLEO_1983_I188805);

} ```