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 Scatter2D temphisto(refData(1, 1, 1));
82 Scatter2DPtr mult;
83 book(mult, 1, 1, 1);
84 for (size_t b = 0; b < temphisto.numPoints(); b++) {
85 const double x = temphisto.point(b).x();
86 pair<double,double> ex = temphisto.point(b).xErrs();
87 pair<double,double> ex2 = ex;
88 if(ex2.first ==0.) ex2. first=0.0001;
89 if(ex2.second==0.) ex2.second=0.0001;
90 if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
91 mult->addPoint(x, sigma, ex, make_pair(error,error));
92 }
93 else {
94 mult->addPoint(x, 0., ex, make_pair(0.,.0));
95 }
96 }
97 }
98
99 ///@}
100
101
102 /// @name Histograms
103 ///@{
104 CounterPtr _nEtaPhi;
105 ///@}
106
107
108 };
109
110
111 RIVET_DECLARE_PLUGIN(BESIII_2020_I1788734);
112
113}
|