rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2021_I1849633

Cross Section for $e^+e^-\to\eta \psi(2S)$ for energies between 4.236 to 4.600 GeV
Experiment: BESIII (BEPC)
Inspire ID: 1849633
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References:
  • JHEP 10 (2021) 177
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.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

Cross section for $e^+e^-\to\eta \psi(2S)$ for energies between 4.236 and 4.600 GeV measured by the BESIII collaboration. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Source code: BESIII_2021_I1849633.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 psi(2S)
 10  class BESIII_2021_I1849633 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2021_I1849633);
 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(_sigma, 1, 1, 1);
 25
 26      for (const string& en : _sigma.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      for (const Particle& p : ufs.particles(Cuts::pid==PID::PSI2S)) {
 59        if (p.children().empty()) continue;
 60        // find the psi(2s)
 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 psi2SParent=false;
 68          Particle parent=p2;
 69          while (!parent.parents().empty()) {
 70            parent=parent.parents()[0];
 71            if (parent.pid()==PID::PSI2S) {
 72              psi2SParent=true;
 73              break;
 74            }
 75          }
 76          if (psi2SParent) 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            _sigma->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(_sigma,crossSection()/ sumOfWeights() /picobarn);
101    }
102
103    /// @}
104
105
106    /// @name Histograms
107    /// @{
108    BinnedHistoPtr<string> _sigma;
109    string _ecms;
110    /// @}
111
112
113  };
114
115
116  RIVET_DECLARE_PLUGIN(BESIII_2021_I1849633);
117
118}