Rivet analyses referenceBESIII_2020_I1788734Cross section for $e^+e^-\to \phi\eta^\prime$ for $\sqrt{s}$ between 3.05 and 3.08 GeVExperiment: BESIII (BEPC) Inspire ID: 1788734 Status: VALIDATED Authors:
Beam energies: (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.2, 1.2); (1.3, 1.3); (1.3, 1.3); (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
Measurement of the cross section for $e^+e^-\to \phi\eta^\prime$ for $\sqrt{s}$ between 3.05 and 3.08 GeV by BESIII. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2020_I1788734.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- > phi eta'
10 class BESIII_2020_I1788734 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2020_I1788734);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22
23 // Initialise and register projections
24 declare(FinalState(), "FS");
25 declare(UnstableParticles(), "UFS");
26 book(_nEtaPhi, 1, 1, 1);
27
28 for (const string& en : _nEtaPhi.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 /// Perform the per-event analysis
50 void analyze(const Event& event) {
51 const FinalState& fs = apply<FinalState>(event, "FS");
52
53 map<long,int> nCount;
54 int ntotal(0);
55 for (const Particle& p : fs.particles()) {
56 nCount[p.pid()] += 1;
57 ++ntotal;
58 }
59 const FinalState& ufs = apply<FinalState>(event, "UFS");
60 for (const Particle& p : ufs.particles(Cuts::pid==PID::PHI)) {
61 if(p.children().empty()) continue;
62 map<long,int> nRes=nCount;
63 int ncount = ntotal;
64 findChildren(p,nRes,ncount);
65 for (const Particle& p2 : ufs.particles(Cuts::pid==PID::ETAPRIME)) {
66 if(p2.parents()[0].isSame(p)) continue;
67 map<long,int> nResB = nRes;
68 int ncountB = ncount;
69 findChildren(p2,nResB,ncountB);
70 if(ncountB!=0) continue;
71 bool matched2 = true;
72 for(auto const & val : nResB) {
73 if(val.second!=0) {
74 matched2 = false;
75 break;
76 }
77 }
78 if(matched2) {
79 _nEtaPhi->fill(_ecms);
80 }
81 }
82 }
83 }
84
85
86 /// Normalise histograms etc., after the run
87 void finalize() {
88 scale(_nEtaPhi,crossSection()/ sumOfWeights() /picobarn);
89 }
90
91 /// @}
92
93
94 /// @name Histograms
95 /// @{
96 BinnedHistoPtr<string> _nEtaPhi;
97 string _ecms;
98 /// @}
99
100 };
101
102
103 RIVET_DECLARE_PLUGIN(BESIII_2020_I1788734);
104
105}
|