Rivet analyses referenceBESIII_2022_I2033007$e^+e^-\to K^+K^-\pi^0$ cross section between 2 and 3.08 GeVExperiment: BESIII (BEPC) Inspire ID: 2033007 Status: VALIDATED Authors:
Beam energies: (1.0, 1.0); (1.0, 1.0); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.3, 1.3); (1.3, 1.3); (1.4, 1.4); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5) GeV Run details:
Measurement of $e^+e^-\to K^+K^-\pi^0$ cross section between 2 and 3.08 GeV. In addition the cross sections for the $\phi\pi^0$, $K^*+K^-$ and $K^*(1430)^+K^-$. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2022_I2033007.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+K-pi0
10 class BESIII_2022_I2033007 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2022_I2033007);
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 histograms
26 for(unsigned int ix=0;ix<4;++ix) {
27 book(_nMeson[ix], 1+ix, 1, 1);
28 }
29
30 for (const string& en : _nMeson[0].binning().edges<0>()) {
31 const double end = std::stod(en)*GeV;
32 if (isCompatibleWithSqrtS(end)) {
33 _ecms = en;
34 break;
35 }
36 }
37 if(_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
38 }
39
40 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
41 for (const Particle &child : p.children()) {
42 if(child.children().empty()) {
43 nRes[child.pid()]-=1;
44 --ncount;
45 }
46 else
47 findChildren(child,nRes,ncount);
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 if(ntotal==3 && nCount[321]==1 &&
62 nCount[-321]==1 && nCount[111]==1)
63 _nMeson[0]->fill(_ecms);
64 const FinalState& ufs = apply<FinalState>(event, "UFS");
65 for (const Particle& p : ufs.particles(Cuts::abspid==323 or Cuts::abspid==325 or Cuts::pid==333)) {
66 if(p.children().empty()) continue;
67 map<long,int> nRes = nCount;
68 int ncount = ntotal;
69 findChildren(p,nRes,ncount);
70 if(ncount!=1) continue;
71 // phi pi0
72 long id = p.pid()>0 ? -321 : 321;
73 if (p.pid()==333) id = 111;
74 bool matched = true;
75 for(auto const & val : nRes) {
76 if(val.first==id) {
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(p.pid()==333)
89 _nMeson[1]->fill(_ecms);
90 else if (p.abspid()==325)
91 _nMeson[2]->fill(_ecms);
92 else
93 _nMeson[3]->fill(_ecms);
94 }
95 }
96 }
97
98
99 /// Normalise histograms etc., after the run
100 void finalize() {
101 for(unsigned int ix=0;ix<4;++ix)
102 scale(_nMeson[ix], crossSection()/ sumOfWeights() /picobarn);
103 }
104
105 /// @}
106
107
108 /// @name Histograms
109 /// @{
110 BinnedHistoPtr<string> _nMeson[4];
111 string _ecms;
112 /// @}
113
114
115 };
116
117
118 RIVET_DECLARE_PLUGIN(BESIII_2022_I2033007);
119
120}
|