rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2015_I1406939

Cross section for $e^+e^-\to \omega\chi_{c(1,2)}$ at energies between 4.42 and 4.6 GeV
Experiment: BESIII (BEPC)
Inspire ID: 1406939
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D93 (2016) 011102, 2016
Beams: e+ e-
Beam energies: ANY
Run details:
  • e+e- to hadrons

Measurement of the cross section for $e^+e^-\to \omega\chi_{c(1,2)}$ at energies between 4.42 and 4.6 GeV by the BESIII collaboration.

Source code: BESIII_2015_I1406939.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_2015_I1406939 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2015_I1406939);
 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(_nChi1, "TMP/chi1");
 25      book(_nChi2, "TMP/chi2");
 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()];
 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      map<long,int> nCount;
 43      int ntotal(0);
 44      for (const Particle& p :  fs.particles()) {
 45	nCount[p.pid()] += 1;
 46	++ntotal;
 47      }
 48      const FinalState& ufs = apply<FinalState>(event, "UFS");
 49      bool matched = false;
 50      for (const Particle& p :  ufs.particles(Cuts::pid==20443 or Cuts::pid==445)) {
 51	if(p.children().empty()) continue;
 52	map<long,int> nRes = nCount;
 53	int ncount = ntotal;
 54	findChildren(p,nRes,ncount);
 55	for (const Particle& p2 :  ufs.particles(Cuts::pid==223)) {
 56	  map<long,int> nRes2 = nRes;
 57	  int ncount2 = ncount;
 58	  findChildren(p2,nRes2,ncount2);
 59	  if(ncount2!=0) continue;
 60	  matched=true;
 61	  for(auto const & val : nRes2) {
 62	    if(val.second!=0) {
 63	      matched = false;
 64	      break;
 65	    }
 66	  }
 67	  if(matched) {
 68	    if(p.pid()==20443)
 69	      _nChi1->fill();
 70	    else if(p.pid()==445)
 71	      _nChi2->fill();
 72	    break;
 73	  }
 74	}
 75	if(matched) break;
 76      }
 77    }
 78
 79
 80    /// Normalise histograms etc., after the run
 81    void finalize() {
 82
 83      double fact =  crossSection()/ sumOfWeights() /picobarn;
 84      for(unsigned int ix=2;ix<4;++ix) {
 85	double sigma(0.),error(0.);
 86	if(ix==2) {
 87	  sigma = _nChi1->val()*fact;
 88	  error = _nChi1->err()*fact;
 89	}
 90	else if(ix==3) {
 91	  sigma = _nChi2->val()*fact;
 92	  error = _nChi2->err()*fact;
 93	}
 94	Scatter2D temphisto(refData(ix, 1, 6));
 95	Scatter2DPtr  mult;
 96	book(mult, ix, 1, 6);
 97	for (size_t b = 0; b < temphisto.numPoints(); b++) {
 98	  const double x  = temphisto.point(b).x();
 99	  pair<double,double> ex = temphisto.point(b).xErrs();
100	  pair<double,double> ex2 = ex;
101	  if(ex2.first ==0.) ex2. first=0.0001;
102	  if(ex2.second==0.) ex2.second=0.0001;
103	  if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
104	    mult->addPoint(x, sigma, ex, make_pair(error,error));
105	  }
106	  else {
107	    mult->addPoint(x, 0., ex, make_pair(0.,.0));
108	  }
109	}
110      }
111
112    }
113
114    //@}
115
116
117    /// @name Histograms
118    //@{
119    CounterPtr _nChi1,_nChi2;
120    //@}
121
122
123  };
124
125
126  // The hook for the plugin system
127  RIVET_DECLARE_PLUGIN(BESIII_2015_I1406939);
128
129
130}