rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2015_I1355215

Cross section for $e^+e^-\to J/\psi \eta$ at energies between 3.82 and 4.6 GeV
Experiment: BESIII (BEPC)
Inspire ID: 1355215
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D91 (2015) 112005, 2015
Beams: e+ e-
Beam energies: ANY
Run details:
  • e+e- to hadrons

Measurement of the cross section for $e^+e^-\to J/\psi \eta$ at energies between 3.82 and 4.6 GeV

Source code: BESIII_2015_I1355215.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_I1355215 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2015_I1355215);
 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(_nJPsi, "TMP/jpsi");
 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      for (const Particle& p1 : ufs.particles()) {
 49	if(p1.children().empty()) continue;
 50	bool matched=false;
 51	// find the j/psi
 52	if(p1.pid()!=443) continue;
 53	map<long,int> nRes = nCount;
 54	int ncount = ntotal;
 55	findChildren(p1,nRes,ncount);
 56	
 57	for (const Particle& p2 : ufs.particles()) {
 58	  if(p2.children().empty()) continue;
 59	  // find the j/psi
 60	  if(p2.pid()!=331) continue;
 61	  map<long,int> nRes2 = nRes;
 62	  int ncount2 = ncount;
 63	  findChildren(p2,nRes2,ncount2);
 64	  if(ncount2!=0) continue;
 65	  matched=true;
 66	  for(auto const & val : nRes2) {
 67	    if(val.second!=0) {
 68	      matched = false;
 69	      break;
 70	    }
 71	  }
 72	  if(matched) {
 73	    _nJPsi->fill();
 74	    break;
 75	  }
 76	}
 77	if(matched) break;
 78      }
 79    }
 80
 81
 82    /// Normalise histograms etc., after the run
 83    void finalize() {
 84
 85      double sigma = _nJPsi->val();
 86      double error = _nJPsi->err();
 87      sigma *= crossSection()/ sumOfWeights() /picobarn;
 88      error *= crossSection()/ sumOfWeights() /picobarn; 
 89      Scatter2D temphisto(refData(1, 1, 10));
 90      Scatter2DPtr  mult;
 91      book(mult, 1, 1, 10);
 92      for (size_t b = 0; b < temphisto.numPoints(); b++) {
 93	const double x  = temphisto.point(b).x();
 94	pair<double,double> ex = temphisto.point(b).xErrs();
 95	pair<double,double> ex2 = ex;
 96	if(ex2.first ==0.) ex2. first=0.0001;
 97	if(ex2.second==0.) ex2.second=0.0001;
 98	if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
 99	  mult->addPoint(x, sigma, ex, make_pair(error,error));
100	}
101	else {
102	  mult->addPoint(x, 0., ex, make_pair(0.,.0));
103	}
104      }
105    }
106
107    //@}
108
109
110    /// @name Histograms
111    //@{
112    CounterPtr _nJPsi;
113    //@}
114
115  };
116
117
118  // The hook for the plugin system
119  RIVET_DECLARE_PLUGIN(BESIII_2015_I1355215);
120
121
122}