Rivet analyses referenceBESIII_2018_I1691798Cross-section for $K^0_SK^\pm\pi^\mp$ between 3.8 and 4.6 GeVExperiment: BESIII (BEPC II) Inspire ID: 1691798 Status: VALIDATED Authors:
Beam energies: (1.9, 1.9); (1.9, 1.9); (2.0, 2.0); (2.0, 2.0); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.3, 2.3) GeV Run details:
Measurement of the cross section for $K^0_SK^\pm\pi^\mp$ between 3.8 and 4.6 GeV. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2018_I1691798.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief Cross-section for KSO K+-pi-+ between 3.8 and 4.6 GeV
9 class BESIII_2018_I1691798 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2018_I1691798);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 // Initialise and register projections
22 declare(FinalState(), "FS");
23 book(_nKKpi, 1, 1, 1);
24
25 for (const string& en : _nKKpi.binning().edges<0>()) {
26 const double end = std::stod(en)*GeV;
27 if (isCompatibleWithSqrtS(end)) {
28 _ecms = en;
29 break;
30 }
31 }
32 if(_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
33 }
34
35
36 /// Perform the per-event analysis
37 void analyze(const Event& event) {
38 const FinalState& fs = apply<FinalState>(event, "FS");
39
40 map<long,int> nCount;
41 int ntotal(0);
42 for (const Particle& p : fs.particles()) {
43 nCount[p.pid()] += 1;
44 ++ntotal;
45 }
46
47 if(ntotal==3 && nCount[310]==1 &&
48 ((nCount[ 321]=1 && nCount[-211] ==1) ||
49 (nCount[-321]=1 && nCount[ 211] ==1)))
50 _nKKpi->fill(_ecms);
51 }
52
53
54 /// Normalise histograms etc., after the run
55 void finalize() {
56 scale(_nKKpi, crossSection()/ sumOfWeights() /picobarn);
57 }
58
59 /// @}
60
61
62 /// @name Histograms
63 /// @{
64 BinnedHistoPtr<string> _nKKpi;
65 string _ecms;
66 /// @}
67
68
69 };
70
71
72 RIVET_DECLARE_PLUGIN(BESIII_2018_I1691798);
73
74
75}
|