rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2016_I1457597

Cross section for $e^+e^-\to J/\psi \eta^\prime$ at energies between 4.189 and 4.6 GeV
Experiment: BESIII (BEPC)
Inspire ID: 1457597
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D94 (2016) 032009, 2016
Beams: e+ e-
Beam energies: ANY
Run details:
  • e+e- to hadrons

Measurement of the cross section for $e^+e^-\to J/\psi \eta^\prime$ at energies between 4.189 and 4.6 GeV

Source code: BESIII_2016_I1457597.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 Cross section for $e^+e^-\to J/\psi \eta^\prime$ at energies between 4.189 and 4.6 GeV
 10  class BESIII_2016_I1457597 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2016_I1457597);
 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(_nJPsi, "TMP/jpsi");
 25    }
 26
 27    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 28      for(const Particle &child : p.children()) {
 29        if(child.children().empty()) {
 30          --nRes[child.pid()];
 31          --ncount;
 32        }
 33        else
 34          findChildren(child,nRes,ncount);
 35      }
 36    }
 37
 38    /// Perform the per-event analysis
 39    void analyze(const Event& event) {
 40      const FinalState& fs = apply<FinalState>(event, "FS");
 41      map<long,int> nCount;
 42      int ntotal(0);
 43      for (const Particle& p : fs.particles()) {
 44        nCount[p.pid()] += 1;
 45        ++ntotal;
 46      }
 47      const FinalState& ufs = apply<FinalState>(event, "UFS");
 48      for (const Particle& p1 : ufs.particles()) {
 49        bool matched=false;
 50        if(p1.children().empty()) continue;
 51        // find the j/psi
 52        if(p1.pid()!=443) continue;
 53        map<long,int> nRes = nCount;
 54        int ncount = ntotal;
 55        findChildren(p1,nRes,ncount);
 56
 57        for (const Particle& p2 : ufs.particles()) {
 58          if(p2.children().empty()) continue;
 59          // find the j/psi
 60          if(p2.pid()!=331) continue;
 61          map<long,int> nRes2 = nRes;
 62          int ncount2 = ncount;
 63          findChildren(p2,nRes2,ncount2);
 64          if(ncount2!=0) continue;
 65          matched=true;
 66          for(auto const & val : nRes2) {
 67            if(val.second!=0) {
 68              matched = false;
 69              break;
 70            }
 71          }
 72          if(matched) {
 73            _nJPsi->fill();
 74            break;
 75          }
 76        }
 77        if(matched) break;
 78      }
 79    }
 80
 81    /// Normalise histograms etc., after the run
 82    void finalize() {
 83      double sigma = _nJPsi->val();
 84      double error = _nJPsi->err();
 85      sigma *= crossSection()/ sumOfWeights() /picobarn;
 86      error *= crossSection()/ sumOfWeights() /picobarn;
 87      Estimate1DPtr  mult;
 88      book(mult, 1, 1, 7);
 89      for (auto& b : mult->bins()) {
 90        if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
 91          b.set(sigma, error, "stat");
 92        }
 93      }
 94    }
 95
 96    /// @}
 97
 98
 99    /// @name Histograms
100    /// @{
101    CounterPtr _nJPsi;
102    /// @}
103
104
105  };
106
107
108  RIVET_DECLARE_PLUGIN(BESIII_2016_I1457597);
109
110
111}