Rivet analyses


title: BESIII_2021_I1868813

Cross section for $K^0_S$ production for energies between 3.645 and 3.7 GeV

Experiment: BESIII (BEPC)

Inspire ID: 1868813

Status: VALIDATED

Authors: - Peter Richardson

References: - Phys.Lett.B 820 (2021) 136576

Beams: e- e+

Beam energies: (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.9, 1.9)GeV

Run details: - e+ e- to hadrons

Cross section for the production of $K^0_S$ for energies between 3.645 and 3.7, i.e near the $\psi(2S)$ resonace measured by BESIII.

Source code:BESIII_2021_I1868813.cc

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

include "Rivet/Analysis.hh"

include "Rivet/Projections/UnstableParticles.hh"

namespace Rivet {

/// @brief kaon production at low energies class BESIII_2021_I1868813 : public Analysis { public:

/// Constructor
RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2021_I1868813);


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

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

  // Initialise and register projections
  declare(UnstableParticles(), "UFS");
  book(_c_kaons, "TMP/nK", refData<YODA::BinnedEstimate<string>>(1, 1, 1));

  for (const string& en : _c_kaons.binning().edges<0>()) {
    const double eval = stod(en) * GeV;
    if (isCompatibleWithSqrtS(eval)) {
      _sqs = en;
      break;
    }
  }
  raiseBeamErrorIf(_sqs.empty());
}


/// Perform the per-event analysis
void analyze(const Event& event) {
  const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
  unsigned int count = ufs.particles(Cuts::pid == 310).size();
  _c_kaons->fill(_sqs, count);
}


/// Normalise histograms etc., after the run
void finalize() {
  BinnedEstimatePtr<string> mult;
  book(mult, 1, 1, 1);
  barchart(_c_kaons, mult);
  scale(mult, crossSection() / nanobarn);
}

///@}


/// @name Histograms
///@{
BinnedProfilePtr<string> _c_kaons;
string _sqs = "";
///@}

};

RIVET_DECLARE_PLUGIN(BESIII_2021_I1868813);

} ```