Rivet analyses referenceBABAR_2007_I747875$e^+e^- \to$ $K^+K^-\pi^+\pi^-$, $K^+K^-\pi^0\pi^0$ and $K^+K^-K^+K^-$ cross-sections between 1.4 and 4 GeVExperiment: BABAR (PEP-II) Inspire ID: 747875 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^- \to$ $K^+K^-\pi^+\pi^-$, $K^+K^-\pi^0\pi^0$ and $K^+K^-K^+K^-$ via radiative return, including the identification of $K^{*0}$, $\phi$ and $f_0(980)$ mesons for energies between 1.4 and 4. GeV Source code: BABAR_2007_I747875.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4#include "Rivet/Projections/FinalState.hh"
5
6
7namespace Rivet {
8
9
10 /// @brief Add a short analysis description here
11 class BABAR_2007_I747875 : public Analysis {
12 public:
13
14 /// Constructor
15 RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2007_I747875);
16
17
18 /// @name Analysis methods
19 /// @{
20
21 /// Book histograms and initialise projections before the run
22 void init() {
23
24 // Initialise and register projections
25 declare(FinalState(), "FS");
26 declare(UnstableParticles(), "UFS");
27
28 book(_cKpKmpippim , "TMP/KpKmpippim");
29 book(_cKstarKpi ,"TMP/KstarKpi");
30 book(_cphipippim , "TMP/phipippim");
31 book(_cphif0 , "TMP/phif0");
32 book(_cKpKmpi0pi0 , "TMP/KpKmpi0pi0");
33 book(_cphif0pi0pi0 , "TMP/phif0pi0pi0");
34 book(_c2Kp2Km , "TMP/2Kp2Km");
35
36 }
37
38 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
39 for(const Particle &child : p.children()) {
40 if(child.children().empty()) {
41 nRes[child.pid()]-=1;
42 --ncount;
43 }
44 else
45 findChildren(child,nRes,ncount);
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 for (const Particle& p : ufs.particles()) {
61 if(p.children().empty()) continue;
62 // K*0
63 if(abs(p.pid())==313) {
64 map<long,int> nRes=nCount;
65 int ncount = ntotal;
66 findChildren(p,nRes,ncount);
67 // K* K+/- pi-/+
68 if(ncount !=2 ) continue;
69 bool matched = true;
70 for(auto const & val : nRes) {
71 if(abs(val.first)==321 || abs(val.first)==211) {
72 continue;
73 }
74 else if(val.second!=0) {
75 matched = false;
76 break;
77 }
78 }
79 if(matched==false) continue;
80 if((nCount[321] == 1 && nCount[-321] ==0 &&
81 nCount[211] == 0 && nCount[-211] == 1) ||
82 (nCount[321] == 0 && nCount[-321] ==1 &&
83 nCount[211] == 1 && nCount[-211] == 0))
84 _cKstarKpi->fill();
85 }
86 else if(p.pid()==333) {
87 map<long,int> nRes=nCount;
88 int ncount = ntotal;
89 findChildren(p,nRes,ncount);
90 // phi pi+pi-
91 if(ncount==2) {
92 bool matched = true;
93 for(auto const & val : nRes) {
94 if(abs(val.first)==211) {
95 if(val.second!=1) {
96 matched = false;
97 break;
98 }
99 }
100 else if(val.second!=0) {
101 matched = false;
102 break;
103 }
104 }
105 if(matched)
106 _cphipippim->fill();
107 }
108 for (const Particle& p2 : ufs.particles()) {
109 if(p2.pid()!=9010221) continue;
110 if(p2.parents()[0].isSame(p)) continue;
111 map<long,int> nResB = nRes;
112 int ncountB = ncount;
113 findChildren(p2,nResB,ncountB);
114 if(ncountB!=0) continue;
115 bool matched2 = true;
116 for(auto const & val : nResB) {
117 if(val.second!=0) {
118 matched2 = false;
119 break;
120 }
121 }
122 if(matched2) {
123 _cphif0pi0pi0->fill();
124 _cphif0 ->fill();
125 }
126 }
127 }
128 }
129 if(ntotal==4) {
130 if(nCount[321]==1 && nCount[-321]==1 && nCount[211]==1 && nCount[-211]==1)
131 _cKpKmpippim->fill();
132 else if( nCount[321]==1 && nCount[-321]==1 && nCount[111]==2)
133 _cKpKmpi0pi0->fill();
134 else if( nCount[321]==2 && nCount[-321]==2)
135 _c2Kp2Km->fill();
136 }
137 }
138
139
140 /// Normalise histograms etc., after the run
141 void finalize() {
142 for(unsigned int ix=1; ix<8; ++ix) {
143 double sigma = 0., error = 0.;
144 if(ix==1) {
145 sigma = _cKpKmpippim->val();
146 error = _cKpKmpippim->err();
147 }
148 else if(ix==2) {
149 sigma = _cKstarKpi->val();
150 error = _cKstarKpi->err();
151 }
152 else if(ix==3) {
153 sigma = _cphipippim->val();
154 error = _cphipippim->err();
155 }
156 else if(ix==4) {
157 sigma = _cphif0->val();
158 error = _cphif0->err();
159 }
160 else if(ix==5) {
161 sigma = _cKpKmpi0pi0->val();
162 error = _cKpKmpi0pi0->err();
163 }
164 else if(ix==6) {
165 sigma = _cphif0pi0pi0->val();
166 error = _cphif0pi0pi0->err();
167 }
168 else if(ix==7) {
169 sigma = _c2Kp2Km->val();
170 error = _c2Kp2Km->err();
171 }
172 sigma *= crossSection()/ sumOfWeights() /nanobarn;
173 error *= crossSection()/ sumOfWeights() /nanobarn;
174
175 Estimate1DPtr mult;
176 book(mult, ix, 1, 1);
177 for (auto& b : mult->bins()) {
178 if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
179 b.set(sigma, error);
180 }
181 }
182 }
183 }
184
185 /// @}
186
187
188 /// @name Histograms
189 /// @{
190 CounterPtr _cKpKmpippim, _cKstarKpi, _cphipippim,
191 _cphif0, _cKpKmpi0pi0, _cphif0pi0pi0, _c2Kp2Km;
192 /// @}
193
194
195 };
196
197
198 RIVET_DECLARE_PLUGIN(BABAR_2007_I747875);
199
200
201}
|