rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2017_I1591716

Cross section for $e^+e^-\to K_S^0K^\pm\pi^\mp$ with $\pi^0$, $\eta$ between threshold and 4 GeV
Experiment: BABAR (PEP-II)
Inspire ID: 1591716
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D95 (2017) no.9, 092005
Beams: e+ e-
Beam energies: (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (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.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.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, 1.2); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0) GeV
Run details:
  • e+e- to hadrons

Cross section for $e^+e^-\to K_S^0K^\pm\pi^\mp$ with $\pi^0$, $\eta$ between threshold and 4 GeV using radiative events. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Source code: BABAR_2017_I1591716.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- -> K_S0K+-pi-+ with pi0, eta 
 10  class BABAR_2017_I1591716 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2017_I1591716);
 15
 16
 17    /// @name Analysis methods
 18    /// @{
 19
 20    /// Book histograms and initialise projections before the run
 21    void init() {
 22
 23      // Initialise and register projections
 24      declare(FinalState(), "FS");
 25      declare(UnstableParticles(), "UFS");
 26      
 27      for(unsigned int ix=0;ix<2;++ix)
 28        book(_sigma[ix], 1+ix, 1, 1);
 29      for (const string& en : _sigma[0].binning().edges<0>()) {
 30        const double end = std::stod(en)*GeV;
 31        if (isCompatibleWithSqrtS(end)) {
 32          _ecms = en;
 33          break;
 34        }
 35      }
 36      if (_ecms.empty())
 37        MSG_ERROR("Beam energy incompatible with analysis.");
 38    }
 39
 40    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 41      for (const Particle &child : p.children()) {
 42        if (child.children().empty()) {
 43          nRes[child.pid()]-=1;
 44          --ncount;
 45        }
 46        else {
 47          findChildren(child,nRes,ncount);
 48        }
 49      }
 50    }
 51
 52
 53    /// Perform the per-event analysis
 54    void analyze(const Event& event) {
 55      const FinalState& fs = apply<FinalState>(event, "FS");
 56      map<long,int> nCount;
 57      int ntotal(0);
 58      for (const Particle& p : fs.particles()) {
 59        nCount[p.pid()] += 1;
 60        ++ntotal;
 61      }
 62      // stable histos
 63      if (ntotal == 4 && nCount[310] == 1 && nCount[111] == 1 &&
 64          ( (nCount[ 321]==1 && nCount[-211]==1) ||
 65            (nCount[-321]==1 && nCount[ 211]==1))) {
 66        _sigma[0]->fill(_ecms);
 67      }
 68
 69      // unstable particles
 70      const FinalState& ufs = apply<FinalState>(event, "UFS");
 71      for (const Particle& p : ufs.particles()) {
 72        if (p.children().empty()) continue;
 73        if (p.pid()!=221) continue;
 74        map<long,int> nRes=nCount;
 75        int ncount = ntotal;
 76        findChildren(p,nRes,ncount);
 77        bool matched  = true;
 78        if (p.pid()==221 && ncount==3) {
 79          for (const auto& val : nRes) {
 80            if (val.first==310 || val.first==111) {
 81              if (val.second!=1) {
 82                matched = false;
 83                break;
 84              }
 85            }
 86            else if (abs(val.first)==321 || abs(val.first)==211)
 87              continue;
 88            else if (val.second!=0) {
 89              matched = false;
 90              break;
 91            }
 92          }
 93          if (matched) {
 94            if ((nRes[321]==1 && nRes[-211]==1 && nRes[-321]==0 && nRes[211]==0) ||
 95                (nRes[321]==0 && nRes[-211]==0 && nRes[-321]==1 && nRes[211]==1)) {
 96              _sigma[1]->fill(_ecms);
 97            }
 98          }
 99        }
100      }
101    }
102
103
104    /// Normalise histograms etc., after the run
105    void finalize() {
106      double fact = crossSection()/ sumOfWeights() /nanobarn;
107      for(unsigned int ix=0;ix<2;++ix)
108        scale(_sigma[ix],fact);
109    }
110
111    /// @}
112
113
114    /// @name Histograms
115    /// @{
116    BinnedHistoPtr<string> _sigma[2];
117    string _ecms;
118    /// @}
119
120
121  };
122
123
124  RIVET_DECLARE_PLUGIN(BABAR_2017_I1591716);
125
126
127}