rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2017_I1628093

Cross section for $e^+e^-\to \Lambda_c^+\bar{\Lambda}_c^-$ near threshold
Experiment: BESIII (BEPC)
Inspire ID: 1628093
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev.Lett. 120 (2018) no.13, 132001
Beams: e+ e-
Beam energies: (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3) GeV
Run details:
  • e+e- to hadrons

Cross section for $e^+e^-\to \Lambda_c^+\bar{\Lambda}_c^-$ near threshold. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Source code: BESIII_2017_I1628093.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 \Lambda_c^+\bar{\Lambda}_c^-$ near threshold
 10  class BESIII_2017_I1628093 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2017_I1628093);
 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      book(_nLambda, 1, 1, 1);
 27      for (const string& en : _nLambda.binning().edges<0>()) {
 28        const double end = std::stod(en)*MeV;
 29        if (isCompatibleWithSqrtS(end)) {
 30          _ecms = en;
 31          break;
 32        }
 33      }
 34      if (_ecms.empty())
 35        MSG_ERROR("Beam energy incompatible with analysis.");
 36
 37    }
 38
 39    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 40      for( const Particle &child : p.children()) {
 41        if(child.children().empty()) {
 42          nRes[child.pid()]-=1;
 43          --ncount;
 44        }
 45        else
 46          findChildren(child,nRes,ncount);
 47      }
 48    }
 49
 50    /// Perform the per-event analysis
 51    void analyze(const Event& event) {
 52      const FinalState& fs = apply<FinalState>(event, "FS");
 53
 54      map<long,int> nCount;
 55      int ntotal(0);
 56      for (const Particle& p :  fs.particles()) {
 57        nCount[p.pid()] += 1;
 58        ++ntotal;
 59      }
 60      const FinalState& ufs = apply<FinalState>(event, "UFS");
 61
 62      for(unsigned int ix=0;ix<ufs.particles().size();++ix) {
 63        const Particle& p1 = ufs.particles()[ix];
 64        if(abs(p1.pid())!=4122) continue;
 65        map<long,int> nRes = nCount;
 66        int ncount = ntotal;
 67        findChildren(p1,nRes,ncount);
 68        bool matched=false;
 69        for(unsigned int iy=0;iy<ufs.particles().size();++iy) {
 70          if(ix==iy) continue;
 71          const Particle& p2 = ufs.particles()[iy];
 72          if(p2.pid() != -p1.pid()) continue;
 73          map<long,int> nRes2 = nRes;
 74          int ncount2 = ncount;
 75          findChildren(p2,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            break;
 86          }
 87        }
 88        if(matched) {
 89          _nLambda->fill(_ecms);
 90          break;
 91        }
 92      }
 93    }
 94
 95
 96    /// Normalise histograms etc., after the run
 97    void finalize() {
 98      scale(_nLambda, crossSection()/ sumOfWeights() /picobarn);
 99    }
100
101    /// @}
102
103
104    /// @name Histograms
105    /// @{
106    BinnedHistoPtr<string> _nLambda;
107    string _ecms;
108    /// @}
109
110
111  };
112
113
114  RIVET_DECLARE_PLUGIN(BESIII_2017_I1628093);
115
116
117}