rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2021_I1859248

Cross section for $e^+e^-\to\phi\Lambda\bar{\Lambda}$ from 3.51 to 4.6 GeV
Experiment: BESIII (BEPC)
Inspire ID: 1859248
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev.D 104 (2021) 5, 052006
Beams: e+ e-
Beam energies: ANY
Run details:
  • e+ e- to hadrons

Measurement of the cross section for $e^+e^-\to\phi\Lambda\bar{\Lambda}$ from 3.51 to 4.6 GeV by the BESIII collaboration.

Source code: BESIII_2021_I1859248.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/UnstableParticles.hh"
  4#include "Rivet/Projections/FinalState.hh"
  5
  6namespace Rivet {
  7
  8
  9  /// @brief e+e- -> phi lambda lambda bar
 10  class BESIII_2021_I1859248 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2021_I1859248);
 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      // counter
 27      book(_c_phiLL, "TMP/c_phiLL");
 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      // loop over phi mesons
 53      for (const Particle& phi : ufs.particles(Cuts::pid==333)) {
 54	bool matched = false;
 55	map<long,int> nRes=nCount;
 56	int ncount = ntotal;
 57	findChildren(phi,nRes,ncount);
 58	// then Lambda baryons
 59	for (const Particle& lambda : ufs.particles(Cuts::pid==3122)) {
 60	  map<long,int> nResB = nRes;
 61	  int ncountB = ncount;
 62	  findChildren(lambda,nResB,ncountB);
 63	  for (const Particle& lambar : ufs.particles(Cuts::pid==-3122)) {
 64	    map<long,int> nResC = nResB;
 65	    int ncountC = ncountB;
 66	    findChildren(lambar,nResC,ncountC);
 67	    for(auto const & val : nResC) {
 68	      if(val.second!=0) {
 69		matched = false;
 70		break;
 71	      }
 72	    }
 73	    if(matched) {
 74	      _c_phiLL->fill();
 75	      break;
 76	    }
 77	  }
 78	  if(matched) break;
 79	}
 80	if(matched) break;
 81      }
 82    }
 83
 84
 85    /// Normalise histograms etc., after the run
 86    void finalize() {
 87      double fact = crossSection()/ sumOfWeights() /picobarn;
 88      double sigma = _c_phiLL->val()*fact;
 89      double error = _c_phiLL->err()*fact;
 90      Scatter2D temphisto(refData(1, 1, 1));
 91      Scatter2DPtr  mult;
 92      book(mult, 1, 1, 1);
 93      for (size_t b = 0; b < temphisto.numPoints(); b++) {
 94	const double x  = temphisto.point(b).x();
 95	pair<double,double> ex = temphisto.point(b).xErrs();
 96	pair<double,double> ex2 = ex;
 97	if(ex2.first ==0.) ex2. first=0.0001;
 98	if(ex2.second==0.) ex2.second=0.0001;
 99	if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
100	  mult->addPoint(x, sigma, ex, make_pair(error,error));
101	}
102	else {
103	  mult->addPoint(x, 0., ex, make_pair(0.,.0));
104	}
105      }
106    }
107
108    ///@}
109
110
111    /// @name Histograms
112    ///@{
113    CounterPtr _c_phiLL;
114    ///@}
115
116
117  };
118
119
120  RIVET_DECLARE_PLUGIN(BESIII_2021_I1859248);
121
122}