Rivet analyses referenceBESIII_2024_I2748736$e^+e^-\to\Sigma^+\bar{\Sigma}^-$ cross section for centre-of-mass energies between 3.510 and 4.951 GeVExperiment: BESIII (BEPC) Inspire ID: 2748736 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.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.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); (2.5, 2.5) GeV Run details:
$e^+e^-\to\Sigma^+\bar{\Sigma}^-$ cross section for centre-of-mass energies between 3.510 and 4.951 GeV. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2024_I2748736.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 e+ e- > sigma+ sigmabar-
10 class BESIII_2024_I2748736 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2024_I2748736);
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(Cuts::abspid==3222), "UFS");
25 book(_sigma_plus ,1,1,1);
26
27 for (const string& en : _sigma_plus.binning().edges<0>()) {
28 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 void findChildren(const Particle& p, map<long,int>& nRes, int &ncount) {
38 for (const Particle& child : p.children()) {
39 if (child.children().empty()) {
40 nRes[child.pid()]-=1;
41 --ncount;
42 }
43 else {
44 findChildren(child,nRes,ncount);
45 }
46 }
47 }
48
49 /// Perform the per-event analysis
50 void analyze(const Event& event) {
51 const FinalState& fs = apply<FinalState>(event, "FS");
52 // total hadronic and muonic cross sections
53 map<long,int> nCount;
54 int ntotal(0);
55 for (const Particle& p : fs.particles()) {
56 nCount[p.pid()] += 1;
57 ++ntotal;
58 }
59 // find the Sigmas
60 const FinalState& ufs = apply<UnstableParticles>(event, "UFS");
61 for (unsigned int ix=0;ix<ufs.particles().size();++ix) {
62 const Particle& p1 = ufs.particles()[ix];
63 bool matched = false;
64 // check fs
65 bool fs = true;
66 for (const Particle& child : p1.children()) {
67 if (child.pid()==p1.pid()) {
68 fs = false;
69 break;
70 }
71 }
72 if (!fs) continue;
73 // find the children
74 map<long,int> nRes = nCount;
75 int ncount = ntotal;
76 findChildren(p1,nRes,ncount);
77 for (unsigned int iy=ix+1; iy<ufs.particles().size(); ++iy) {
78 const Particle& p2 = ufs.particles()[iy];
79 if (p2.pid() != -p1.pid()) continue;
80 // check fs
81 bool fs = true;
82 for (const Particle& child : p2.children()) {
83 if (child.pid()==p2.pid()) {
84 fs = false;
85 break;
86 }
87 }
88 if (!fs) continue;
89 map<long,int> nRes2 = nRes;
90 int ncount2 = ncount;
91 findChildren(p2,nRes2,ncount2);
92 if (ncount2!=0) continue;
93 matched=true;
94 for (const auto& val : nRes2) {
95 if (val.second!=0) {
96 matched = false;
97 break;
98 }
99 }
100 if(matched) {
101 _sigma_plus->fill(_ecms);
102 break;
103 }
104 }
105 if (matched) break;
106 }
107 }
108
109
110 /// Normalise histograms etc., after the run
111 void finalize() {
112 scale(_sigma_plus, crossSection()/ sumOfWeights() /femtobarn);
113 }
114
115 /// @}
116
117
118 /// @name Histograms
119 /// @{
120 BinnedHistoPtr<string> _sigma_plus;
121 string _ecms;
122 /// @}
123
124
125 };
126
127
128 RIVET_DECLARE_PLUGIN(BESIII_2024_I2748736);
129
130}
|