Rivet analyses referenceBESIII_2024_I2802333Cross section for $e^+e^-\to K^-\bar\Xi^+\Lambda^0/\Sigma^0$ for $\sqrt{s}$ from 3.510 and 4.914 GeVExperiment: BESIII (BEPC) Inspire ID: 2802333 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); (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.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.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 K^-\bar\Xi^+\Lambda^0/\Sigma^0$ for $\sqrt{s}$ from 3.510 and 4.914 GeV by the BESIII collaboration. N.B. the cross sections stated are only for the charge combinations, although both charge combinations are used and the results averaged. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2024_I2802333.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- > K- Xibar+ Lambda0/Sigma0
10 class BESIII_2024_I2802333 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2024_I2802333);
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 declare(UnstableParticles(Cuts::abspid==3122 or Cuts::abspid==3212 or Cuts::abspid==3312), "UFS");
25 // counter
26 for(unsigned int ix=0;ix<2;++ix)
27 book(_sigma[ix], 1+ix, 1, 1);
28 for (const string& en : _sigma[0].binning().edges<0>()) {
29 const double end = std::stod(en)*GeV;
30 if (isCompatibleWithSqrtS(end)) {
31 _ecms = en;
32 break;
33 }
34 }
35 if (_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
36 }
37
38 void findChildren(const Particle& p,map<long,int>& nRes, int &ncount) {
39 for (const Particle& child : p.children()) {
40 if (child.children().empty()) {
41 nRes[child.pid()]-=1;
42 --ncount;
43 }
44 else {
45 findChildren(child,nRes,ncount);
46 }
47 }
48 }
49
50
51 /// Perform the per-event analysis
52 void analyze(const Event& event) {
53 const FinalState& fs = apply<FinalState>(event, "FS");
54
55 map<long,int> nCount;
56 int ntotal(0);
57 for (const Particle& p : fs.particles()) {
58 nCount[p.pid()] += 1;
59 ++ntotal;
60 }
61 const FinalState& ufs = apply<FinalState>(event, "UFS");
62 // first for the Xi
63 for (const Particle& xi : ufs.particles(Cuts::abspid==3312)) {
64 bool matched = false;
65 map<long,int> nRes1=nCount;
66 int ncount1 = ntotal;
67 findChildren(xi,nRes1,ncount1);
68 int sign = xi.pid()/xi.abspid();
69 for (const Particle& lam : ufs.particles(Cuts::pid==-sign*3122 or Cuts::pid==-sign*3212)) {
70 map<long,int> nRes2=nRes1;
71 int ncount2 = ncount1;
72 findChildren(lam,nRes2,ncount2);
73 if (ncount2!=1) continue;
74 matched = true;
75 for (auto const& val : nRes2) {
76 if (val.first== sign*321) {
77 if (val.second!=1) {
78 matched = false;
79 break;
80 }
81 }
82 else if (val.second!=0) {
83 matched = false;
84 break;
85 }
86 }
87 if(matched) {
88 if(lam.abspid()==3122) _sigma[0]->fill(_ecms);
89 else _sigma[1]->fill(_ecms);
90 break;
91 }
92 }
93 if(matched) break;
94 }
95 }
96
97
98 /// Normalise histograms etc., after the run
99 void finalize() {
100 // factor of 1/2 from considering botyh charge states
101 scale(_sigma, 0.5*crossSection()/ sumOfWeights() /femtobarn);
102 }
103
104 /// @}
105
106 /// @name Histograms
107 /// @{
108 BinnedHistoPtr<string> _sigma[2];
109 string _ecms;
110 /// @}
111
112 };
113
114
115 RIVET_DECLARE_PLUGIN(BESIII_2024_I2802333);
116
117}
|