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: ANY
Measurement of the cross section for $e^+e^-\to \phi\eta^\prime$ for $\sqrt{s}$ between 3.05 and 3.08 GeV by BESIII 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, "TMP/phietaprime");
27 }
28
29 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
30 for (const Particle &child : p.children()) {
31 if(child.children().empty()) {
32 nRes[child.pid()]-=1;
33 --ncount;
34 }
35 else
36 findChildren(child,nRes,ncount);
37 }
38 }
39
40 /// Perform the per-event analysis
41 void analyze(const Event& event) {
42 const FinalState& fs = apply<FinalState>(event, "FS");
43
44 map<long,int> nCount;
45 int ntotal(0);
46 for (const Particle& p : fs.particles()) {
47 nCount[p.pid()] += 1;
48 ++ntotal;
49 }
50 const FinalState& ufs = apply<FinalState>(event, "UFS");
51 for (const Particle& p : ufs.particles(Cuts::pid==PID::PHI)) {
52 if(p.children().empty()) continue;
53 map<long,int> nRes=nCount;
54 int ncount = ntotal;
55 findChildren(p,nRes,ncount);
56 for (const Particle& p2 : ufs.particles(Cuts::pid==PID::ETAPRIME)) {
57 if(p2.parents()[0].isSame(p)) continue;
58 map<long,int> nResB = nRes;
59 int ncountB = ncount;
60 findChildren(p2,nResB,ncountB);
61 if(ncountB!=0) continue;
62 bool matched2 = true;
63 for(auto const & val : nResB) {
64 if(val.second!=0) {
65 matched2 = false;
66 break;
67 }
68 }
69 if(matched2) {
70 _nEtaPhi->fill();
71 }
72 }
73 }
74 }
75
76
77 /// Normalise histograms etc., after the run
78 void finalize() {
79 double sigma = _nEtaPhi->val()*crossSection()/ sumOfWeights() /picobarn;
80 double error = _nEtaPhi->err()*crossSection()/ sumOfWeights() /picobarn;
81 Estimate1DPtr mult;
82 book(mult, 1, 1, 1);
83 for (auto& b : mult->bins()) {
84 if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
85 b.set(sigma, error);
86 }
87 }
88 }
89
90 /// @}
91
92
93 /// @name Histograms
94 /// @{
95 CounterPtr _nEtaPhi;
96 /// @}
97
98 };
99
100
101 RIVET_DECLARE_PLUGIN(BESIII_2020_I1788734);
102
103}
|