rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2014_I1323621

Cross section for $e^+e^-\to \omega\chi_{c0}$ at energies between 4.21 and 4.42 GeV
Experiment: BESIII (BEPC)
Inspire ID: 1323621
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys. Rev. D 99, 091103 (2019)
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.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2) GeV
Run details:
  • e+e- to hadrons

Measurement of the cross section for $e^+e^-\to \omega\chi_{c0}$ at energies between 4.21 and 4.42 GeV by the BESIII collaboration. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Source code: BESIII_2014_I1323621.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 \omega\chi_{c0}$ at energies between 4.21 and 4.42 GeV
 10  class BESIII_2014_I1323621 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2014_I1323621);
 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(_nChi0, 1, 1, 1);
 25      for (const string& en : _nChi0.binning().edges<0>()) {
 26        const 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
 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      bool matched = false;
 59      for (const Particle& p :  ufs.particles(Cuts::pid==10441)) {
 60        if(p.children().empty()) continue;
 61        map<long,int> nRes = nCount;
 62        int ncount = ntotal;
 63        findChildren(p,nRes,ncount);
 64        for (const Particle& p2 :  ufs.particles(Cuts::pid==223)) {
 65          map<long,int> nRes2 = nRes;
 66          int ncount2 = ncount;
 67          findChildren(p2,nRes2,ncount2);
 68          if(ncount2!=0) continue;
 69          matched=true;
 70          for(auto const & val : nRes2) {
 71            if(val.second!=0) {
 72              matched = false;
 73              break;
 74            }
 75          }
 76          if(matched) {
 77            _nChi0->fill(_ecms);
 78            break;
 79          }
 80        }
 81        if(matched) break;
 82      }
 83    }
 84
 85
 86    /// Normalise histograms etc., after the run
 87    void finalize() {
 88      scale(_nChi0,crossSection()/ sumOfWeights() /picobarn);
 89    }
 90
 91    /// @}
 92
 93
 94    /// @name Histograms
 95    /// @{
 96    BinnedHistoPtr<string> _nChi0;
 97    string _ecms;
 98    /// @}
 99
100
101  };
102
103
104  RIVET_DECLARE_PLUGIN(BESIII_2014_I1323621);
105
106}