rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2023_I2711200

Cross section for $e^+e^-\to\pi^+\pi^-\eta$ between 2.00 and 3.08 GeV
Experiment: BESIII (BEPC)
Inspire ID: 2711200
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References: Beams: e+ e-
Beam energies: (1.0, 1.0); (1.0, 1.0); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.3, 1.3); (1.3, 1.3); (1.4, 1.4); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5) GeV
Run details:
  • e+e- to hadrons

Measurement of the cross section for $e^+e^-\to\pi^+\pi^-\eta$ between 3.872 and 4.7 GeV by the BESIII collaboration. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Source code: BESIII_2023_I2711200.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- -> pi+pi-eta
 10  class BESIII_2023_I2711200 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2023_I2711200);
 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      for(unsigned int ix=0;ix<3;++ix)     
 25        book(_sigma[ix] , 1+ix,1,1);
 26      for (const string& en : _sigma[0].binning().edges<0>()) {
 27        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      // loop over eta mesons
 59      for (const Particle& p : ufs.particles(Cuts::pid==221)) {
 60        map<long,int> nRes = nCount;
 61        int ncount = ntotal;
 62        findChildren(p,nRes,ncount);
 63        bool matched = true;
 64        for (const auto& val : nRes) {
 65          if (abs(val.first)==211) {
 66            if (val.second !=1) {
 67              matched = false;
 68              break;
 69            }
 70          }
 71          else if (val.second!=0) {
 72            matched = false;
 73            break;
 74          }
 75        }
 76        if (!matched) continue;
 77        _sigma[0]->fill(_ecms);
 78        for (const Particle& p2 : ufs.particles(Cuts::pid==113)) {
 79          map<long,int> nResB = nRes;
 80          int ncountB = ncount;
 81          findChildren(p2,nResB,ncountB);
 82          if (ncountB!=0) continue;
 83          bool matched = true;
 84          for (const auto& val : nResB) {
 85            if (val.second!=0) {
 86              matched = false;
 87              break;
 88            }
 89          }
 90	  if(matched) _sigma[1]->fill(_ecms);
 91        }
 92      }
 93      // loop over a_2 mesons
 94      for (const Particle& p : ufs.particles(Cuts::abspid==215 || Cuts::pid == 115)) {
 95        map<long,int> nRes = nCount;
 96        int ncount = ntotal;
 97        findChildren(p,nRes,ncount);
 98        bool matched = true;
 99        int ipi=111;
100        if (p.abspid()==215) ipi=211*p.pid()/p.abspid();
101        for (const auto& val : nRes) {
102          if (abs(val.first)==ipi) {
103            if (val.second !=1) {
104              matched = false;
105              break;
106            }
107          }
108          else if (val.second!=0) {
109            matched = false;
110            break;
111          }
112        }
113        if (matched) {
114	  _sigma[2]->fill(_ecms);
115          break;
116        }
117      }
118    }
119
120
121    /// Normalise histograms etc., after the run
122    void finalize() {
123      double fact = crossSection()/ sumOfWeights() /picobarn;
124      for(unsigned int ix=0;ix<3;++ix) {
125	scale(_sigma[ix],fact);
126      }
127    }
128
129    /// @}
130
131
132    /// @name Histograms
133    /// @{
134    BinnedHistoPtr<string> _sigma[3];
135    string _ecms;
136    /// @}
137
138
139  };
140
141
142  RIVET_DECLARE_PLUGIN(BESIII_2023_I2711200);
143
144}