Rivet analyses referenceBESIII_2024_I2824143Cross section for $e^+e^-\to\Xi^0\bar{\Xi}^0$ between 3.51 and 4.95 GeVExperiment: BESIII ( Inspire ID: 2824143 Status: VALIDATED NOHEPDATA Authors:
Beam energies: (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (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.1, 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.1); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.4, 2.4); (2.4, 2.4); (2.4, 2.4); (2.5, 2.5) GeV Run details:
Measurement of the cross section for $e^+e^-\to\Xi^0\bar{\Xi}^0$ between 3.51 and 4.95 GeV. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2024_I2824143.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4#include "Rivet/Projections/UnstableParticles.hh"
5
6namespace Rivet {
7
8
9 /// @brief Xi0 Xibar0 cross section
10 class BESIII_2024_I2824143 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2024_I2824143);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 // Initialise and register projections
23 declare(FinalState(), "FS");
24 declare(UnstableParticles(), "UFS");
25 book(_nXi, 1, 1, 1);
26 for (const string& en : _nXi.binning().edges<0>()) {
27 const double end = std::stod(en)*GeV;
28 if (isCompatibleWithSqrtS(end)) {
29 _ecms = en;
30 break;
31 }
32 }
33 if(_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
34 }
35
36 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
37 for(const Particle &child : p.children()) {
38 if (child.children().empty()) {
39 nRes[child.pid()]-=1;
40 --ncount;
41 }
42 else findChildren(child,nRes,ncount);
43 }
44 }
45
46 /// Perform the per-event analysis
47 void analyze(const Event& event) {
48 const FinalState& fs = apply<FinalState>(event, "FS");
49 // total hadronic and muonic cross sections
50 map<long,int> nCount;
51 int ntotal(0);
52 for (const Particle& p : fs.particles()) {
53 nCount[p.pid()] += 1;
54 ++ntotal;
55 }
56 // find the Xis
57 const FinalState& ufs = apply<UnstableParticles>(event, "UFS");
58 for (unsigned int ix=0;ix<ufs.particles().size();++ix) {
59 const Particle& p1 = ufs.particles()[ix];
60 if(abs(p1.pid())!=3322) continue;
61 bool matched = false;
62 // check fs
63 bool fs = true;
64 for (const Particle & child : p1.children()) {
65 if (child.pid()==p1.pid()) {
66 fs = false;
67 break;
68 }
69 }
70 if (!fs) continue;
71 // find the children
72 map<long,int> nRes = nCount;
73 int ncount = ntotal;
74 findChildren(p1,nRes,ncount);
75 for (unsigned int iy=ix+1;iy<ufs.particles().size();++iy) {
76 const Particle& p2 = ufs.particles()[iy];
77 if (p2.abspid()!=3322) continue;
78 // check fs
79 bool fs = true;
80 for (const Particle& child : p2.children()) {
81 if (child.pid()==p2.pid()) {
82 fs = false;
83 break;
84 }
85 }
86 if (!fs) continue;
87 map<long,int> nRes2 = nRes;
88 int ncount2 = ncount;
89 findChildren(p2,nRes2,ncount2);
90 if (ncount2!=0) continue;
91 matched=true;
92 for (const auto& val : nRes2) {
93 if (val.second!=0) {
94 matched = false;
95 break;
96 }
97 }
98 if (matched) {
99 _nXi->fill(_ecms);
100 break;
101 }
102 }
103 if (matched) break;
104 }
105 }
106
107
108 /// Normalise histograms etc., after the run
109 void finalize() {
110 scale(_nXi, crossSection()/ sumOfWeights() /femtobarn);
111 }
112
113 /// @}
114
115
116 /// @name Histograms
117 /// @{
118 BinnedHistoPtr<string> _nXi;
119 string _ecms;
120 /// @}
121
122
123 };
124
125
126 RIVET_DECLARE_PLUGIN(BESIII_2024_I2824143);
127
128}
|