rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

SND_2016_I1484677

Cross section for $e^+e^-\to K^+K^-$ between 1.05 and 2 GeV
Experiment: SND (VEPP-2M)
Inspire ID: 1484677
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D94 (2016) no.11, 112006
Beams: e+ e-
Beam energies: ANY
Run details:
  • e+ e- to hadrons

Measurement of the cross section for $e^+e^-\to K^+K^-$ at energies between 1.05 and 2 GeV

Source code: SND_2016_I1484677.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 SND_2016_I1484677 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(SND_2016_I1484677);
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(_nkaon, "TMP/kaon");
27    }
28
29
30    /// Perform the per-event analysis
31    void analyze(const Event& event) {
32      const FinalState& fs = apply<FinalState>(event, "FS");
33      if(fs.particles().size()!=2) vetoEvent;
34      for (const Particle& p : fs.particles()) {
35	if(abs(p.pid())!=PID::KPLUS) vetoEvent;
36      }
37      _nkaon->fill();
38    }
39
40
41    /// Normalise histograms etc., after the run
42    void finalize() {
43      double sigma = _nkaon->val();
44      double error = _nkaon->err();
45      sigma *= crossSection()/ sumOfWeights() /nanobarn;
46      error *= crossSection()/ sumOfWeights() /nanobarn;
47      for(unsigned int ix=1;ix<3;++ix) {
48	Scatter2D temphisto(refData(ix, 1, 1));
49	Scatter2DPtr mult;
50	book(mult, ix, 1, 1);
51	for (size_t b = 0; b < temphisto.numPoints(); b++) {
52	  const double x  = temphisto.point(b).x();
53	  pair<double,double> ex = temphisto.point(b).xErrs();
54	  pair<double,double> ex2 = ex;
55	  if(ex2.first ==0.) ex2. first=0.0001;
56	  if(ex2.second==0.) ex2.second=0.0001;
57	  if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
58	    mult->addPoint(x, sigma, ex, make_pair(error,error));
59	  }
60	  else {
61	    mult->addPoint(x, 0., ex, make_pair(0.,.0));
62	  }
63	}
64      }
65    }
66
67    //@}
68
69
70    /// @name Histograms
71    //@{
72    CounterPtr _nkaon;
73    //@}
74
75
76  };
77
78
79  // The hook for the plugin system
80  RIVET_DECLARE_PLUGIN(SND_2016_I1484677);
81
82
83}