Rivet analyses referenceBESIII_2015_I1356733Cross section for $e^+e^-\to\pi^+\pi^-X(3823)(\to\gamma\chi_{c1})$ and $\pi^+\pi^-\psi(2S)$ for $\sqrt{s}=4.23$ to $4.6$ GeVExperiment: BESIII (BEPC) Inspire ID: 1356733 Status: VALIDATED NOHEPDATA SINGLEWEIGHT Authors:
Beam energies: (2.1, 2.1); (2.1, 2.1); (2.2, 2.2); (2.2, 2.2); (2.3, 2.3) GeV Run details:
Measurement of the cross section for $e^+e^-\to\pi^+\pi^-X(3823)(\to\gamma\chi_{c1})$ and $\pi^+\pi^-\psi(2S)$ for $\sqrt{s}=4.23$ to $4.6$ GeV. The $X(3823)$ is consistent with the $\psi(1^3D_2)$ state and therefore we use the PDG code 20445, although this can be changed using the PID option. Source code: BESIII_2015_I1356733.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- to hadrons
10 class BESIII_2015_I1356733 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2015_I1356733);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 // set the PDG code
23 _pid = getOption<double>("PID", 20445);
24 // projections
25 declare(FinalState(), "FS");
26 declare(UnstableParticles(Cuts::pid== 20443 || Cuts::pid==100443), "UFS");
27 // histograms
28 for (unsigned int ix=0; ix<2; ++ix) {
29 book(_sigma[ix],1,1,1+ix);
30 }
31
32 for (const string& en : _sigma[0].binning().edges<0>()) {
33 const double end = std::stod(en)*GeV;
34 if (isCompatibleWithSqrtS(end)) {
35 _ecms = en;
36 break;
37 }
38 }
39 if (_ecms.empty()) MSG_ERROR("Beam energy incompatible with analysis.");
40 }
41
42 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
43 for (const Particle &child : p.children()) {
44 if (child.children().empty()) {
45 --nRes[child.pid()];
46 --ncount;
47 }
48 else {
49 findChildren(child,nRes,ncount);
50 }
51 }
52 }
53
54 /// Perform the per-event analysis
55 void analyze(const Event& event) {
56 const FinalState& fs = apply<FinalState>(event, "FS");
57 map<long,int> nCount;
58 int ntotal(0);
59 for (const Particle& p : fs.particles()) {
60 nCount[p.pid()] += 1;
61 ++ntotal;
62 }
63 for (const Particle& psi : apply<UnstableParticles>(event, "UFS").particles()) {
64 if (psi.children().empty()) continue;
65 map<long,int> nRes = nCount;
66 int ncount = ntotal;
67 findChildren(psi,nRes,ncount);
68 int nphoton = psi.pid()==100443 ? 0 : 1;
69 if (ncount!=2+nphoton) continue;
70 bool matched = true;
71 for (const auto& val : nRes) {
72 if (abs(val.first)==211) {
73 if (val.second !=1) {
74 matched = false;
75 break;
76 }
77 }
78 else if (val.first==22) {
79 if (val.second!=nphoton) {
80 matched = false;
81 break;
82 }
83 }
84 else if (val.second!=0) {
85 matched = false;
86 break;
87 }
88 }
89 if (matched) {
90 if (nphoton==0) {
91 _sigma[1]->fill(_ecms);
92 break;
93 }
94 else {
95 Particle parent = psi.parents()[0];
96 if (parent.pid()==_pid && parent.children().size()==2 &&
97 (parent.children()[0].pid()==22 || parent.children()[1].pid()==22 )) {
98 _sigma[0]->fill(_ecms);
99 break;
100 }
101 }
102 }
103 }
104 }
105
106
107 /// Normalise histograms etc., after the run
108 void finalize() {
109 for(unsigned int ix=0;ix<2;++ix)
110 scale(_sigma[ix], crossSection()/ sumOfWeights() /picobarn);
111 }
112
113 /// @}
114
115
116 /// @name Histograms
117 /// @{
118 BinnedHistoPtr<string> _sigma[2];
119 string _ecms;
120 int _pid;
121 /// @}
122
123
124 };
125
126
127 RIVET_DECLARE_PLUGIN(BESIII_2015_I1356733);
128
129}
|