Rivet analyses referenceBESIII_2023_I2617922Cross Section for $e^+e^-\to\eta J/\psi$ at $\sqrt{s}=3.773$ GeVExperiment: BESIII (BEPC) Inspire ID: 2617922 Status: VALIDATED NOHEPDATA Authors:
Beam energies: (1.9, 1.9) GeV Run details:
Cross section for $e^+e^-\to\eta J/\psi$ for $\sqrt{s}=3.773$ GeV measured by the BESIII collaboration. Source code: BESIII_2023_I2617922.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- -> eta J/psi
10 class BESIII_2023_I2617922 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2023_I2617922);
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(), "UFS");
24 book(_nJPsi,1,1,1);
25 }
26
27 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
28 for (const Particle &child : p.children()) {
29 if (child.children().empty()) {
30 --nRes[child.pid()];
31 --ncount;
32 }
33 else {
34 findChildren(child,nRes,ncount);
35 }
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 map<long,int> nCount;
44 int ntotal(0);
45 for (const Particle& p : fs.particles()) {
46 nCount[p.pid()] += 1;
47 ++ntotal;
48 }
49 const FinalState& ufs = apply<FinalState>(event, "UFS");
50 for (const Particle& p : ufs.particles(Cuts::pid==PID::JPSI)) {
51 if (p.children().empty()) continue;
52 // find the J/psi
53 map<long,int> nRes = nCount;
54 int ncount = ntotal;
55 findChildren(p,nRes,ncount);
56 bool matched=false;
57 for (const Particle& p2 : ufs.particles(Cuts::pid==PID::ETA)) {
58 if (p2.children().empty()) continue;
59 bool JpsiParent=false;
60 Particle parent=p2;
61 while (!parent.parents().empty()) {
62 parent=parent.parents()[0];
63 if (parent.pid()==PID::JPSI) {
64 JpsiParent=true;
65 break;
66 }
67 }
68 if (JpsiParent) continue;
69 map<long,int> nRes2 = nRes;
70 int ncount2 = ncount;
71 findChildren(p2,nRes2,ncount2);
72 if(ncount2!=0) continue;
73 matched = true;
74 for (const auto& val : nRes2) {
75 if (val.second!=0) {
76 matched = false;
77 break;
78 }
79 }
80 if (matched) {
81 _nJPsi->fill("3.773"s);
82 break;
83 }
84 }
85 if (matched) break;
86 }
87 }
88
89
90 /// Normalise histograms etc., after the run
91 void finalize() {
92 scale(_nJPsi,crossSection()/ sumOfWeights() /picobarn);
93 }
94
95 /// @}
96
97
98 /// @name Histograms
99 /// @{
100 BinnedHistoPtr<string> _nJPsi;
101 /// @}
102
103
104 };
105
106
107 RIVET_DECLARE_PLUGIN(BESIII_2023_I2617922);
108
109}
|