Rivet analyses

e+e → pKS0K+c.c. between 3.773 and 4.6 GeV

Experiment: BESIII (BEPC)

Inspire ID: 1681638

Status: VALIDATED NOHEPDATA

Authors: - Peter Richrdson

References: - Phys.Rev.D 98 (2018) 3, 032014

Beams: e+ e-

Beam energies: (1.9, 1.9); (2.0, 2.0); (2.1, 2.1); (2.1, 2.1); (2.2, 2.2); (2.2, 2.2); (2.3, 2.3)GeV

Run details: - e+ e- to hadrons

Measurement of the cross section for e+e → pKS0K+c.c., and the resonant sub-processes Λ(1520)0KS0+c.c. and Λ(1520)0K++c.c., for energies between 1.6 and 2 GeV by the BESIII experiment.

Source code:BESIII_2018_I1681638.cc

// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/UnstableParticles.hh"

namespace Rivet {


  /// @brief e+e- -> p KS0 nbar K-
  class BESIII_2018_I1681638 : public Analysis {
  public:

    /// Constructor
    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2018_I1681638);


    /// @name Analysis methods
    /// @{

    /// Book histograms and initialise projections before the run
    void init() {
      declare(FinalState(), "FS");
      declare(UnstableParticles(Cuts::pid==102134), "UFS");
      // counters
      for (size_t ix=0; ix<3; ++ix) {
        book(_sigma[ix], 1, 1, 1+ix);
      }

      for (const string& en : _sigma[0].binning().edges<0>()) {
        const double eval = stod(en)*GeV;
        if (isCompatibleWithSqrtS(eval)) {
          _sqs = en; break;
        }
      }
      raiseBeamErrorIf(_sqs.empty());
    }

    void findChildren(const Particle& p,map<long,int>& nRes, int &ncount) const {
      for (const Particle &child : p.children()) {
        if (child.children().empty()) {
          --nRes[child.pid()];
          --ncount;
        }
        else {
          findChildren(child,nRes,ncount);
        }
      }
    }

    /// Perform the per-event analysis
    void analyze(const Event& event) {
      // find the final-state particles
      const FinalState& fs = apply<FinalState>(event, "FS");
      map<long,int> nCount;
      int ntotal(0);
      for (const Particle& p : fs.particles()) {
        nCount[p.pid()] += 1;
        ++ntotal;
      }
      // FS
      if (ntotal==4&&nCount[310]==1) {
        if ((nCount[ 2212]==1 && nCount[-2112]==1 && nCount[-321]==1) ||
           (nCount[-2212]==1 && nCount[ 2112]==1 && nCount[ 321]==1)) {
          _sigma[0]->fill(_sqs);
        }
      }
      for (const Particle& p : apply<FinalState>(event, "UFS").particles()) {
        if (p.children().empty()) continue;
        map<long,int> nRes = nCount;
        int ncount = ntotal;
        findChildren(p,nRes,ncount);
        if (ncount!=2) continue;
        bool matched = true;
        int sign = p.pid()/p.abspid();
        for (const auto& val : nRes) {
          if (val.first==-sign*2112 || val.first==310) {
            if (val.second !=1) {
              matched = false;
              break;
            }
          }
          else if (val.second!=0) {
            matched = false;
            break;
          }
        }
        if (matched) {
          _sigma[1]->fill(_sqs);
          break;
        }
        matched = true;
        for (const auto& val : nRes) {
          if(val.first==-sign*2212 ||
             val.first==sign*321) {
            if (val.second !=1) {
              matched = false;
              break;
            }
          }
          else if (val.second!=0) {
            matched = false;
            break;
          }
        }
        if (matched) {
          _sigma[2]->fill(_sqs);
          break;
        }
      }
    }


    /// Normalise histograms etc., after the run
    void finalize() {
      scale(_sigma, crossSection()/picobarn/sumOfWeights());
    }

    /// @}


    /// @name Histograms
    /// @{
    BinnedHistoPtr<string> _sigma[3];
    string _sqs = "";
    /// @}


  };


  RIVET_DECLARE_PLUGIN(BESIII_2018_I1681638);

}