rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2021_I1940960

Measurement of cross section for $e^+e^-\to\Sigma^0\bar{\Sigma}^0$ between 2.3864 and 3.02 GeV
Experiment: BESIII (BEPC)
Inspire ID: 1940960
Status: VALIDATED
Authors:
  • Peter Richardson
References: Beams: e+ e-
Beam energies: (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.3, 1.3); (1.3, 1.3); (1.4, 1.4); (1.5, 1.5) GeV
Run details:
  • e+e- to hadrons

Measurement of the cross section for $e^+e^-\to\Sigma^0\bar{\Sigma}^0$ between 2.3864 and 3.02 GeV by the BESIII collaboration. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

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