rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2005_I676691

$e^+e^- \to$ $2\pi^+2\pi^-$, $K^+K^-\pi^+\pi^-$ and $2K^+2K^-$ cross-sections between the threshold to 4.5 GeV
Experiment: BABAR (PEP-II)
Inspire ID: 676691
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D71 (2005) 052001, 2005
Beams: e+ e-
Beam energies: ANY
Run details:
  • e+e- to hadrons

$e^+e^- \to$ $2\pi^+2\pi^-$, $K^+K^-\pi^+\pi^-$ and $2K^+2K^-$ cross-sections measured by BaBar using radiative return from threshold to 4.5 GeV.

Source code: BABAR_2005_I676691.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 BABAR_2005_I676691 : public Analysis {
 10  public:
 11
 12    /// Constructor
 13    RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2005_I676691);
 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(_c2pip2pim  , "TMP/2pip2pim");
 26      book(_cKpKmpippim, "TMP/KpKmpippim");
 27      book(_c2Kp2Km    , "TMP/2Kp2Km");
 28      
 29    }
 30
 31
 32    /// Perform the per-event analysis
 33    void analyze(const Event& event) {
 34      const FinalState& fs = apply<FinalState>(event, "FS");
 35
 36      map<long,int> nCount;
 37      int ntotal(0);
 38      for (const Particle& p : fs.particles()) {
 39	nCount[p.pid()] += 1;
 40	++ntotal;
 41      }
 42
 43      if(ntotal!=4) vetoEvent;
 44      
 45      if( nCount[211]==2 && nCount[-211]==2)
 46	_c2pip2pim->fill();
 47      else if(nCount[321]==1 && nCount[-321]==1 && nCount[211]==1 && nCount[-211]==1)
 48	_cKpKmpippim->fill();
 49      else if( nCount[321]==2 && nCount[-321]==2)
 50	_c2Kp2Km->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 =  _c2pip2pim->val();
 61	  error =  _c2pip2pim->err();
 62	}
 63	else if(ix==2) {
 64	  sigma = _cKpKmpippim->val();
 65	  error = _cKpKmpippim->err();
 66	}
 67     	else if(ix==3) {
 68	  sigma =  _c2Kp2Km->val();
 69	  error =  _c2Kp2Km->err();
 70	}
 71    	sigma *= crossSection()/ sumOfWeights() /nanobarn;
 72    	error *= crossSection()/ sumOfWeights() /nanobarn;
 73	Scatter2D temphisto(refData(ix, 1, 1));
 74	Scatter2DPtr  mult;
 75        book(mult, ix, 1, 1);
 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    /// @name Histograms
 96    //@{
 97    CounterPtr _c2pip2pim, _cKpKmpippim, _c2Kp2Km;
 98    //@}
 99
100
101  };
102
103
104  // The hook for the plugin system
105  RIVET_DECLARE_PLUGIN(BABAR_2005_I676691);
106
107
108}