Rivet analyses referenceBESIII_2018_I1704558Cross section for $e^+e^-\to K^+K^-$ between 2.00 and 3.08 GeVExperiment: BESIII (BEPC II) Inspire ID: 1704558 Status: VALIDATED Authors:
Beam energies: (1.0, 1.0); (1.0, 1.0); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.3, 1.3); (1.3, 1.3); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5) GeV Run details:
Measurement of the cross section for $e^+e^-\to K^+K^-$ at energies between 2.00 and 3.08 GeV. Useful for comparing models of the kaon form factor. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2018_I1704558.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief Cross section for e+e- -> K+K- between 2.00 and 3.08 GeV
9 class BESIII_2018_I1704558 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2018_I1704558);
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, 1, 1, 1);
27 for (const string& en : _nkaon.binning().edges<0>()) {
28 const double end = std::stod(en)*GeV;
29 if (isCompatibleWithSqrtS(end)) {
30 _ecms = en;
31 break;
32 }
33 }
34 if(_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
35 }
36
37
38 /// Perform the per-event analysis
39 void analyze(const Event& event) {
40 const FinalState& fs = apply<FinalState>(event, "FS");
41 if(fs.particles().size()!=2) vetoEvent;
42 for (const Particle& p : fs.particles()) {
43 if(abs(p.pid())!=PID::KPLUS) vetoEvent;
44 }
45 _nkaon->fill(_ecms);
46 }
47
48
49 /// Normalise histograms etc., after the run
50 void finalize() {
51 scale(_nkaon, crossSection()/ sumOfWeights() /picobarn);
52 }
53
54 /// @}
55
56
57 /// @name Histograms
58 /// @{
59 BinnedHistoPtr<string> _nkaon;
60 string _ecms;
61 /// @}
62
63
64 };
65
66
67 RIVET_DECLARE_PLUGIN(BESIII_2018_I1704558);
68
69
70}
|