Rivet analyses


title: CMD3_2019_I1740541

Cross section for $e^+e^-\to\phi\eta$ for energies below 2 GeV

Experiment: CMD3 (VEPP-2M)

Inspire ID: 1740541

Status: VALIDATED

Authors: - Peter Richardson

References: - arXiv: 1906.08006

Beams: e+ e-

Beam energies: ANY

Run details: - e+ e- to hadrons

Measurement of the cross section for $e^+e^-\to K^+K^-\eta$, which is found to be saturated by the resonant $\phi\eta$ sub-process, and therefore only the cross section for $e^+e^-\to\phi\eta$ for energies below 2 GeV is extracted by the CMD3 experiment

Source code:CMD3_2019_I1740541.cc

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

include "Rivet/Analysis.hh"

include "Rivet/Projections/FinalState.hh"

include "Rivet/Projections/UnstableParticles.hh"

namespace Rivet {

/// @brief phi eta cross section class CMD3_2019_I1740541 : public Analysis { public:

/// Constructor
RIVET_DEFAULT_ANALYSIS_CTOR(CMD3_2019_I1740541);


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

/// Book histograms and initialise projections before the run
void init() {

  // Initialise and register projections
  declare(FinalState(), "FS");
  declare(UnstableParticles(), "UFS");
  for (size_t ix = 0; ix < 3; ++ix) {
    book(_c_phi[ix], 1 + ix, 1, 6);
    for (const string& en : _c_phi[ix].binning().edges<0>()) {
      const double eval = stod(en) * GeV;
      if (isCompatibleWithSqrtS(eval)) {
        _sqs[ix] = en;
        break;
      }
    }
  }
  raiseBeamErrorIf(_sqs[0].empty() && _sqs[1].empty() && _sqs[2].empty());
}

void findChildren(const Particle& p, map<long, int>& nRes, int& ncount) const {
  for (const Particle& child : p.children()) {
    if (child.children().empty()) {
      --nRes[child.pid()];
      --ncount;
    }
    else
      findChildren(child, nRes, ncount);
  }
}

/// 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;
  }
  const FinalState& ufs = apply<FinalState>(event, "UFS");
  for (const Particle& p : ufs.particles(Cuts::pid == 221)) {
    if (p.children().empty()) continue;
    map<long, int> nRes = nCount;
    int ncount = ntotal;
    findChildren(p, nRes, ncount);
    bool matched = false;
    for (const Particle& p2 : ufs.particles(Cuts::pid == 333)) {
      map<long, int> nResB = nRes;
      int ncountB = ncount;
      findChildren(p2, nResB, ncountB);
      if (ncountB != 0) continue;
      bool matched = true;
      for (const auto& val : nResB) {
        if (val.second != 0) {
          matched = false;
          break;
        }
      }
      if (matched) {
        for (size_t ix = 0; ix < 3; ++ix) {
          _c_phi[ix]->fill(_sqs[ix]);
        }
        break;
      }
    }
    if (matched) break;
  }
}


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

/// @}


/// @name Histograms
/// @{
BinnedHistoPtr<string> _c_phi[3];
string _sqs[3];
/// @}

};

RIVET_DECLARE_PLUGIN(CMD3_2019_I1740541); } ```