rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2023_I2706428

Cross Section for $e^+e^-\to\eta J/\psi$ for energies between 3.808 and 4.591 GeV
Experiment: BESIII (BEPC)
Inspire ID: 2706428
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References: Beams: e+ e-
Beam energies: (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (2.0, 2.0); (2.0, 2.0); (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); (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

Cross section for $e^+e^-\to\eta J/\psi$ for energies between 3.808 and 4.591 GeV measured by the BESIII collaboration. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Source code: BESIII_2023_I2706428.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- -> eta J/psi
 10  class BESIII_2023_I2706428 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2023_I2706428);
 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(_sigmaJPsi, 1, 1, 1);
 25      for (const string& en : _sigmaJPsi.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
 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      for (const Particle& p : ufs.particles(Cuts::pid==PID::JPSI)) {
 59        if (p.children().empty()) continue;
 60        // find the J/psi
 61        map<long,int> nRes = nCount;
 62        int ncount = ntotal;
 63        findChildren(p,nRes,ncount);
 64        bool matched=false;
 65        for (const Particle& p2 : ufs.particles(Cuts::pid==PID::ETA)) {
 66          if (p2.children().empty()) continue;
 67          bool JpsiParent=false;
 68          Particle parent=p2;
 69          while (!parent.parents().empty()) {
 70            parent=parent.parents()[0];
 71            if (parent.pid()==PID::JPSI) {
 72              JpsiParent=true;
 73              break;
 74            }
 75          }
 76          if (JpsiParent) continue;
 77          map<long,int> nRes2 = nRes;
 78          int ncount2 = ncount;
 79          findChildren(p2,nRes2,ncount2);
 80          if (ncount2!=0) continue;
 81          matched = true;
 82          for (const auto& val : nRes2) {
 83            if (val.second!=0) {
 84              matched = false;
 85              break;
 86            }
 87          }
 88          if (matched) {
 89	    _sigmaJPsi->fill(_ecms);
 90            break;
 91          }
 92        }
 93        if (matched) break;
 94      }
 95    }
 96
 97
 98    /// Normalise histograms etc., after the run
 99    void finalize() {
100      scale(_sigmaJPsi, crossSection()/ sumOfWeights() /picobarn);
101    }
102
103    /// @}
104
105
106    /// @name Histograms
107    /// @{
108    BinnedHistoPtr<string> _sigmaJPsi;
109    string _ecms;
110    /// @}
111
112
113  };
114
115
116  RIVET_DECLARE_PLUGIN(BESIII_2023_I2706428);
117
118}