Rivet analyses referenceCMD3_2022_I2108984Cross section for $e^+e^-\to K^0_SK^\pm\pi^\mp\pi^+\pi^-$ between 1.6 and 2 GeV by CMD3Experiment: CMD3 (VEPP-2M) Inspire ID: 2108984 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to K^0_SK^\pm\pi^\mp\pi^+\pi^-$, and the resonant sub-processes $f_1(1285)\pi^+\pi^-$, for energies between 1.6 and 2 GeV by the CMD3 experiment Source code: CMD3_2022_I2108984.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-> KS0 Kpi pi+pi-
10 class CMD3_2022_I2108984 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(CMD3_2022_I2108984);
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::pid==20223), "UFS");
25 book(_sigma,1,1,1);
26 for (const string& en : _sigma.binning().edges<0>()) {
27 const size_t idx = en.find("-");
28 if(idx!=std::string::npos) {
29 const double emin = std::stod(en.substr(0,idx));
30 const double emax = std::stod(en.substr(idx+1,string::npos));
31 if(inRange(sqrtS()/MeV, emin, emax)) {
32 _ecms.push_back(en);
33 }
34 }
35 else {
36 const double end = std::stod(en)*MeV;
37 if (isCompatibleWithSqrtS(end)) {
38 _ecms.push_back(en);
39 }
40 }
41 }
42 for (unsigned int ix=0; ix<2; ++ix) {
43 book(_res[ix], "TMP/c_"+toString(ix),refData(2, 1, ix+1));
44 }
45 }
46
47 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
48 for(const Particle &child : p.children()) {
49 if (child.children().empty()) {
50 --nRes[child.pid()];
51 --ncount;
52 }
53 else {
54 findChildren(child,nRes,ncount);
55 }
56 }
57 }
58
59 /// Perform the per-event analysis
60 void analyze(const Event& event) {
61 // find the final-state particles
62 const FinalState& fs = apply<FinalState>(event, "FS");
63 map<long,int> nCount;
64 int ntotal(0);
65 for (const Particle& p : fs.particles()) {
66 nCount[p.pid()] += 1;
67 ++ntotal;
68 }
69 // the FS cross section
70 bool foundFS = false;
71 if (ntotal==5 && nCount[310]==1 &&
72 ( ( nCount[211]==2 && nCount[-211]==1 && nCount[-321] ==1 ) ||
73 ( nCount[211]==1 && nCount[-211]==2 && nCount[ 321] ==1 ) ) ) {
74 foundFS = true;
75 for(const string & en : _ecms) _sigma->fill(en);
76 }
77 // check for intermediate f_1
78 for (const Particle& p : apply<FinalState>(event, "UFS").particles()) {
79 if (p.children().empty()) continue;
80 map<long,int> nRes = nCount;
81 int ncount = ntotal;
82 findChildren(p,nRes,ncount);
83 if(ncount!=2) continue;
84 bool matched = true;
85 for (const auto& val : nRes) {
86 if (abs(val.first)==211 ) {
87 if (val.second !=1) {
88 matched = false;
89 break;
90 }
91 }
92 else if (val.second!=0) {
93 matched = false;
94 break;
95 }
96 }
97 if (matched) {
98 _res[1]->fill(sqrtS()/MeV);
99 if (foundFS) _res[0]->fill(sqrtS()/MeV);
100 break;
101 }
102 }
103 }
104
105
106 /// Normalise histograms etc., after the run
107 void finalize() {
108 const double fact = crossSection()/nanobarn/sumOfWeights();
109 scale(_sigma,fact);
110 for(unsigned int ix=0;ix<2;++ix) {
111 scale(_res[ix], fact);
112 Estimate1DPtr tmp;
113 book(tmp,2,1,1+ix);
114 barchart(_res[ix],tmp);
115 }
116 }
117
118 /// @}
119
120
121 /// @name Histograms
122 /// @{
123 BinnedHistoPtr<string> _sigma;
124 Histo1DPtr _res[2];
125 vector<string> _ecms;
126 /// @}
127
128
129 };
130
131
132 RIVET_DECLARE_PLUGIN(CMD3_2022_I2108984);
133
134}
|