rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

SND_2001_I533574

Cross section for $e^+e^-\to$ $K^+K^-$, $K_S^0K_L^0$ and $\pi^+\pi^-\pi^0$ near the $\phi$ resonance
Experiment: SND (VEPP-2M)
Inspire ID: 533574
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D63 (2001) 072002
Beams: e+ e-
Beam energies: ANY
Run details:
  • e+e- to hadrons

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