Rivet analyses referenceBESIII_2019_I1743841Cross section for $K^+K^-K^+K^-$ and $K^+K^-\phi$ for $E_{\text{CMS}}=2.10$ to $3.08$ GeVExperiment: BESIII (BEPC) Inspire ID: 1743841 Status: VALIDATED Authors:
Beam energies: (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.2, 1.2); (1.3, 1.3); (1.3, 1.3); (1.4, 1.4); (1.4, 1.4); (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 the cross section for $e^+e^- \to$ $K^+K^-K^+K^-$ and $K^+K^-\phi$ for center of mass energies between 2.10 and 3.08 GeV by the BESIII experiment. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2019_I1743841.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 2K+2K- and K+K- phi cross section
10 class BESIII_2019_I1743841 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2019_I1743841);
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 counters
26 for(unsigned int ix=0;ix<2;++ix)
27 book(_sigma[ix],ix+1, 1, 1);
28
29 for (const string& en : _sigma[0].binning().edges<0>()) {
30 const double end = std::stod(en)*GeV;
31 if (isCompatibleWithSqrtS(end)) {
32 _ecms = en;
33 break;
34 }
35 }
36 if(_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
37 }
38
39 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
40 for( const Particle &child : p.children()) {
41 if(child.children().empty()) {
42 nRes[child.pid()]-=1;
43 --ncount;
44 }
45 else
46 findChildren(child,nRes,ncount);
47 }
48 }
49
50 /// Perform the per-event analysis
51 void analyze(const Event& event) {
52 const FinalState& fs = apply<FinalState>(event, "FS");
53
54 map<long,int> nCount;
55 int ntotal(0);
56 for (const Particle& p : fs.particles()) {
57 nCount[p.pid()] += 1;
58 ++ntotal;
59 }
60 if(ntotal==4 && nCount[321]==2 && nCount[-321]==2)
61 _sigma[0]->fill(_ecms);
62 const FinalState& ufs = apply<FinalState>(event, "UFS");
63 for (const Particle& p : ufs.particles(Cuts::pid==333)) {
64 if(p.children().empty()) continue;
65 map<long,int> nRes=nCount;
66 int ncount = ntotal;
67 findChildren(p,nRes,ncount);
68 // phi K+K-
69 if(ncount==2) {
70 bool matched = true;
71 for(auto const & val : nRes) {
72 if(abs(val.first)==321) {
73 if(val.second!=1) {
74 matched = false;
75 break;
76 }
77 }
78 else if(val.second!=0) {
79 matched = false;
80 break;
81 }
82 }
83 if(matched)
84 _sigma[1]->fill(_ecms);
85 }
86 }
87 }
88
89
90 /// Normalise histograms etc., after the run
91 void finalize() {
92 for(unsigned int ix=0;ix<2;++ix)
93 scale(_sigma[ix],crossSection()/ sumOfWeights() /picobarn);
94 }
95
96 /// @}
97
98
99 /// @name Histograms
100 /// @{
101 BinnedHistoPtr<string> _sigma[2];
102 string _ecms;
103 /// @}
104
105 };
106
107
108 RIVET_DECLARE_PLUGIN(BESIII_2019_I1743841);
109
110}
|