rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

OLYA_1981_I173076

Cross section for $e^+e^-\to K^+K^-$ at energies between 1. and 1.4 GeV
Experiment: OLYA (VEPP-2M)
Inspire ID: 173076
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Lett.B 107 (1981) 297-300
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. and 1.4 GeV

Source code: OLYA_1981_I173076.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/FinalState.hh"
 4#include "Rivet/Projections/FastJets.hh"
 5
 6namespace Rivet {
 7
 8
 9  /// @brief e+e- -> K+K-
10  class OLYA_1981_I173076 : public Analysis {
11  public:
12
13    /// Constructor
14    RIVET_DEFAULT_ANALYSIS_CTOR(OLYA_1981_I173076);
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
26      // Book histograms
27      book(_nkaon, 1, 1, 1);
28      for (const string& en : _nkaon.binning().edges<0>()) {
29        const size_t idx = en.find("-");
30        if(idx!=std::string::npos) {
31          const double emin = std::stod(en.substr(0,idx));
32          const double emax = std::stod(en.substr(idx+1,string::npos));
33          if(inRange(sqrtS()/GeV, emin, emax)) {
34            _ecms = en;
35            break;
36          }
37        }
38        else {
39          const double end = std::stod(en)*GeV;
40          if (isCompatibleWithSqrtS(end)) {
41            _ecms = en;
42            break;
43          }
44        }
45      }
46      if (_ecms.empty())
47        MSG_ERROR("Beam energy incompatible with analysis.");
48    }
49
50
51    /// Perform the per-event analysis
52    void analyze(const Event& event) {
53      const FinalState& fs = apply<FinalState>(event, "FS");
54      if(fs.particles().size()!=2) vetoEvent;
55      for (const Particle& p : fs.particles()) {
56	if(abs(p.pid())!=PID::KPLUS) vetoEvent;
57      }
58      _nkaon->fill(_ecms);
59    }
60
61
62    /// Normalise histograms etc., after the run
63    void finalize() {
64      scale(_nkaon, crossSection()/ sumOfWeights() /nanobarn);
65    }
66
67    /// @}
68
69
70    /// @name Histograms
71    /// @{
72    BinnedHistoPtr<string> _nkaon;
73    string _ecms;
74    /// @}
75
76
77  };
78
79
80  RIVET_DECLARE_PLUGIN(OLYA_1981_I173076);
81
82
83}