rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2020_I1817739

Cross section for $e^+e^-\to\omega\pi^0$ and $\omega\eta$ for centre-of-mass energies between 2.00 and 3.08 GeV
Experiment: BESIII (BEPC)
Inspire ID: 1817739
Status: VALIDATED
Authors:
  • Peter Richardson
References: Beams: e+ e-
Beam energies: ANY
Run details:
  • e+ e- to hadrons

Measurement of the cross section for $e^+e^-\to\omega\pi^0$ and $\omega\eta$ for centre-of-mass energies between 2.00 and 3.08 GeV by the BESIII collaboration.

Source code: BESIII_2020_I1817739.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 e+e- > omega pi0 and omega eta
 10  class BESIII_2020_I1817739 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2020_I1817739);
 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(_numOmegaPi, "TMP/OmegaPi");
 26      book(_nOmegaEta, "/TMP/nOmegaEta");
 27    }
 28
 29    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 30      for (const Particle &child : p.children()) {
 31	if(child.children().empty()) {
 32	  nRes[child.pid()]-=1;
 33	  --ncount;
 34	}
 35	else
 36	  findChildren(child,nRes,ncount);
 37      }
 38    }
 39
 40    /// Perform the per-event analysis
 41    void analyze(const Event& event) {
 42      const FinalState& fs = apply<FinalState>(event, "FS");
 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      const FinalState& ufs = apply<FinalState>(event, "UFS");
 50      for (const Particle& p : ufs.particles(Cuts::pid==223)) {
 51	if(p.children().empty()) continue;
 52	map<long,int> nRes = nCount;
 53	int ncount = ntotal;
 54	findChildren(p,nRes,ncount);
 55	// check for omega pi0
 56	bool matched = true;
 57	for(auto const & val : nRes) {
 58	  if(val.first==111) {
 59	    if(val.second!=1) {
 60	      matched = false;
 61	      break;
 62	    }
 63	  }
 64	  else if(val.second!=0) {
 65	    matched = false;
 66	    break;
 67	  }
 68	}
 69	if(matched) {
 70	  _numOmegaPi->fill();
 71	  break;
 72	}
 73	// now for omega eta
 74	for (const Particle& p2 : ufs.particles(Cuts::pid==221)) {
 75	  map<long,int> nResB = nRes;
 76	  int ncountB = ncount;
 77	  findChildren(p2,nResB,ncountB);
 78	  if(ncountB!=0) continue;
 79	  matched = true;
 80	  for(auto const & val : nResB) {
 81	    if(val.second!=0) {
 82	      matched = false;
 83	      break;
 84	    }
 85	  }
 86	  if(matched) {
 87	    _nOmegaEta->fill();
 88	    break;
 89	  }
 90	}
 91	if(matched) break;
 92      }
 93    }
 94
 95
 96    /// Normalise histograms etc., after the run
 97    void finalize() {
 98      for(unsigned int ix=1;ix<3;++ix) {
 99	double sigma,error;
100	if(ix==1) {
101	  sigma = _nOmegaEta->val();
102	  error = _nOmegaEta->err();
103	}
104	else {
105	  sigma = _numOmegaPi->val();
106	  error = _numOmegaPi->err();
107	}
108	sigma *= crossSection()/ sumOfWeights() /picobarn;
109	error *= crossSection()/ sumOfWeights() /picobarn;
110	Scatter2D temphisto(refData(ix, 1, 1));
111	Scatter2DPtr mult;
112	book(mult, ix, 1, 1);
113	for (size_t b = 0; b < temphisto.numPoints(); b++) {
114	  const double x  = temphisto.point(b).x();
115	  pair<double,double> ex = temphisto.point(b).xErrs();
116	  pair<double,double> ex2 = ex;
117	  if(ex2.first ==0.) ex2. first=0.0001;
118	  if(ex2.second==0.) ex2.second=0.0001;
119	  if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
120	    mult->addPoint(x, sigma, ex, make_pair(error,error));
121	  }
122	  else {
123	    mult->addPoint(x, 0., ex, make_pair(0.,.0));
124	  }
125	}
126      }
127    }
128
129    ///@}
130
131
132    /// @name Histograms
133    ///@{
134    CounterPtr _nOmegaEta;
135    CounterPtr _numOmegaPi;
136    ///@}
137
138
139  };
140
141
142  RIVET_DECLARE_PLUGIN(BESIII_2020_I1817739);
143
144}