Rivet analyses referenceBESII_2007_I763880Cross-sections for light hadrons at 3.773 and 3.650 GeVExperiment: BESII (BEPC) Inspire ID: 763880 Status: VALIDATED Authors:
Beam energies: (1.8, 1.8); (1.9, 1.9) GeV Run details:
Cross section for $e^+e^-\to \omega \pi^+\pi^-$, $\omega K^+K^-$, $\omega p\bar{p}$, $K^+K^-\rho^0\pi^0$, $K^+K^-\rho^+\pi^-+\text{c.c.}$, $K^{*0}K^-\pi^+\pi^0+\text{c.c.}$ and $K^{*+}K^-\pi^+\pi^-+\text{c.c.}$ at 3.773 and 3.650 GeV. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BESII_2007_I763880.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 Cross-sections for light hadrons at 3.773 and 3.650 GeV
10 class BESII_2007_I763880 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESII_2007_I763880);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22
23 // Initialise and register projections
24 declare(FinalState(), "FS");
25 declare(UnstableParticles(), "UFS");
26
27 // Book histograms
28 for(unsigned int ix=4;ix<8;++ix) {
29 book(_nMeson[ix], 1,1,ix);
30 }
31
32 for (const string& en : _nMeson[5].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
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()]-=1;
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
59 map<long,int> nCount;
60 int ntotal(0);
61 for (const Particle& p : fs.particles()) {
62 nCount[p.pid()] += 1;
63 ++ntotal;
64 }
65 const FinalState& ufs = apply<FinalState>(event, "UFS");
66 for (const Particle& p : ufs.particles()) {
67 if(p.children().empty()) continue;
68 if(p.pid()!=223 && p.pid()!=113&&abs(p.pid())!=313&& abs(p.pid())!=323)
69 continue;
70 map<long,int> nRes = nCount;
71 int ncount = ntotal;
72 findChildren(p,nRes,ncount);
73 if(p.pid()==113) {
74 if(ncount!=3) continue;
75 unsigned int npi(0),nK(0);
76 bool matched = true;
77 for(auto const & val : nRes) {
78 if(abs(val.first)==111 && val.second==1) {
79 npi+=1;
80 }
81 else if(abs(val.first)==321 && val.second==1) {
82 nK+=1;
83 }
84 else if(val.second!=0) {
85 matched = false;
86 break;
87 }
88 }
89 if(matched) {
90 if(npi==1&&nK==2)
91 if(_ecms=="3.65") _nMeson[4]->fill(_ecms);
92 }
93 }
94 else if(abs(p.pid())==213) {
95 if(ncount!=3) continue;
96 unsigned int npi(0),nK(0);
97 bool matched = true;
98 int ipi = p.pid()==213 ? -211 : 211;
99 for(auto const & val : nRes) {
100 if(abs(val.first)== ipi && val.second==1) {
101 npi+=1;
102 }
103 else if(abs(val.first)==321 && val.second==1) {
104 nK+=1;
105 }
106 else if(val.second!=0) {
107 matched = false;
108 break;
109 }
110 }
111 if(matched) {
112 if(npi==1&&nK==2)
113 _nMeson[5]->fill(_ecms);
114 }
115 }
116 else if(abs(p.pid())==313) {
117 if(ncount!=3) continue;
118 unsigned int npi(0),nK(0),npi0(0);
119 bool matched = true;
120 int ipi = p.pid()==313 ? 211 : -211;
121 int iK = p.pid()==313 ? -321 : 321;
122 for(auto const & val : nRes) {
123 if(abs(val.first)== ipi && val.second==1) {
124 npi+=1;
125 }
126 else if(abs(val.first)==iK && val.second==1) {
127 nK+=1;
128 }
129 if(abs(val.first)== 111 && val.second==1) {
130 npi0+=1;
131 }
132 else if(val.second!=0) {
133 matched = false;
134 break;
135 }
136 }
137 if(matched) {
138 if(npi==1&&nK==1&&npi0==1)
139 _nMeson[6]->fill(_ecms);
140 }
141 }
142 else if(abs(p.pid())==323) {
143 if(ncount!=3) continue;
144 unsigned int npi(0),nK(0),npi0(0);
145 bool matched = true;
146 int ipi = p.pid()==323 ? 211 : -211;
147 int iK = p.pid()==323 ? -321 : 321;
148 for(auto const & val : nRes) {
149 if(abs(val.first)== ipi && val.second==1) {
150 npi+=1;
151 }
152 else if(abs(val.first)==iK && val.second==1) {
153 nK+=1;
154 }
155 if(abs(val.first)== 111 && val.second==1) {
156 npi0+=1;
157 }
158 else if(val.second!=0) {
159 matched = false;
160 break;
161 }
162 }
163 if(matched) {
164 if(npi==1&&nK==1&&npi0==1)
165 _nMeson[7]->fill(_ecms);
166 }
167 }
168 }
169 }
170
171
172 /// Normalise histograms etc., after the run
173 void finalize() {
174 double fact = crossSection()/ sumOfWeights() /nanobarn;
175 for(unsigned int ix=4;ix<8;++ix)
176 scale(_nMeson[ix],fact);
177 }
178
179 /// @}
180
181
182 /// @name Histograms
183 /// @{
184 BinnedHistoPtr<string> _nMeson[8];
185 string _ecms;
186 /// @}
187
188
189 };
190
191
192 RIVET_DECLARE_PLUGIN(BESII_2007_I763880);
193
194}
|