Rivet analyses referenceBESIII_2018_I1699641Cross section for $e^+e^-\to K^0_SK^\pm\pi^\mp\pi^0$ and $K^0_SK^\pm\pi^\mp\eta$ between 3.90 to 4.60 GeVExperiment: BESIII (BEPC II) Inspire ID: 1699641 Status: VALIDATED Authors:
Beam energies: (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.2, 2.2); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3) GeV Run details:
Measurement of the cross section for $e^+e^-\to K^0_SK^\pm\pi^\mp\pi^0$ and $K^0_SK^\pm\pi^\mp\eta$ between 3.90 to 4.60 GeV. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2018_I1699641.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 Cross section for e+e- K0SK+-\pi+-\pi0 and K0SK+-pi-+eta between 3.90 to 4.60 GeV
10 class BESIII_2018_I1699641 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2018_I1699641);
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
26 // Book histograms
27 for(unsigned int ix=0;ix<2;++ix)
28 book(_sigma[ix], 1+ix, 1, 1);
29
30 for (const string& en : _sigma[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()) {
38 if(isCompatibleWithSqrtS(4.085)) _ecms="4.085"s;
39 else
40 MSG_ERROR("Beam energy incompatible with analysis.");
41 }
42 }
43
44
45 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
46 for (const Particle &child : p.children()) {
47 if(child.children().empty()) {
48 nRes[child.pid()]-=1;
49 --ncount;
50 }
51 else
52 findChildren(child,nRes,ncount);
53 }
54 }
55
56 /// Perform the per-event analysis
57 void analyze(const Event& event) {
58 const FinalState& fs = apply<FinalState>(event, "FS");
59
60 map<long,int> nCount;
61 int ntotal(0);
62 for (const Particle& p : fs.particles()) {
63 nCount[p.pid()] += 1;
64 ++ntotal;
65 }
66 // K K pi pi
67 if(ntotal==4 && nCount[310]==1 && nCount[111]==1 &&
68 ((nCount[ 321]==1 &&nCount[-211]==1) ||
69 (nCount[-321]==1 &&nCount[ 211]==1) ))
70 _sigma[0]->fill(_ecms);
71 // eta resonance
72 const FinalState& ufs = apply<FinalState>(event, "UFS");
73 for (const Particle& p : ufs.particles()) {
74 if(p.children().empty()) continue;
75 if(p.pid()!=221) continue;
76 map<long,int> nRes=nCount;
77 int ncount = ntotal;
78 findChildren(p,nRes,ncount);
79 if(ncount!=3) continue;
80 bool matched=true;
81 for(auto const & val : nRes) {
82 if(abs(val.first)==321 || abs(val.first)==211) {
83 continue;
84 }
85 else if(abs(val.first)==310) {
86 if(val.second!=1) {
87 matched = false;
88 break;
89 }
90 }
91 else if(val.second!=0) {
92 matched = false;
93 break;
94 }
95 }
96 if(matched==false) continue;
97 if((nCount[ 321] == 1 && nCount[-211] ==1) ||
98 (nCount[-321] == 1 && nCount[ 211] ==1))
99 _sigma[1]->fill(_ecms);
100 }
101 }
102
103
104 /// Normalise histograms etc., after the run
105 void finalize() {
106 double fact = crossSection()/ sumOfWeights() /picobarn;
107 for (unsigned int ix=0;ix<2;++ix)
108 scale(_sigma[ix],fact);
109 }
110 /// @}
111
112
113 /// @name Histograms
114 /// @{
115 BinnedHistoPtr<string> _sigma[2];
116 string _ecms;
117 /// @}
118
119 };
120
121
122 RIVET_DECLARE_PLUGIN(BESIII_2018_I1699641);
123
124
125}
|