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: ANY
Run details:
  • e+e- to hadrons

Cross section for $e^+e^-\to \Lambda_c^+\bar{\Lambda}_c^-$ near threshold.

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,"/TMP/nLambda");
 27
 28    }
 29
 30    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 31      for( const Particle &child : p.children()) {
 32        if(child.children().empty()) {
 33          nRes[child.pid()]-=1;
 34          --ncount;
 35        }
 36        else
 37          findChildren(child,nRes,ncount);
 38      }
 39    }
 40
 41    /// Perform the per-event analysis
 42    void analyze(const Event& event) {
 43      const FinalState& fs = apply<FinalState>(event, "FS");
 44
 45      map<long,int> nCount;
 46      int ntotal(0);
 47      for (const Particle& p :  fs.particles()) {
 48        nCount[p.pid()] += 1;
 49        ++ntotal;
 50      }
 51      const FinalState& ufs = apply<FinalState>(event, "UFS");
 52
 53      for(unsigned int ix=0;ix<ufs.particles().size();++ix) {
 54        const Particle& p1 = ufs.particles()[ix];
 55        if(abs(p1.pid())!=4122) continue;
 56        map<long,int> nRes = nCount;
 57        int ncount = ntotal;
 58        findChildren(p1,nRes,ncount);
 59        bool matched=false;
 60        for(unsigned int iy=0;iy<ufs.particles().size();++iy) {
 61          if(ix==iy) continue;
 62          const Particle& p2 = ufs.particles()[iy];
 63          if(p2.pid() != -p1.pid()) continue;
 64          map<long,int> nRes2 = nRes;
 65          int ncount2 = ncount;
 66          findChildren(p2,nRes2,ncount2);
 67          if(ncount2!=0) continue;
 68          matched=true;
 69          for(auto const & val : nRes2) {
 70            if(val.second!=0) {
 71              matched = false;
 72              break;
 73            }
 74          }
 75          if(matched) {
 76            break;
 77          }
 78        }
 79        if(matched) {
 80          _nLambda->fill();
 81          break;
 82        }
 83      }
 84    }
 85
 86
 87    /// Normalise histograms etc., after the run
 88    void finalize() {
 89      double sigma = _nLambda->val();
 90      double error = _nLambda->err();
 91      sigma *= crossSection()/ sumOfWeights() /picobarn;
 92      error *= crossSection()/ sumOfWeights() /picobarn;
 93      Estimate1DPtr  mult;
 94      book(mult,1, 1, 1);
 95      for (auto& b : mult->bins()) {
 96        if (inRange(sqrtS()/MeV, b.xMin(), b.xMax())) {
 97          b.set(sigma, error);
 98        }
 99      }
100    }
101
102    /// @}
103
104
105    /// @name Histograms
106    /// @{
107    CounterPtr _nLambda;
108    /// @}
109
110
111  };
112
113
114  RIVET_DECLARE_PLUGIN(BESIII_2017_I1628093);
115
116
117}