rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2022_I2068180

Cross section for $e^+e^-\to J/\psi K^+K^-$ at energies between 4.127 and 4.6 GeV
Experiment: BESIII (BEPC)
Inspire ID: 2068180
Status: VALIDATED NOHEPDATA
No authors listed 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.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.2, 2.2); (2.2, 2.2); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3) GeV
Run details:
  • e+e- to hadrons

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

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