Rivet analyses referenceBESIII_2024_I2703033Analysis of $J/\psi$ decays to $\Xi^-\bar{\Xi}^+$Experiment: BESIII (BEPC) Inspire ID: 2703033 Status: VALIDATED NOHEPDATA Authors:
Beam energies: (1.6, 1.6) GeV Run details:
Analysis of the angular distribution of the baryons, and decay products, produced in $e^+e^-\to J/\psi \to \Xi^-\bar{\Xi}^+$. The decay $\Xi^-\to\Lambda^0\pi^-$ and its charged conjugate are used together with $\Lambda^0\to p\pi^-$ and $\bar\Lambda^0\to\bar{n}\pi^0$, or the charge conjugate. Gives information about the decay and is useful for testing correlations in hadron decays. Source code: BESIII_2024_I2703033.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/Beam.hh"
4#include "Rivet/Projections/FinalState.hh"
5#include "Rivet/Projections/UnstableParticles.hh"
6
7namespace Rivet {
8
9
10 /// @brief Jpsi -> Xi- Xibar+
11 class BESIII_2024_I2703033 : public Analysis {
12 public:
13
14 /// Constructor
15 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2024_I2703033);
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 // Initialise and register projections
23 declare(Beam(), "Beams");
24 declare(UnstableParticles(), "UFS");
25 declare(FinalState(), "FS");
26 // Book histograms
27 book(_h_T1, "TMP/T1",20,-1.,1.);
28 book(_h_T2, "TMP/T2",20,-1.,1.);
29 book(_h_T3, "TMP/T3",20,-1.,1.);
30 book(_h_T4, "TMP/T4",20,-1.,1.);
31 book(_h_T5, "TMP/T5",20,-1.,1.);
32 book(_h_cTheta,"TMP/cTheta",20,-1.,1.);
33 book(_h_clam[0][0], "TMP/cthetaP" ,20,-1,1);
34 book(_h_clam[0][1], "TMP/cthetaM" ,20,-1,1);
35 book(_h_clam[1][0], "TMP/ctheta0" ,20,-1,1);
36 book(_h_clam[1][1], "TMP/ctheta0bar",20,-1,1);
37 book(_wsum,"TMP/wsum");
38 }
39
40 void findChildren(const Particle& p,map<long,int>& nRes, int& ncount) {
41 for (const Particle& child : p.children()) {
42 if (child.children().empty()) {
43 nRes[child.pid()]-=1;
44 --ncount;
45 }
46 else {
47 findChildren(child,nRes,ncount);
48 }
49 }
50 }
51
52 /// Perform the per-event analysis
53 void analyze(const Event& event) {
54 // get the axis, direction of incoming electron
55 const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
56 Vector3 axis;
57 if (beams.first.pid()>0) axis = beams.first .mom().p3().unit();
58 else axis = beams.second.mom().p3().unit();
59 // types of final state particles
60 const FinalState& fs = apply<FinalState>(event, "FS");
61 map<long,int> nCount;
62 int ntotal(0);
63 for (const Particle& p : fs.particles()) {
64 nCount[p.pid()] += 1;
65 ++ntotal;
66 }
67 // loop over lambda0 baryons
68 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
69 Particle Xi,XiBar;
70 bool matched(false);
71 for (const Particle& p : ufs.particles(Cuts::abspid==3312)) {
72 if (p.children().empty()) continue;
73 map<long,int> nRes=nCount;
74 int ncount = ntotal;
75 findChildren(p,nRes,ncount);
76 matched=false;
77 // check for antiparticle
78 for (const Particle& p2 : ufs.particles(Cuts::pid==-p.pid())) {
79 if(p2.children().empty()) continue;
80 map<long,int> nRes2=nRes;
81 int ncount2 = ncount;
82 findChildren(p2,nRes2,ncount2);
83 if (ncount2==0) {
84 matched = true;
85 for (const auto& val : nRes2) {
86 if (val.second!=0) {
87 matched = false;
88 break;
89 }
90 }
91 // found baryon and antibaryon
92 if (matched) {
93 if (p.pid()>0) {
94 Xi = p;
95 XiBar = p2;
96 }
97 else {
98 Xi = p2;
99 XiBar = p;
100 }
101 break;
102 }
103 }
104 }
105 if (matched) break;
106 }
107 if (!matched) vetoEvent;
108 // find the lambda and antilambda
109 Particle Lambda,LamBar;
110 if ( Xi.children()[0].pid() ==3122 )
111 Lambda = Xi.children()[0];
112 else if ( Xi.children()[1].pid() ==3122 )
113 Lambda = Xi.children()[1];
114 else vetoEvent;
115 if ( XiBar.children()[0].pid() ==-3122 )
116 LamBar = XiBar.children()[0];
117 else if ( XiBar.children()[1].pid() ==-3122 )
118 LamBar = XiBar.children()[1];
119 else vetoEvent;
120 // boost to the Xi rest frame
121 LorentzTransform boost1 = LorentzTransform::mkFrameTransformFromBeta(Xi.mom().betaVec());
122 Vector3 e1z = Xi.mom().p3().unit();
123 Vector3 e1y = e1z.cross(axis).unit();
124 Vector3 e1x = e1y.cross(e1z).unit();
125 FourMomentum pLambda = boost1.transform(Lambda.mom());
126 Vector3 axis1 = pLambda.p3().unit();
127 double n1x(e1x.dot(axis1)),n1y(e1y.dot(axis1)),n1z(e1z.dot(axis1));
128 // boost to the Xi bar
129 LorentzTransform boost2 = LorentzTransform::mkFrameTransformFromBeta(XiBar.mom().betaVec());
130 FourMomentum pLamBar = boost2.transform(LamBar.mom());
131 Vector3 axis2 = pLamBar.p3().unit();
132 double n2x(e1x.dot(axis2)),n2y(e1y.dot(axis2)),n2z(e1z.dot(axis2));
133 double cosX = axis.dot(Xi.mom().p3().unit());
134 double sinX = sqrt(1.-sqr(cosX));
135 double T1 = sqr(sinX)*n1x*n2x+sqr(cosX)*n1z*n2z;
136 double T2 = -sinX*cosX*(n1x*n2z+n1z*n2x);
137 double T3 = -sinX*cosX*n1y;
138 double T4 = -sinX*cosX*n2y;
139 double T5 = n1z*n2z-sqr(sinX)*n1y*n2y;
140 _h_T1->fill(cosX,T1);
141 _h_T2->fill(cosX,T2);
142 _h_T3->fill(cosX,T3);
143 _h_T4->fill(cosX,T4);
144 _h_T5->fill(cosX,T5);
145 _h_cTheta->fill(cosX);
146 _wsum->fill();
147 // finally for the lambda decay
148 Particle baryon;
149 int imode = -1;
150 if (Lambda.children()[0].pid()==2212 && Lambda.children()[1].pid()==-211) {
151 baryon = Lambda.children()[0];
152 imode = 0;
153 }
154 else if (Lambda.children()[1].pid()==2212 && Lambda.children()[0].pid()==-211) {
155 baryon = Lambda.children()[1];
156 imode = 0;
157 }
158 else if (Lambda.children()[0].pid()==2112 && Lambda.children()[1].pid()==111) {
159 baryon = Lambda.children()[0];
160 imode = 1;
161 }
162 else if (Lambda.children()[1].pid()==2112 && Lambda.children()[0].pid()==111) {
163 baryon = Lambda.children()[1];
164 imode = 1;
165 }
166 if (imode>=0) {
167 // first boost to Xi rest frame
168 FourMomentum pbaryon = boost1.transform(baryon.mom());
169 LorentzTransform boost3 = LorentzTransform::mkFrameTransformFromBeta(pLambda.betaVec());
170 Vector3 axis = pLambda.p3().unit();
171 FourMomentum pp = boost3.transform(pbaryon);
172 // calculate angle
173 double cTheta = pp.p3().unit().dot(axis);
174 _h_clam[imode][0]->fill(cTheta);
175 }
176 // finally for the anti lambda decay
177 imode = -1;
178 if (LamBar.children()[0].pid()==-2212 && LamBar.children()[1].pid()==211) {
179 baryon = LamBar.children()[0];
180 imode = 0;
181 }
182 else if (LamBar.children()[1].pid()==-2212 && LamBar.children()[0].pid()==211) {
183 baryon = LamBar.children()[1];
184 imode = 0;
185 }
186 else if (LamBar.children()[0].pid()==-2112 && LamBar.children()[1].pid()==111) {
187 baryon = LamBar.children()[0];
188 imode = 1;
189 }
190 else if (LamBar.children()[1].pid()==-2112 && LamBar.children()[0].pid()==111) {
191 baryon = LamBar.children()[1];
192 imode = 1;
193 }
194 if (imode>=0) {
195 // first boost to Xi rest frame
196 FourMomentum pbaryon = boost2.transform(baryon.mom());
197 LorentzTransform boost3 = LorentzTransform::mkFrameTransformFromBeta(pLamBar.betaVec());
198 Vector3 axis = pLamBar.p3().unit();
199 FourMomentum pp = boost3.transform(pbaryon);
200 // calculate angle
201 double cTheta = pp.p3().unit().dot(axis);
202 _h_clam[imode][1]->fill(cTheta);
203 }
204 }
205
206 pair<double,pair<double,double> > calcAlpha0(Histo1DPtr hist) {
207 if(hist->numEntries()==0.) return make_pair(0.,make_pair(0.,0.));
208 double d = 3./(pow(hist->xMax(),3)-pow(hist->xMin(),3));
209 double c = 3.*(hist->xMax()-hist->xMin())/(pow(hist->xMax(),3)-pow(hist->xMin(),3));
210 double sum1(0.),sum2(0.),sum3(0.),sum4(0.),sum5(0.);
211 for (const auto& bin : hist->bins()) {
212 double Oi = bin.sumW();
213 if (Oi==0.) continue;
214 double a = d*bin.xWidth();
215 double b = d/3.*(pow(bin.xMax(),3) - pow(bin.xMin(),3));
216 double Ei = bin.errW();
217 sum1 += a*Oi/sqr(Ei);
218 sum2 += b*Oi/sqr(Ei);
219 sum3 += sqr(a)/sqr(Ei);
220 sum4 += sqr(b)/sqr(Ei);
221 sum5 += a*b/sqr(Ei);
222 }
223 // calculate alpha
224 double alpha = (-c*sum1 + sqr(c)*sum2 + sum3 - c*sum5)/(sum1 - c*sum2 + c*sum4 - sum5);
225 // and error
226 double cc = -pow((sum3 + sqr(c)*sum4 - 2*c*sum5),3);
227 double bb = -2*sqr(sum3 + sqr(c)*sum4 - 2*c*sum5)*(sum1 - c*sum2 + c*sum4 - sum5);
228 double aa = sqr(sum1 - c*sum2 + c*sum4 - sum5)*(-sum3 - sqr(c)*sum4 + sqr(sum1 - c*sum2 + c*sum4 - sum5) + 2*c*sum5);
229 double dis = sqr(bb)-4.*aa*cc;
230 if (dis>0.) {
231 dis = sqrt(dis);
232 return make_pair(alpha,make_pair(0.5*(-bb+dis)/aa,-0.5*(-bb-dis)/aa));
233 }
234 else {
235 return make_pair(alpha,make_pair(0.,0.));
236 }
237 }
238
239 pair<double,double> calcCoeff(unsigned int imode, Histo1DPtr hist) {
240 if (hist->numEntries()==0.) return make_pair(0.,0.);
241 double sum1(0.),sum2(0.);
242 for (const auto& bin : hist->bins()) {
243 double Oi = bin.sumW();
244 if (Oi==0.) continue;
245 double ai(0.),bi(0.);
246 if (imode==0) {
247 bi = (pow(1.-sqr(bin.xMin()),1.5) - pow(1.-sqr(bin.xMax()),1.5))/3.;
248 }
249 else if (imode>=2 && imode<=4) {
250 bi = ( pow(bin.xMin(),3)*( -5. + 3.*sqr(bin.xMin())) +
251 pow(bin.xMax(),3)*( 5. - 3.*sqr(bin.xMax())))/15.;
252 }
253 else {
254 assert(false);
255 }
256 double Ei = bin.errW();
257 sum1 += sqr(bi/Ei);
258 sum2 += bi/sqr(Ei)*(Oi-ai);
259 }
260 return make_pair(sum2/sum1,sqrt(1./sum1));
261 }
262
263 pair<double,double> calcAlpha(Histo1DPtr hist) {
264 if(hist->numEntries()==0.) return make_pair(0.,0.);
265 double sum1(0.),sum2(0.);
266 for (const auto& bin : hist->bins()) {
267 double Oi = bin.sumW();
268 if (Oi==0.) continue;
269 double ai = 0.5*bin.xWidth();
270 double bi = 0.5*ai*(bin.xMax()+bin.xMin());
271 double Ei = bin.errW();
272 sum1 += sqr(bi/Ei);
273 sum2 += bi/sqr(Ei)*(Oi-ai);
274 }
275 return make_pair(sum2/sum1,sqrt(1./sum1));
276 }
277
278 /// Normalise histograms etc., after the run
279 void finalize() {
280 normalize(_h_cTheta);
281 scale(_h_T1,1./ *_wsum);
282 scale(_h_T2,1./ *_wsum);
283 scale(_h_T3,1./ *_wsum);
284 scale(_h_T4,1./ *_wsum);
285 scale(_h_T5,1./ *_wsum);
286 for (unsigned int ix=0;ix<2;++ix) {
287 normalize(_h_clam[ix]);
288 }
289 // calculate alpha0
290 pair<double,pair<double,double> > alpha0 = calcAlpha0(_h_cTheta);
291 Estimate0DPtr h_alpha0;
292 book(h_alpha0,1,1,1);
293 h_alpha0->set(alpha0.first, alpha0.second);
294 double s2 = -1. + sqr(alpha0.first);
295 double s3 = 3 + alpha0.first;
296 double s1 = sqr(s3);
297 // alpha- and alpha+ from Xi data
298 pair<double,double> c_T2 = calcCoeff(2,_h_T2);
299 pair<double,double> c_T3 = calcCoeff(3,_h_T3);
300 pair<double,double> c_T4 = calcCoeff(4,_h_T4);
301 double s4 = sqr(c_T2.first);
302 double s5 = sqr(c_T3.first);
303 double s6 = sqr(c_T4.first);
304 double disc = s1*s5*s6*(-9.*s2*s4 + 4.*s1*s5*s6);
305 if(disc<0.) return;
306 disc = sqrt(disc);
307 double aM = -sqrt(-1./s2/s6*(2.*s1*s5*s6+disc));
308 double aP = c_T4.first/c_T3.first*aM;
309 double aM_M = (2*(alpha0.first*c_T4.first*alpha0.second.first + c_T4.second*s2)*(disc + 2*s1*s5*s6)
310 - c_T4.first*s2*(4*s3*c_T3.first*c_T4.first*(c_T3.first*c_T4.first*alpha0.second.first
311 + s3*c_T4.first*c_T3.second +s3*c_T3.first*c_T4.second) +
312 (disc*(- 9*s2*s3*c_T2.first*c_T3.first*c_T4.first* c_T2.second
313 + 9*((1 - alpha0.first*(3 + 2*alpha0.first))* c_T3.first*c_T4.first*alpha0.second.first
314 - s2*s3*c_T4.first*c_T3.second - s2*s3*c_T3.first*c_T4.second) * s4
315 + 8*(c_T3.first*c_T4.first*alpha0.second.first + s3*c_T4.first*c_T3.second
316 + s3*c_T3.first*c_T4.second)* s1*s5*s6))
317 / (4*pow(3 + alpha0.first,3)*pow(c_T3.first,3)*pow(c_T4.first,3)
318 - 9*s2*s3*c_T3.first*c_T4.first*s4)))
319 / (2.*pow(c_T4.first,3)*pow(s2,2)*sqrt(-((disc + 2*s1*s5*s6)/(s2*s6))));
320 double aM_P = (2*(alpha0.first*c_T4.first*alpha0.second.second + c_T4.second*s2)*(disc + 2*s1*s5*s6)
321 - c_T4.first*s2*(4*s3*c_T3.first*c_T4.first*(c_T3.first*c_T4.first*alpha0.second.second
322 + s3*c_T4.first*c_T3.second +s3*c_T3.first*c_T4.second)
323 + (disc*(- 9*s2*s3*c_T2.first*c_T3.first*c_T4.first* c_T2.second
324 + 9*((1 - alpha0.first*(3 + 2*alpha0.first))* c_T3.first*c_T4.first*alpha0.second.second
325 - s2*s3*c_T4.first*c_T3.second - s2*s3*c_T3.first*c_T4.second)* s4
326 + 8*(c_T3.first*c_T4.first*alpha0.second.second + s3*c_T4.first*c_T3.second
327 + s3*c_T3.first*c_T4.second)* s1*s5*s6))
328 / (4*pow(3 + alpha0.first,3)*pow(c_T3.first,3)*pow(c_T4.first,3)
329 - 9*s2*s3*c_T3.first*c_T4.first*s4)))
330 / (2.*pow(c_T4.first,3)*pow(s2,2)*sqrt(-((disc + 2*s1*s5*s6)/(s2*s6))));
331 double aP_M = (c_T4.first*sqrt(-((disc + 2*s1*s5*s6)/(s2*s6)))
332 * (-2*c_T3.second - (2*alpha0.first*c_T3.first*alpha0.second.first)/s2
333 + (c_T3.first*(4*s3*c_T3.first*c_T4.first*(c_T3.first*c_T4.first*alpha0.second.first
334 + s3*c_T4.first*c_T3.second + s3*c_T3.first*c_T4.second)
335 + (disc*(-9*s2*s3*c_T2.first*c_T3.first*c_T4.first* c_T2.second
336 + 9*((1 - alpha0.first*(3 + 2*alpha0.first))* c_T3.first*c_T4.first*alpha0.second.first
337 - s2*s3*c_T4.first*c_T3.second - s2*s3*c_T3.first*c_T4.second)* s4
338 + 8*(c_T3.first*c_T4.first*alpha0.second.first + s3*c_T4.first*c_T3.second
339 + s3*c_T3.first*c_T4.second)* s1*s5*s6))
340 / (4* pow(3 + alpha0.first,3)* pow(c_T3.first,3)* pow(c_T4.first,3)
341 - 9*s2*s3*c_T3.first*c_T4.first*s4)))/ (disc + 2*s1*s5*s6)))/(2.*pow(c_T3.first,2));
342 double aP_P = (c_T4.first*sqrt(-((disc + 2*s1*s5*s6)/ (s2*s6)))
343 * (-2*c_T3.second - (2*alpha0.first*c_T3.first*alpha0.second.second)/s2
344 + (c_T3.first*(4*s3*c_T3.first*c_T4.first*(c_T3.first*c_T4.first*alpha0.second.second
345 + s3*c_T4.first*c_T3.second + s3*c_T3.first*c_T4.second)
346 + (disc*(-9*s2*s3*c_T2.first*c_T3.first*c_T4.first* c_T2.second
347 + 9*((1 - alpha0.first*(3 + 2*alpha0.first))* c_T3.first*c_T4.first*alpha0.second.second
348 - s2*s3*c_T4.first*c_T3.second
349 - s2*s3*c_T3.first*c_T4.second) * s4
350 + 8*(c_T3.first*c_T4.first*alpha0.second.second + s3*c_T4.first*c_T3.second
351 + s3*c_T3.first*c_T4.second)* s1*s5*s6))
352 / (4* pow(3 + alpha0.first,3)* pow(c_T3.first,3)* pow(c_T4.first,3)
353 - 9*s2*s3*c_T3.first*c_T4.first*s4)))/(disc + 2*s1*s5*s6)))/(2.*pow(c_T3.first,2));
354 Estimate0DPtr h_alphaM;
355 book(h_alphaM,1,1,3);
356 h_alphaM->set(aM, make_pair(-aM_M , -aM_P));
357
358 Estimate0DPtr h_alphaP;
359 book(h_alphaP,1,1,5);
360 h_alphaP->set(aP, make_pair(-aP_M , -aP_P));
361 // now for Delta
362 double sDelta = (-2.*(3. + alpha0.first)*c_T3.first)/(aM*sqrt(1 - sqr(alpha0.first)));
363 double cDelta = (-3*(3 + alpha0.first)*c_T2.first)/(aM*aP*sqrt(1 - sqr(alpha0.first)));
364 double Delta = asin(sDelta);
365 if (cDelta<0.) Delta = M_PI-Delta;
366 double ds_P = (-9*c_T2.first*((-1 + alpha0.first)*(1 + alpha0.first)
367 * (3 + alpha0.first)*c_T3.first*c_T4.first*c_T2.second
368 + c_T2.first*c_T4.first*(c_T3.first*(alpha0.second.first
369 + 3*alpha0.first*alpha0.second.first) -(-1 + alpha0.first)
370 * (1 + alpha0.first)*(3 + alpha0.first)*c_T3.second)
371 - (-1 + alpha0.first)*(1 + alpha0.first) * (3 + alpha0.first)
372 * c_T2.first*c_T3.first*c_T4.second)*disc)
373 / (pow(1 - pow(alpha0.first,2),1.5)*pow(c_T4.first,3)*pow(-((disc + 2*s1*s5*s6)
374 / (s2*s6)),1.5)*(-9*s2*s4 + 4*s1*s5*s6));
375 double ds_M = (-9*c_T2.first*((-1 + alpha0.first)*(1 + alpha0.first)
376 * (3 + alpha0.first)*c_T3.first*c_T4.first*c_T2.second
377 + c_T2.first*c_T4.first*(c_T3.first*(alpha0.second.second
378 + 3*alpha0.first*alpha0.second.second) -(-1 + alpha0.first)
379 * (1 + alpha0.first)*(3 + alpha0.first)*c_T3.second)
380 - (-1 + alpha0.first)*(1 + alpha0.first)*(3 + alpha0.first)
381 * c_T2.first*c_T3.first*c_T4.second)*disc)
382 / (pow(1 - pow(alpha0.first,2),1.5)*pow(c_T4.first,3)*pow(-((disc + 2*s1*s5*s6)
383 / (s2*s6)),1.5)*(-9*s2*s4 + 4*s1*s5*s6));
384 ds_P /= sqrt(1.-sqr(sDelta));
385 ds_M /= sqrt(1.-sqr(sDelta));
386 Estimate0DPtr h_delta;
387 book(h_delta,1,1,2);
388 h_delta->set(Delta, make_pair(-ds_P, -ds_M));
389 // finally for the lambdas
390 Estimate0DPtr h_lam[2][2];
391 for (unsigned int ix=0;ix<2;++ix) {
392 for (unsigned int iy=0;iy<2;++iy) {
393 book(h_lam[ix][iy],1,1,7+2*ix+iy);
394 pair<double,double> alpha = calcAlpha(_h_clam[ix][iy]);
395 if (iy==0) {
396 alpha.second = sqrt(sqr(alpha.second/alpha.first)+ 0.5*(sqr(aM_M)+sqr(aM_P))/sqr(aM));
397 alpha.first /= aM;
398 }
399 else {
400 alpha.second = sqrt(sqr(alpha.second/alpha.first)+ 0.5*(sqr(aP_M)+sqr(aP_P))/sqr(aP));
401 alpha.first /= aP;
402 }
403 alpha.second *=alpha.first;
404 h_lam[ix][iy]->set(alpha.first, alpha.second);
405 }
406 }
407 for (unsigned int ix=0;ix<2;++ix) {
408 Estimate0DPtr ratio;
409 book(ratio,1,1,18+ix);
410 divide(h_lam[1][ix],h_lam[0][ix],ratio);
411 ratio->setPath("/"+name()+"/"+mkAxisCode(1,1,18+ix));
412 }
413 }
414
415 /// @}
416
417 /// @name Histograms
418 /// @{
419 Histo1DPtr _h_T1,_h_T2,_h_T3,_h_T4,_h_T5;
420 Histo1DPtr _h_cTheta,_h_clam[2][2];
421 CounterPtr _wsum;
422 /// @}
423
424 };
425
426
427 RIVET_DECLARE_PLUGIN(BESIII_2024_I2703033);
428
429}
|