Rivet analyses referenceBESII_2007_I750713Cross-sections for light hadrons at 3.773, 3.650 GeVExperiment: BESII (BEPC II) Inspire ID: 750713 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Cross section for $e^+e^-\to 2\pi^+2\pi^-$, $K^+K^-\pi^+\pi^-$, $2K^+2K^-$, $\phi K^+K^-$, $p\bar{p}\pi^+\pi^-$, $p\bar{p}K^+K^-$, $3\pi^+3\pi^-$, $2\pi^+2\pi^-\eta$, $2\pi^+2\pi^-\pi^0$, $K^+K^-\pi^+\pi^-\pi^0$, $2K^+2K^-\pi^0$, $p\bar{p}\pi^0$, $p\bar{p}\pi^+\pi^-\pi^0$, $3\pi^+3\pi^-\pi^0$ at 3.773 and 3.650 GeV. Source code: BESII_2007_I750713.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, 3.650 GeV
10 class BESII_2007_I750713 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BESII_2007_I750713);
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=1;ix<19;++ix) {
29 stringstream ss;
30 ss << "TMP/n" << ix;
31 book(_nMeson[ix], ss.str());
32 }
33
34 }
35
36
37 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
38 for (const Particle &child : p.children()) {
39 if(child.children().empty()) {
40 nRes[child.pid()]-=1;
41 --ncount;
42 }
43 else
44 findChildren(child,nRes,ncount);
45 }
46 }
47
48
49 /// Perform the per-event analysis
50 void analyze(const Event& event) {
51 const FinalState& fs = apply<FinalState>(event, "FS");
52
53 map<long,int> nCount;
54 int ntotal(0);
55 for (const Particle& p : fs.particles()) {
56 nCount[p.pid()] += 1;
57 ++ntotal;
58 }
59 const FinalState& ufs = apply<FinalState>(event, "UFS");
60
61 for (const Particle& p : ufs.particles()) {
62 if(p.children().empty()) continue;
63 if(p.pid()!=221 && p.pid()!=333) continue;
64 map<long,int> nRes = nCount;
65 int ncount = ntotal;
66 findChildren(p,nRes,ncount);
67 // eta
68 if(p.pid()==221) {
69 if(ncount==4) {
70 bool matched = true;
71 for(auto const & val : nRes) {
72 if(abs(val.first)==211) {
73 if(val.second!=2) {
74 matched = false;
75 break;
76 }
77 }
78 else if(val.second!=0) {
79 matched = false;
80 break;
81 }
82 }
83 if(matched) _nMeson[12]->fill();
84 }
85 }
86 else if(p.pid()==333) {
87 if(ncount!=1) continue;
88 bool matched = true;
89 for(auto const & val : nRes) {
90 if(abs(val.first)==321) {
91 if(val.second!=1) {
92 matched = false;
93 break;
94 }
95 }
96 else if(val.second!=0) {
97 matched = false;
98 break;
99 }
100 }
101 if(matched)
102 _nMeson[7]->fill();
103 }
104 }
105 if(ntotal==3 && nCount[111]==1 &&
106 nCount[-2212] == 1 && nCount[ 2212]==1)
107 _nMeson[16]->fill();
108 else if(ntotal==4) {
109 if(nCount[-211] == 2 && nCount[ 211]==2)
110 _nMeson[3]->fill();
111 else if(nCount[-211] == 1 && nCount[ 211]==1 &&
112 nCount[-321] == 1 && nCount[ 321]==1)
113 _nMeson[4]->fill();
114 else if(nCount[-321] == 2 && nCount[ 321]==2)
115 _nMeson[6]->fill();
116 else if(nCount[-211 ] == 1 && nCount[ 211 ]==1 &&
117 nCount[-2212] == 1 && nCount[ 2212]==1)
118 _nMeson[8]->fill();
119 else if(nCount[-321 ] == 1 && nCount[ 321 ]==1 &&
120 nCount[-2212] == 1 && nCount[ 2212]==1)
121 _nMeson[9]->fill();
122 }
123 else if(ntotal==5 && nCount[111]==1) {
124 if(nCount[-211] == 2 && nCount[ 211]==2)
125 _nMeson[13]->fill();
126 else if(nCount[-211] == 1 && nCount[ 211]==1 &&
127 nCount[-321] == 1 && nCount[ 321]==1)
128 _nMeson[14]->fill();
129 else if(nCount[-321] == 2 && nCount[ 321]==2)
130 _nMeson[15]->fill();
131 else if(nCount[-211 ] == 1 && nCount[ 211 ]==1 &&
132 nCount[-2212] == 1 && nCount[ 2212]==1)
133 _nMeson[17]->fill();
134 }
135 else if(ntotal==6 && nCount[211]==3 && nCount[-211]==3)
136 _nMeson[11]->fill();
137 else if(ntotal==7 && nCount[111]==1 &&
138 nCount[211]==3 && nCount[-211]==3)
139 _nMeson[18]->fill();
140 }
141
142
143 /// Normalise histograms etc., after the run
144 void finalize() {
145 scale(_nMeson, crossSection()/ sumOfWeights() /picobarn);
146 for (unsigned int ix=3; ix<19; ++ix) {
147 if (ix==5 || ix==10) continue;
148 BinnedEstimatePtr<string> mult;
149 book(mult, 1, 1, ix);
150 for (auto& b : mult->bins()) {
151 if (isCompatibleWithSqrtS(std::stod(b.xEdge()))) {
152 b.set(_nMeson[ix]->val(), _nMeson[ix]->err());
153 }
154 }
155 }
156 }
157 /// @}
158
159
160 /// @name Histograms
161 /// @{
162 CounterPtr _nMeson[19];
163 /// @}
164
165 };
166
167
168 RIVET_DECLARE_PLUGIN(BESII_2007_I750713);
169
170}
|