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) 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.

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