Rivet analyses referenceBESIII_2020_I1836509Cross section for $e^+e^-\to\eta^\prime\pi^+\pi^-$ for energies between 2.00 and 3.08 GeVExperiment: BESIII (BEPC) Inspire ID: 1836509 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to\eta^\prime\pi^+\pi^-$ for energies between 2.00 and 3.08 GeV by the BESIII collaboration. Source code: BESIII_2020_I1836509.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- > pi+pi- eta'
10 class BESIII_2020_I1836509 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2020_I1836509);
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 // histograms
26 book(_nPiPiEta, "/TMP/nPiPiEta");
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==331)) {
52 if(p.children().empty()) continue;
53 map<long,int> nRes = nCount;
54 int ncount = ntotal;
55 findChildren(p,nRes,ncount);
56 if(ncount!=2) continue;
57 bool matched = true;
58 for(auto const & val : nRes) {
59 if(abs(val.first)==211) {
60 if(val.second!=1) {
61 matched = false;
62 break;
63 }
64 }
65 else if(val.second!=0) {
66 matched = false;
67 break;
68 }
69 }
70 if(matched) _nPiPiEta->fill();
71 }
72 }
73
74
75 /// Normalise histograms etc., after the run
76 void finalize() {
77 double sigma = _nPiPiEta->val();
78 double error = _nPiPiEta->err();
79 sigma *= crossSection()/ sumOfWeights() /picobarn;
80 error *= 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 /// @name Histograms
102 ///@{
103 CounterPtr _nPiPiEta;
104 ///@}
105
106
107 };
108
109
110 RIVET_DECLARE_PLUGIN(BESIII_2020_I1836509);
111
112}
|