rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

CMD3_2013_I1217420

Cross section for $e^+e^-\to3(\pi^+\pi^-)$ below 2 GeV by CMD3
Experiment: CMD3 (VEPP-2M)
Inspire ID: 1217420
Status: VALIDATED
Authors:
  • Peter Richrdson
References: Beams: e+ e-
Beam energies: ANY
Run details:
  • e+ e- to hadrons

Measurement of the cross section for $e^+e^-\to3(\pi^+\pi^-)$ for energies below 2 GeV by the CMD3 experiment

Source code: CMD3_2013_I1217420.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- -> 3(pi+pi-)
 10  class CMD3_2013_I1217420 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(CMD3_2013_I1217420);
 15
 16
 17    /// @name Analysis methods
 18    //@{
 19
 20    /// Book histograms and initialise projections before the run
 21    void init() {
 22
 23      // Initialise and register projections
 24      declare(FinalState(), "FS");
 25      declare(UnstableParticles(), "UFS");
 26
 27      // Book histograms
 28
 29      book(_c_all, "/TMP/all");
 30
 31    }
 32
 33    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 34      for(const Particle &child : p.children()) {
 35	if(child.children().empty()) {
 36	  --nRes[child.pid()];
 37	  --ncount;
 38	}
 39	else
 40	  findChildren(child,nRes,ncount);
 41      }
 42    }
 43
 44    /// Perform the per-event analysis
 45    void analyze(const Event& event) {
 46      // find the final-state particles
 47      const FinalState& fs = apply<FinalState>(event, "FS");
 48      map<long,int> nCount;
 49      int ntotal(0);
 50      for (const Particle& p : fs.particles()) {
 51	nCount[p.pid()] += 1;
 52	++ntotal;
 53      }
 54      if(ntotal==6 && nCount[211]==3 && nCount[-211]==3) {
 55	_c_all->fill();
 56      }
 57    }
 58
 59
 60    /// Normalise histograms etc., after the run
 61    void finalize() {
 62
 63      double fact = crossSection()/nanobarn/sumOfWeights();
 64      double sigma = _c_all->val()*fact;
 65      double error = _c_all->err()*fact;
 66      for(unsigned int ihist=1;ihist<4;++ihist) {
 67	Scatter2D temphisto(refData(1, 1,ihist));
 68	Scatter2DPtr  mult;
 69	book(mult, 1, 1, ihist);
 70	for (size_t b = 0; b < temphisto.numPoints(); b++) {
 71	  const double x  = temphisto.point(b).x();
 72	  pair<double,double> ex = temphisto.point(b).xErrs();
 73	  pair<double,double> ex2 = ex;
 74	  if(ex2.first ==0.) ex2. first=0.0001;
 75	  if(ex2.second==0.) ex2.second=0.0001;
 76	  if (inRange(sqrtS()/MeV, x-ex2.first, x+ex2.second)) {
 77	    mult->addPoint(x, sigma, ex, make_pair(error,error));
 78	  }
 79	  else {
 80	    mult->addPoint(x, 0., ex, make_pair(0.,.0));
 81	  }
 82	}
 83      }
 84    }
 85
 86    //@}
 87
 88
 89    /// @name Histograms
 90    //@{
 91    CounterPtr _c_all;
 92    //@}
 93
 94
 95  };
 96
 97
 98  // The hook for the plugin system
 99  RIVET_DECLARE_PLUGIN(CMD3_2013_I1217420);
100
101
102}