rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2017_I1596897

Cross Section for $e^+e^-\to\eta h_c$ for energies between 4.085 and 4.6 GeV
Experiment: BESIII (BEPC)
Inspire ID: 1596897
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D96 (2017) no.1, 012001
Beams: e+ e-
Beam energies: (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.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. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

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

Source code: BESIII_2017_I1596897.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 h_c
 10  class BESIII_2017_I1596897 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2017_I1596897);
 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(_nhc, 1, 1, 1);
 25      for (const string& en : _nhc.binning().edges<0>()) {
 26        const double end = std::stod(en)*MeV;
 27        if (isCompatibleWithSqrtS(end)) {
 28          _ecms = en;
 29          break;
 30        }
 31      }
 32      if (_ecms.empty())
 33        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    /// Perform the per-event analysis
 48    void analyze(const Event& event) {
 49      const FinalState& fs = apply<FinalState>(event, "FS");
 50      map<long,int> nCount;
 51      int ntotal(0);
 52      for (const Particle& p : fs.particles()) {
 53        nCount[p.pid()] += 1;
 54        ++ntotal;
 55      }
 56      const FinalState& ufs = apply<FinalState>(event, "UFS");
 57      // loop over h_c
 58      for (const Particle& hc : ufs.particles(Cuts::pid==10443)) {
 59        if(hc.children().empty()) continue;
 60        map<long,int> nRes = nCount;
 61        int ncount = ntotal;
 62        findChildren(hc,nRes,ncount);
 63        bool matched = false;
 64        // loop over eta
 65        for(const Particle & eta : ufs.particles(Cuts::pid==221)) {
 66          // check eta not child of h_c
 67          Particle parent=eta;
 68          while(!parent.parents().empty()) {
 69            parent=parent.parents()[0];
 70            if(parent.abspid()==10443) break;
 71          }
 72          if(fuzzyEquals(parent.momentum(),hc.momentum())) continue;
 73          map<long,int> nRes2 = nRes;
 74          int ncount2 = ncount;
 75          findChildren(eta,nRes2,ncount2);
 76          if(ncount2!=0) continue;
 77          matched=true;
 78          for(auto const & val : nRes2) {
 79            if(val.second!=0) {
 80              matched = false;
 81              break;
 82            }
 83          }
 84          if(matched) {
 85            _nhc->fill(_ecms);
 86            break;
 87          }
 88        }
 89        if(matched) break;
 90      }
 91    }
 92
 93
 94    /// Normalise histograms etc., after the run
 95    void finalize() {
 96      scale(_nhc, crossSection()/ sumOfWeights() /picobarn);
 97    }
 98
 99    /// @}
100
101
102    /// @name Histograms
103    /// @{
104    BinnedHistoPtr<string> _nhc;
105    string _ecms;
106    /// @}
107
108
109  };
110
111
112  RIVET_DECLARE_PLUGIN(BESIII_2017_I1596897);
113
114}