Rivet analyses referenceBESIII_2024_I2739177$e^+e^-\to\Sigma^+\bar{\Sigma}^-$ cross section for centre-of-mass energies between 2.379 and 3.04 GeVExperiment: BESIII (BEPC) Inspire ID: 2739177 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY Run details:
$e^+e^-\to\Sigma^+\bar{\Sigma}^-$ cross section for centre-of-mass energies between 2.379 and 3.04 GeV using ISR. Source code: BESIII_2024_I2739177.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- > Sigma+ Sigmabar-
10 class BESIII_2024_I2739177 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2024_I2739177);
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(Cuts::abspid==3222), "UFS");
25 book(_h,"TMP/sigma",refData(1,1,1));
26 }
27
28 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
29 for(const Particle &child : p.children()) {
30 if(child.children().empty()) {
31 nRes[child.pid()]-=1;
32 --ncount;
33 }
34 else
35 findChildren(child,nRes,ncount);
36 }
37 }
38
39
40 /// Perform the per-event analysis
41 void analyze(const Event& event) {
42 const FinalState& fs = apply<FinalState>(event, "FS");
43 // total hadronic and muonic cross sections
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 // find the Sigmas
51 const FinalState& ufs = apply<UnstableParticles>(event, "UFS");
52 for(unsigned int ix=0;ix<ufs.particles().size();++ix) {
53 const Particle& p1 = ufs.particles()[ix];
54 bool matched = false;
55 // check fs
56 bool fs = true;
57 for(const Particle & child : p1.children()) {
58 if(child.pid()==p1.pid()) {
59 fs = false;
60 break;
61 }
62 }
63 if(!fs) continue;
64 // find the children
65 map<long,int> nRes = nCount;
66 int ncount = ntotal;
67 findChildren(p1,nRes,ncount);
68 for(unsigned int iy=ix+1;iy<ufs.particles().size();++iy) {
69 const Particle& p2 = ufs.particles()[iy];
70 if(p2.pid() != -p1.pid()) continue;
71 // check fs
72 bool fs = true;
73 for(const Particle & child : p2.children()) {
74 if(child.pid()==p2.pid()) {
75 fs = false;
76 break;
77 }
78 }
79 if(!fs) continue;
80 map<long,int> nRes2 = nRes;
81 int ncount2 = ncount;
82 findChildren(p2,nRes2,ncount2);
83 if(ncount2!=0) continue;
84 matched=true;
85 for(auto const & val : nRes2) {
86 if(val.second!=0) {
87 matched = false;
88 break;
89 }
90 }
91 if(matched) {
92 _h->fill(sqrtS()/GeV);
93 break;
94 }
95 }
96 if(matched) break;
97 }
98 }
99
100
101 /// Normalise histograms etc., after the run
102 void finalize() {
103 scale(_h,crossSection()/ sumOfWeights() /picobarn);
104 Estimate1DPtr tmp;
105 book(tmp,1,1,1);
106 barchart(_h,tmp);
107 }
108
109 /// @}
110
111
112 /// @name Histograms
113 /// @{
114 Histo1DPtr _h;
115 /// @}
116
117
118 };
119
120
121 RIVET_DECLARE_PLUGIN(BESIII_2024_I2739177);
122
123}
|