Rivet analyses referenceBESIII_2021_I1868813Cross section for $K^0_S$ production for energies between 3.645 and 3.7 GeVExperiment: BESIII (BEPC) Inspire ID: 1868813 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Cross section for the production of $K^0_S$ for energies between 3.645 and 3.7, i.e near the $\psi(2S)$ resonace measured by BESIII. Source code: BESIII_2021_I1868813.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief kaon production at low energies
9 class BESIII_2021_I1868813 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2021_I1868813);
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(UnstableParticles(), "UFS");
24 book(_c_kaons , "/TMP/sigma_kaons");
25 }
26
27
28 /// Perform the per-event analysis
29 void analyze(const Event& event) {
30 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
31 unsigned int count = ufs.particles(Cuts::pid==310).size();
32 _c_kaons->fill(count);
33 }
34
35
36 /// Normalise histograms etc., after the run
37 void finalize() {
38 Estimate1DPtr mult;
39 book(mult,1, 1, 1);
40 double fact = crossSection()/nanobarn/sumOfWeights();
41 double sigma = _c_kaons->val()*fact;
42 double error = _c_kaons->err()*fact;
43 for (auto& b : mult->bins()) {
44 if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
45 b.set(sigma, error);
46 }
47 }
48 }
49
50 ///@}
51
52
53 /// @name Histograms
54 ///@{
55 CounterPtr _c_kaons;
56 ///@}
57
58
59 };
60
61
62 RIVET_DECLARE_PLUGIN(BESIII_2021_I1868813);
63
64}
|