rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2022_I2182758

Cross section for $e^+e^-\to J/\psi K^0_SK^0_S$ at energies between 4.126 and 4.95 GeV
Experiment: BESIII (BEPC)
Inspire ID: 2182758
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References: Beams: e+ e-
Beam energies: (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.4, 2.4); (2.4, 2.4); (2.4, 2.4); (2.4, 2.4); (2.5, 2.5); (2.5, 2.5) GeV
Run details:
  • e+e- to hadrons, KS0 set stable

Measurement of the cross section for $e^+e^-\to J/\psi K^0_SK^0_S$ at energies between 4.126 and 4.95 GeV. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Source code: BESIII_2022_I2182758.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/FinalState.hh"
  4#include "Rivet/Projections/UnstableParticles.hh"
  5
  6namespace Rivet {
  7
  8
  9  /// @brief  e+e- > KS0 KS0 J/psi
 10  class BESIII_2022_I2182758 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2022_I2182758);
 15
 16
 17    /// @name Analysis methods
 18    /// @{
 19
 20    /// Book histograms and initialise projections before the run
 21    void init() {
 22      declare(FinalState(), "FS");
 23      declare(UnstableParticles(), "UFS");
 24      book(_sigmaPsi, 1,1,1);
 25      for (const string& en : _sigmaPsi.binning().edges<0>()) {
 26        double end = std::stod(en)*GeV;
 27        if(isCompatibleWithSqrtS(end)) {
 28          _ecms = en;
 29          break;
 30        }
 31      }
 32      if(_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
 33    }
 34
 35    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 36      for (const Particle& child : p.children()) {
 37        if (child.children().empty()) {
 38          --nRes[child.pid()];
 39          --ncount;
 40        }
 41        else {
 42          findChildren(child,nRes,ncount);
 43        }
 44      }
 45    }
 46
 47    /// Perform the per-event analysis
 48    void analyze(const Event& event) {
 49      const FinalState& fs = apply<FinalState>(event, "FS");
 50      map<long,int> nCount;
 51      int ntotal(0);
 52      for (const Particle& p: fs.particles()) {
 53        nCount[p.pid()] += 1;
 54        ++ntotal;
 55      }
 56      const FinalState& ufs = apply<FinalState>(event, "UFS");
 57      // find the psis
 58      for (const Particle& p :  ufs.particles(Cuts::pid==443)) {
 59        if (p.children().empty()) continue;
 60        map<long,int> nRes = nCount;
 61        int ncount = ntotal;
 62        findChildren(p,nRes,ncount);
 63        // psi pi+pi-
 64        if (ncount!=2) continue;
 65        bool matched = true;
 66        for (const auto& val : nRes) {
 67          if (abs(val.first)==310) {
 68            if (val.second !=2) {
 69              matched = false;
 70              break;
 71            }
 72          }
 73          else if (val.second!=0) {
 74            matched = false;
 75            break;
 76          }
 77        }
 78        if (matched) {
 79	  _sigmaPsi->fill(_ecms);
 80          break;
 81        }
 82      }
 83    }
 84
 85
 86    /// Normalise histograms etc., after the run
 87    void finalize() {
 88      scale(_sigmaPsi,crossSection()/ sumOfWeights() /picobarn);
 89    }
 90
 91    /// @}
 92
 93
 94    /// @name Histograms
 95    /// @{
 96    BinnedHistoPtr<string> _sigmaPsi;
 97    string _ecms;
 98    /// @}
 99
100
101  };
102
103
104  RIVET_DECLARE_PLUGIN(BESIII_2022_I2182758);
105
106}