Rivet analyses referenceBESIII_2021_I1857930Cross section for $e^+e^-\to\eta\phi$ for centre-of-mass energies between 2 and 3.08 GeVExperiment: BESIII (BEPC) Inspire ID: 1857930 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the vross section for $e^+e^-\to\eta\phi$ for centre-of-mass energies between 2 and 3.08 GeV by the BESIII collaboration. Source code: BESIII_2021_I1857930.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_2021_I1857930 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2021_I1857930);
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(_nPhiEta,"/TMP/_nPhiEta");
27
28 }
29
30 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
31 for (const Particle &child : p.children()) {
32 if(child.children().empty()) {
33 nRes[child.pid()]-=1;
34 --ncount;
35 }
36 else
37 findChildren(child,nRes,ncount);
38 }
39 }
40
41
42 /// Perform the per-event analysis
43 void analyze(const Event& event) {
44 const FinalState& fs = apply<FinalState>(event, "FS");
45
46 map<long,int> nCount;
47 int ntotal(0);
48 for (const Particle& p : fs.particles()) {
49 nCount[p.pid()] += 1;
50 ++ntotal;
51 }
52 const FinalState& ufs = apply<FinalState>(event, "UFS");
53
54 // loop over eta mesons
55 for (const Particle& p : ufs.particles(Cuts::pid==221)) {
56 if(p.children().empty()) continue;
57 map<long,int> nRes = nCount;
58 int ncount = ntotal;
59 findChildren(p,nRes,ncount);
60 // loop over phi mesons
61 for (const Particle& p2 : ufs.particles(Cuts::pid==333)) {
62 if(p2.parents()[0].isSame(p)) continue;
63 map<long,int> nResB = nRes;
64 int ncountB = ncount;
65 findChildren(p2,nResB,ncountB);
66 if(ncountB!=0) continue;
67 bool matched = true;
68 for(auto const & val : nResB) {
69 if(val.second!=0) {
70 matched = false;
71 break;
72 }
73 }
74 if(matched) _nPhiEta->fill();
75 }
76 }
77 }
78
79
80 /// Normalise histograms etc., after the run
81 void finalize() {
82 double sigma = _nPhiEta->val();
83 double error = _nPhiEta->err();
84 sigma *= crossSection()/ sumOfWeights()/picobarn;
85 error *= crossSection()/ sumOfWeights()/picobarn;
86 Estimate1DPtr mult;
87 book(mult, 1, 1, 1);
88 for (auto& b : mult->bins()) {
89 if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
90 b.set(sigma, error);
91 }
92 }
93 }
94
95 ///@}
96
97
98 /// @name Histograms
99 ///@{
100 CounterPtr _nPhiEta;
101 ///@}
102
103
104 };
105
106
107 RIVET_DECLARE_PLUGIN(BESIII_2021_I1857930);
108
109}
|