rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2014_I1323621

Cross section for $e^+e^-\to \omega\chi_{c0}$ at energies between 4.21 and 4.42 GeV
Experiment: BESIII ()
Inspire ID: 1323621
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys. Rev. D 99, 091103 (2019)
Beams: e+ e-
Beam energies: ANY
Run details:
  • e+e- to hadrons

Measurement of the cross section for $e^+e^-\to \omega\chi_{c0}$ at energies between 4.21 and 4.42 GeV by the BESIII collaboration.

Source code: BESIII_2014_I1323621.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 Add a short analysis description here
 10  class BESIII_2014_I1323621 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2014_I1323621);
 15
 16
 17    /// @name Analysis methods
 18    //@{
 19
 20    /// Book histograms and initialise projections before the run
 21    void init() {
 22      declare(FinalState(), "FS");
 23      declare(UnstableParticles(), "UFS");
 24      book(_nChi0, "TMP/chi0");
 25    }
 26
 27    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 28      for( const Particle &child : p.children()) {
 29	if(child.children().empty()) {
 30	  --nRes[child.pid()];
 31	  --ncount;
 32	}
 33	else
 34	  findChildren(child,nRes,ncount);
 35      }
 36    }
 37
 38    /// Perform the per-event analysis
 39    void analyze(const Event& event) {
 40      const FinalState& fs = apply<FinalState>(event, "FS");
 41      map<long,int> nCount;
 42      int ntotal(0);
 43      for (const Particle& p :  fs.particles()) {
 44	nCount[p.pid()] += 1;
 45	++ntotal;
 46      }
 47      const FinalState& ufs = apply<FinalState>(event, "UFS");
 48      bool matched = false;
 49      for (const Particle& p :  ufs.particles(Cuts::pid==10441)) {
 50	if(p.children().empty()) continue;
 51	map<long,int> nRes = nCount;
 52	int ncount = ntotal;
 53	findChildren(p,nRes,ncount);
 54	for (const Particle& p2 :  ufs.particles(Cuts::pid==223)) {
 55	  map<long,int> nRes2 = nRes;
 56	  int ncount2 = ncount;
 57	  findChildren(p2,nRes2,ncount2);
 58	  if(ncount2!=0) continue;
 59	  matched=true;
 60	  for(auto const & val : nRes2) {
 61	    if(val.second!=0) {
 62	      matched = false;
 63	      break;
 64	    }
 65	  }
 66	  if(matched) {
 67	    _nChi0->fill();
 68	    break;
 69	  }
 70	}
 71	if(matched) break;
 72      }
 73    }
 74
 75
 76    /// Normalise histograms etc., after the run
 77    void finalize() {
 78      double fact =  crossSection()/ sumOfWeights() /picobarn;
 79      double sigma = _nChi0->val()*fact;
 80      double error = _nChi0->err()*fact;
 81      Scatter2D temphisto(refData(1, 1, 1));
 82      Scatter2DPtr  mult;
 83      book(mult, 1, 1, 1);
 84      for (size_t b = 0; b < temphisto.numPoints(); b++) {
 85	const double x  = temphisto.point(b).x();
 86	pair<double,double> ex = temphisto.point(b).xErrs();
 87	pair<double,double> ex2 = ex;
 88	if(ex2.first ==0.) ex2. first=0.0001;
 89	if(ex2.second==0.) ex2.second=0.0001;
 90	if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
 91	  mult->addPoint(x, sigma, ex, make_pair(error,error));
 92	}
 93	else {
 94	  mult->addPoint(x, 0., ex, make_pair(0.,.0));
 95	}
 96      }
 97    }
 98
 99    //@}
100
101
102    /// @name Histograms
103    //@{
104    CounterPtr _nChi0;
105    //@}
106
107
108  };
109
110
111  // The hook for the plugin system
112  RIVET_DECLARE_PLUGIN(BESIII_2014_I1323621);
113
114
115}