Rivet analyses referenceBESIII_2023_I2661512Cross section for $e^+e^-\to\Delta^{++}\bar{p}\pi^-+\text{c.c}$ for $\sqrt{s}=2.3094\to2.6464$Experiment: BESIII (BEPC) Inspire ID: 2661512 Status: VALIDATED NOHEPDATA Authors:
Beam energies: (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3) GeV Run details:
Measurement of the cross section for $e^+e^-\to\Delta^{++}\bar{p}\pi^-+\text{c.c}$ for $\sqrt{s}=2.3094\to2.6464$ by the BESIII collaboration. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2023_I2661512.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- > Delta++ pbar- pi-
10 class BESIII_2023_I2661512 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2023_I2661512);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 declare(FinalState(), "FS");
23 declare(UnstableParticles(Cuts::abspid==2224), "UFS");
24 vector<string> energies({"2.3094", "2.3864", "2.396", "2.5", "2.6444", "2.6464"});
25 bool matched=false;
26 for(const string& en : energies) {
27 double end = std::stod(en)*GeV;
28 if(isCompatibleWithSqrtS(end)) {
29 _ecms = en;
30 matched=true;
31 break;
32 }
33 }
34 if(!_ecms.empty())
35 book(_sigma[0],1,1,1);
36 if(isCompatibleWithSqrtS(2.6454)) {
37 book(_sigma[1],2,1,1);
38 matched=true;
39 }
40 if(!matched) MSG_ERROR("Beam energy incompatible with analysis.");
41 }
42
43 void findChildren(const Particle& p,map<long,int>& nRes, int& ncount) {
44 for (const Particle &child : p.children()) {
45 if (child.children().empty()) {
46 --nRes[child.pid()];
47 --ncount;
48 }
49 else {
50 findChildren(child, nRes, ncount);
51 }
52 }
53 }
54
55 /// Perform the per-event analysis
56 void analyze(const Event& event) {
57 const FinalState& fs = apply<FinalState>(event, "FS");
58 map<long,int> nCount;
59 int ntotal(0);
60 for (const Particle& p : fs.particles()) {
61 nCount[p.pid()] += 1;
62 ++ntotal;
63 }
64 // loop over delta++
65 for (const Particle& p : apply<FinalState>(event, "UFS").particles()) {
66 int sign =-p.pid()/p.abspid();
67 map<long,int> nRes = nCount;
68 int ncount = ntotal;
69 findChildren(p, nRes, ncount);
70 bool matched = true;
71 for (const auto& val : nRes) {
72 if (val.first== 211*sign || val.first==2212*sign) {
73 if (val.second !=1) {
74 matched = false;
75 break;
76 }
77 }
78 else if (val.second!=0) {
79 matched = false;
80 break;
81 }
82 }
83 if (matched) {
84 if(_sigma[0]) _sigma[0]->fill(_ecms);
85 if(_sigma[1]) _sigma[1]->fill(string("2.6454"));
86 break;
87 }
88 }
89 }
90
91
92 /// Normalise histograms etc., after the run
93 void finalize() {
94 double fact = crossSection()/ sumOfWeights() /picobarn;
95 for(unsigned int ix=0;ix<2;++ix) scale(_sigma[ix],fact);
96 }
97
98 /// @}
99
100
101 /// @name Histograms
102 /// @{
103 BinnedHistoPtr<string> _sigma[2];
104 string _ecms;
105 /// @}
106
107
108 };
109
110
111 RIVET_DECLARE_PLUGIN(BESIII_2023_I2661512);
112
113}
|