Rivet analyses referenceBESIII_2021_I1929314Cross sections for $e^+e^-\to$ $K^+K^-\pi^+\pi^-(\pi^0)$, $K^+K^-K^+K^-(\pi^0)$, $\pi^+\pi^-\pi^+\pi^-(\pi^0)$ and $p\bar{p}\pi^+\pi^-(\pi^0)$ between 3.773 and 4.6 GeVExperiment: BESIII (BEPC) Inspire ID: 1929314 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the dressed cross sections for $e^+e^-\to$ $K^+K^-\pi^+\pi^-(\pi^0)$, $K^+K^-K^+K^-(\pi^0)$, $\pi^+\pi^-\pi^+\pi^-(\pi^0)$ and $p\bar{p}\pi^+\pi^-(\pi^0)$ between 3.773 and 4.6 GeV by the BESIII collaboration. There were three duplicate energy points in the data, for these points the one with higher statistics was retained. Source code: BESIII_2021_I1929314.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief e+e- -> 4 charged particles (+pi0) cross sections
9 class BESIII_2021_I1929314 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2021_I1929314);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 declare(FinalState(), "FS");
22 for(unsigned int ix=0;ix<8;++ix) {
23 book(_nCharged[ix], "TMP/nCharged_"+to_str(ix+1));
24 }
25 }
26
27
28 /// Perform the per-event analysis
29 void analyze(const Event& event) {
30 const FinalState& fs = apply<FinalState>(event, "FS");
31 map<long,int> nCount;
32 int ntotal(0);
33 for (const Particle& p : fs.particles()) {
34 nCount[p.pid()] += 1;
35 ++ntotal;
36 }
37 if(ntotal==4) {
38 if(nCount[211]==1 && nCount[-211]==1) {
39 if(nCount[321]==1 && nCount[-321]==1 )
40 _nCharged[0]->fill();
41 else if(nCount[2212]==1 && nCount[-2212]==1 )
42 _nCharged[3]->fill();
43 }
44 else if(nCount[321]==2 && nCount[-321]==2 )
45 _nCharged[1]->fill();
46 else if (nCount[211]==2 && nCount[-211]==2 )
47 _nCharged[2]->fill();
48 }
49 else if(ntotal==5 && nCount[111]==1) {
50 if(nCount[211]==1 && nCount[-211]==1) {
51 if(nCount[321]==1 && nCount[-321]==1 )
52 _nCharged[4]->fill();
53 else if(nCount[2212]==1 && nCount[-2212]==1 )
54 _nCharged[7]->fill();
55 }
56 else if(nCount[321]==2 && nCount[-321]==2 )
57 _nCharged[5]->fill();
58 else if (nCount[211]==2 && nCount[-211]==2 )
59 _nCharged[6]->fill();
60 }
61 }
62
63
64 /// Normalise histograms etc., after the run
65 void finalize() {
66 double fact = crossSection()/ sumOfWeights() /picobarn;
67 for(unsigned int ix=0;ix<8;++ix) {
68 double sigma = _nCharged[ix]->val()*fact;
69 double error = _nCharged[ix]->err()*fact;
70 Scatter2D temphisto(refData(1, 1, ix+1));
71 Scatter2DPtr mult;
72 book(mult, 1, 1, ix+1);
73 for (size_t b = 0; b < temphisto.numPoints(); b++) {
74 const double x = temphisto.point(b).x();
75 pair<double,double> ex = temphisto.point(b).xErrs();
76 pair<double,double> ex2 = ex;
77 if(ex2.first ==0.) ex2. first=0.0001;
78 if(ex2.second==0.) ex2.second=0.0001;
79 if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
80 mult->addPoint(x, sigma, ex, make_pair(error,error));
81 }
82 else {
83 mult->addPoint(x, 0., ex, make_pair(0.,.0));
84 }
85 }
86 }
87 }
88 /// @}
89
90
91 /// @name Histograms
92 /// @{
93 CounterPtr _nCharged[8];
94 /// @}
95
96
97 };
98
99
100 RIVET_DECLARE_PLUGIN(BESIII_2021_I1929314);
101
102}
|