rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

CLEOC_2005_I693873

Cross section for $e^+e^-\to \pi^+\pi^-$, $K^+K^-$ and $p\bar{p}$ at 3.671 GeV
Experiment: CLEOC (CESR)
Inspire ID: 693873
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev.Lett. 95 (2005) 261803
Beams: e- e+
Beam energies: (1.8, 1.8) GeV
Run details:
  • e+e- to hadrons

Measurement of the cross section for $e^+e^-\to \pi^+\pi^-$, $K^+K^-$ and $p\bar{p}$ at 3.671 GeV by CLEO-c.

Source code: CLEOC_2005_I693873.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/FinalState.hh"
  4
  5namespace Rivet {
  6
  7
  8  /// @brief Add a short analysis description here
  9  class CLEOC_2005_I693873 : public Analysis {
 10  public:
 11
 12    /// Constructor
 13    RIVET_DEFAULT_ANALYSIS_CTOR(CLEOC_2005_I693873);
 14
 15
 16    /// @name Analysis methods
 17    //@{
 18
 19    /// Book histograms and initialise projections before the run
 20    void init() {
 21
 22      // Initialise and register projections
 23      declare(FinalState(), "FS");
 24
 25      // Book histograms
 26      book(_npipi, "TMP/npipi");
 27      book(_nKK, "TMP/nKK");
 28      book(_nppbar, "TMP/nppbar");
 29    }
 30
 31
 32    /// Perform the per-event analysis
 33    void analyze(const Event& event) {
 34
 35      const FinalState& fs = apply<FinalState>(event, "FS");
 36
 37      map<long,int> nCount;
 38      int ntotal(0);
 39      for (const Particle& p : fs.particles()) {
 40	nCount[p.pid()] += 1;
 41	++ntotal;
 42      }
 43      if(ntotal!=2) vetoEvent;
 44      
 45      if(nCount[211]==1 && nCount[-211]==1)
 46	_npipi->fill();
 47      else if(nCount[321]==1 && nCount[-321]==1)
 48	_nKK->fill();
 49      else if(nCount[2212]==1 && nCount[-2212]==1)
 50	_nppbar->fill();
 51    }
 52
 53
 54    /// Normalise histograms etc., after the run
 55    void finalize() {
 56
 57      for(unsigned int ix=1;ix<4;++ix) {
 58	double sigma = 0., error = 0.;
 59	if(ix==1) {
 60	  sigma =  _npipi->val();
 61	  error =  _npipi->err();
 62	}
 63	else if(ix==2) {
 64	  sigma = _nKK->val();
 65	  error = _nKK->err();
 66	}
 67     	else if(ix==3) {
 68	  sigma = _nppbar->val();
 69	  error = _nppbar->err();
 70	}
 71    	sigma *= crossSection()/ sumOfWeights() /picobarn;
 72    	error *= crossSection()/ sumOfWeights() /picobarn;
 73	Scatter2D temphisto(refData(1, 1, ix));
 74	Scatter2DPtr mult;
 75	book(mult, 1, 1, ix);
 76	for (size_t b = 0; b < temphisto.numPoints(); b++) {
 77	  const double x  = temphisto.point(b).x();
 78	  pair<double,double> ex = temphisto.point(b).xErrs();
 79	  pair<double,double> ex2 = ex;
 80	  if(ex2.first ==0.) ex2. first=0.0001;
 81	  if(ex2.second==0.) ex2.second=0.0001;
 82	  if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
 83	    mult->addPoint(x, sigma, ex, make_pair(error,error));
 84	  }
 85	  else {
 86	    mult->addPoint(x, 0., ex, make_pair(0.,.0));
 87	  }
 88	}
 89      }
 90
 91    }
 92
 93    //@}
 94
 95
 96    /// @name Histograms
 97    //@{
 98    CounterPtr _npipi,_nKK,_nppbar;
 99    //@}
100
101
102  };
103
104
105  // The hook for the plugin system
106  RIVET_DECLARE_PLUGIN(CLEOC_2005_I693873);
107
108
109}