Rivet analyses referenceBESIII_2023_I2660849e+e−→D∗+sD∗−s cross sections between threshold and 4.95 GeVExperiment: BESIII (BEPC) Inspire ID: 2660849 Status: VALIDATED NOHEPDATA Authors:
Beam energies: (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.1, 2.1); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.2, 2.2); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.3, 2.3); (2.4, 2.4); (2.4, 2.4); (2.4, 2.4); (2.4, 2.4); (2.5, 2.5); (2.5, 2.5) GeV Run details:
Measurement of the e+e−→D∗+sD∗−s cross sections between threshold and 4.95 GeV by the BESIII collaboration. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESIII_2023_I2660849.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- > Ds*+ Ds*-
10 class BESIII_2023_I2660849 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2023_I2660849);
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==433), "UFS");
25 // Book histograms
26 book(_sigma,1,1,1);
27 double delta=1e30;
28 for (const string& en : _sigma.binning().edges<0>()) {
29 double end = std::stod(en)*GeV;
30 if(isCompatibleWithSqrtS(end)) {
31 if(abs(end-sqrtS())<delta) {
32 _ecms = en;
33 delta = abs(end-sqrtS());
34 }
35 }
36 }
37 if(_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
38 }
39
40 void findChildren(const Particle& p,map<long,int>& nRes, int &ncount) {
41 for (const Particle& child : p.children()) {
42 if (child.children().empty()) {
43 nRes[child.pid()]-=1;
44 --ncount;
45 }
46 else {
47 findChildren(child,nRes,ncount);
48 }
49 }
50 }
51
52 /// Perform the per-event analysis
53 void analyze(const Event& event) {
54 // final state particles
55 const FinalState& fs = apply<FinalState>(event, "FS");
56 map<long,int> nCount;
57 int ntotal(0);
58 for (const Particle& p : fs.particles()) {
59 nCount[p.pid()] += 1;
60 ++ntotal;
61 }
62 // unstable charm analysis
63 Particles DS = apply<UnstableParticles>(event, "UFS").particles();
64 for (unsigned int ix=0; ix<DS.size(); ++ix) {
65 const Particle& p1 = DS[ix];
66 // check fs
67 bool fs = true;
68 for (const Particle& child : p1.children()) {
69 if (child.pid()==p1.pid()) {
70 fs = false;
71 break;
72 }
73 }
74 if (!fs) continue;
75 // find the children
76 map<long,int> nRes = nCount;
77 int ncount = ntotal;
78 findChildren(p1,nRes,ncount);
79 bool matched=false;
80 // loop over the anti particles
81 for (unsigned int iy=ix+1; iy<DS.size(); ++iy) {
82 const Particle& p2 = DS[iy];
83 if (p2.pid() != -p1.pid()) continue;
84 fs = true;
85 for (const Particle& child : p2.children()) {
86 if (child.pid()==p2.pid()) {
87 fs = false;
88 break;
89 }
90 }
91 if (!fs) continue;
92 if (!p2.parents().empty() && p2.parents()[0].pid()==p1.pid()) {
93 continue;
94 }
95 map<long,int> nRes2 = nRes;
96 int ncount2 = ncount;
97 findChildren(p2,nRes2,ncount2);
98 if (ncount2!=0) continue;
99 matched=true;
100 for (const auto& val : nRes2) {
101 if (val.second!=0) {
102 matched = false;
103 break;
104 }
105 }
106 if (matched) {
107 _sigma->fill(_ecms);
108 break;
109 }
110 }
111 if (matched) break;
112 }
113 }
114
115
116 /// Normalise histograms etc., after the run
117 void finalize() {
118 scale(_sigma,crossSection()/ sumOfWeights()/picobarn);
119 }
120
121 /// @}
122
123
124 /// @name Histograms
125 /// @{
126 BinnedHistoPtr<string> _sigma;
127 string _ecms;
128 /// @}
129
130
131 };
132
133
134 RIVET_DECLARE_PLUGIN(BESIII_2023_I2660849);
135
136}
|