Rivet analyses referenceBESIII_2022_I2099144Analysis of $\psi(2S)$ decays to $\Xi^-\bar{\Xi}^+$Experiment: BESIII (BEPC) Inspire ID: 2099144 Status: VALIDATED NOHEPDATA Authors:
Beam energies: (1.8, 1.8) GeV Run details:
Analysis of the angular distribution of the baryons, and decay products, produced in $e^+e^-\to \psi(2S) \to \Xi^-\bar{\Xi}^+$. Gives information about the decay and is useful for testing correlations in hadron decays. N.B. the data is not corrected and should only be used qualatively. Source code: BESIII_2022_I2099144.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 psi(2S) -> Xi- Xibar+
11 class BESIII_2022_I2099144 : public Analysis {
12 public:
13
14 /// Constructor
15 RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2022_I2099144);
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(Beam(), "Beams");
26 declare(UnstableParticles(), "UFS");
27 declare(FinalState(), "FS");
28 // Book histograms
29 book(_h_T1, "T1",20,-1.,1.);
30 book(_h_T2, "T2",20,-1.,1.);
31 book(_h_T3, "T3",20,-1.,1.);
32 book(_h_T4, "T4",20,-1.,1.);
33 book(_h_T5, "T5",20,-1.,1.);
34 book(_h_cTheta,"cTheta",20,-1.,1.);
35 book(_wsum,"TMP/wsum");
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 // get the axis, direction of incoming electron
52 const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
53 Vector3 axis;
54 if(beams.first.pid()>0)
55 axis = beams.first .momentum().p3().unit();
56 else
57 axis = beams.second.momentum().p3().unit();
58 // types of final state particles
59 const FinalState& fs = apply<FinalState>(event, "FS");
60 map<long,int> nCount;
61 int ntotal(0);
62 for (const Particle& p : fs.particles()) {
63 nCount[p.pid()] += 1;
64 ++ntotal;
65 }
66 // loop over lambda0 baryons
67 const UnstableParticles & ufs = apply<UnstableParticles>(event, "UFS");
68 Particle Xi,XiBar;
69 bool matched(false);
70 for (const Particle& p : ufs.particles(Cuts::abspid==3312)) {
71 if(p.children().empty()) continue;
72 map<long,int> nRes=nCount;
73 int ncount = ntotal;
74 findChildren(p,nRes,ncount);
75 matched=false;
76 // check for antiparticle
77 for (const Particle& p2 : ufs.particles(Cuts::pid==-p.pid())) {
78 if(p2.children().empty()) continue;
79 map<long,int> nRes2=nRes;
80 int ncount2 = ncount;
81 findChildren(p2,nRes2,ncount2);
82 if(ncount2==0) {
83 matched = true;
84 for(auto const & val : nRes2) {
85 if(val.second!=0) {
86 matched = false;
87 break;
88 }
89 }
90 // found baryon and antibaryon
91 if(matched) {
92 if(p.pid()>0) {
93 Xi = p;
94 XiBar = p2;
95 }
96 else {
97 Xi = p2;
98 XiBar = p;
99 }
100 break;
101 }
102 }
103 }
104 if(matched) break;
105 }
106 if(!matched) vetoEvent;
107 // find the lambda and antilambda
108 Particle Lambda,LamBar;
109 if ( Xi.children()[0].pid() ==3122 )
110 Lambda = Xi.children()[0];
111 else if ( Xi.children()[1].pid() ==3122 )
112 Lambda = Xi.children()[1];
113 else vetoEvent;
114 if ( XiBar.children()[0].pid() ==-3122 )
115 LamBar = XiBar.children()[0];
116 else if ( XiBar.children()[1].pid() ==-3122 )
117 LamBar = XiBar.children()[1];
118 else vetoEvent;
119 // boost to the Xi rest frame
120 LorentzTransform boost1 = LorentzTransform::mkFrameTransformFromBeta(Xi.momentum().betaVec());
121 Vector3 e1z = Xi.momentum().p3().unit();
122 Vector3 e1y = e1z.cross(axis).unit();
123 Vector3 e1x = e1y.cross(e1z).unit();
124 FourMomentum pLambda = boost1.transform(Lambda.momentum());
125 Vector3 axis1 = pLambda.p3().unit();
126 double n1x(e1x.dot(axis1)),n1y(e1y.dot(axis1)),n1z(e1z.dot(axis1));
127 // boost to the Xi bar
128 LorentzTransform boost2 = LorentzTransform::mkFrameTransformFromBeta(XiBar.momentum().betaVec());
129 FourMomentum pLamBar = boost2.transform(LamBar.momentum());
130 Vector3 axis2 = pLamBar.p3().unit();
131 double n2x(e1x.dot(axis2)),n2y(e1y.dot(axis2)),n2z(e1z.dot(axis2));
132 double cosX = axis.dot(Xi.momentum().p3().unit());
133 double sinX = sqrt(1.-sqr(cosX));
134 double T1 = sqr(sinX)*n1x*n2x+sqr(cosX)*n1z*n2z;
135 double T2 = -sinX*cosX*(n1x*n2z+n1z*n2x);
136 double T3 = -sinX*cosX*n1y;
137 double T4 = -sinX*cosX*n2y;
138 double T5 = n1z*n2z-sqr(sinX)*n1y*n2y;
139 _h_T1->fill(cosX,T1);
140 _h_T2->fill(cosX,T2);
141 _h_T3->fill(cosX,T3);
142 _h_T4->fill(cosX,T4);
143 _h_T5->fill(cosX,T5);
144 _h_cTheta->fill(cosX);
145 _wsum->fill();
146 }
147
148 pair<double,pair<double,double> > calcAlpha0(Histo1DPtr hist) {
149 if(hist->numEntries()==0.) return make_pair(0.,make_pair(0.,0.));
150 double d = 3./(pow(hist->xMax(),3)-pow(hist->xMin(),3));
151 double c = 3.*(hist->xMax()-hist->xMin())/(pow(hist->xMax(),3)-pow(hist->xMin(),3));
152 double sum1(0.),sum2(0.),sum3(0.),sum4(0.),sum5(0.);
153 for (const auto& bin : hist->bins() ) {
154 double Oi = bin.sumW();
155 if(Oi==0.) continue;
156 double a = d*(bin.xMax() - bin.xMin());
157 double b = d/3.*(pow(bin.xMax(),3) - pow(bin.xMin(),3));
158 double Ei = bin.errW();
159 sum1 += a*Oi/sqr(Ei);
160 sum2 += b*Oi/sqr(Ei);
161 sum3 += sqr(a)/sqr(Ei);
162 sum4 += sqr(b)/sqr(Ei);
163 sum5 += a*b/sqr(Ei);
164 }
165 // calculate alpha
166 double alpha = (-c*sum1 + sqr(c)*sum2 + sum3 - c*sum5)/(sum1 - c*sum2 + c*sum4 - sum5);
167 // and error
168 double cc = -pow((sum3 + sqr(c)*sum4 - 2*c*sum5),3);
169 double bb = -2*sqr(sum3 + sqr(c)*sum4 - 2*c*sum5)*(sum1 - c*sum2 + c*sum4 - sum5);
170 double aa = sqr(sum1 - c*sum2 + c*sum4 - sum5)*(-sum3 - sqr(c)*sum4 + sqr(sum1 - c*sum2 + c*sum4 - sum5) + 2*c*sum5);
171 double dis = sqr(bb)-4.*aa*cc;
172 if(dis>0.) {
173 dis = sqrt(dis);
174 return make_pair(alpha,make_pair(0.5*(-bb+dis)/aa,-0.5*(-bb-dis)/aa));
175 }
176 else {
177 return make_pair(alpha,make_pair(0.,0.));
178 }
179 }
180
181 pair<double,double> calcCoeff(unsigned int imode,Histo1DPtr hist) {
182 if(hist->numEntries()==0.) return make_pair(0.,0.);
183 double sum1(0.),sum2(0.);
184 for (const auto& bin : hist->bins() ) {
185 double Oi = bin.sumW();
186 if(Oi==0.) continue;
187 double ai(0.),bi(0.);
188 if(imode==0) {
189 bi = (pow(1.-sqr(bin.xMin()),1.5) - pow(1.-sqr(bin.xMax()),1.5))/3.;
190 }
191 else if(imode>=2 && imode<=4) {
192 bi = ( pow(bin.xMin(),3)*( -5. + 3.*sqr(bin.xMin())) +
193 pow(bin.xMax(),3)*( 5. - 3.*sqr(bin.xMax())))/15.;
194 }
195 else
196 assert(false);
197 double Ei = bin.errW();
198 sum1 += sqr(bi/Ei);
199 sum2 += bi/sqr(Ei)*(Oi-ai);
200 }
201 return make_pair(sum2/sum1,sqrt(1./sum1));
202 }
203
204 pair<double,double> calcAlpha(Histo1DPtr hist) {
205 if(hist->numEntries()==0.) return make_pair(0.,0.);
206 double sum1(0.),sum2(0.);
207 for (const auto& bin : hist->bins() ) {
208 double Oi = bin.sumW();
209 if(Oi==0.) continue;
210 double ai = 0.5*(bin.xMax()-bin.xMin());
211 double bi = 0.5*ai*(bin.xMax()+bin.xMin());
212 double Ei = bin.errW();
213 sum1 += sqr(bi/Ei);
214 sum2 += bi/sqr(Ei)*(Oi-ai);
215 }
216 return make_pair(sum2/sum1,sqrt(1./sum1));
217 }
218
219 /// Normalise histograms etc., after the run
220 void finalize() {
221 normalize(_h_cTheta);
222 scale(_h_T1,1./ *_wsum);
223 scale(_h_T2,1./ *_wsum);
224 scale(_h_T3,1./ *_wsum);
225 scale(_h_T4,1./ *_wsum);
226 scale(_h_T5,1./ *_wsum);
227 // calculate alpha0
228 pair<double,pair<double,double> > alpha0 = calcAlpha0(_h_cTheta);
229 Estimate1DPtr _h_alpha0;
230 book(_h_alpha0,2,1,1);
231 _h_alpha0->bin(1).set(alpha0.first, make_pair(alpha0.second.first,alpha0.second.second));
232 double s2 = -1. + sqr(alpha0.first);
233 double s3 = 3 + alpha0.first;
234 double s1 = sqr(s3);
235 // alpha- and alpha+ from proton data
236 pair<double,double> c_T2 = calcCoeff(2,_h_T2);
237 pair<double,double> c_T3 = calcCoeff(3,_h_T3);
238 pair<double,double> c_T4 = calcCoeff(4,_h_T4);
239 double s4 = sqr(c_T2.first);
240 double s5 = sqr(c_T3.first);
241 double s6 = sqr(c_T4.first);
242 double disc = s1*s5*s6*(-9.*s2*s4 + 4.*s1*s5*s6);
243 if(disc<0.) return;
244 disc = sqrt(disc);
245 double aM = -sqrt(-1./s2/s6*(2.*s1*s5*s6+disc));
246 double aP = c_T4.first/c_T3.first*aM;
247 double aM_M = (2*(alpha0.first*c_T4.first*alpha0.second.first + c_T4.second*s2)*(disc + 2*s1*s5*s6)
248 - c_T4.first*s2*(4*s3*c_T3.first*c_T4.first*(c_T3.first*c_T4.first*alpha0.second.first +s3*c_T4.first*c_T3.second +s3*c_T3.first*c_T4.second) +
249 (disc*(- 9*s2*s3*c_T2.first*c_T3.first*c_T4.first* c_T2.second
250 + 9*((1 - alpha0.first*(3 + 2*alpha0.first))* c_T3.first*c_T4.first*alpha0.second.first - s2*s3*c_T4.first*c_T3.second
251 - s2*s3*c_T3.first*c_T4.second)* s4
252 + 8*(c_T3.first*c_T4.first*alpha0.second.first + s3*c_T4.first*c_T3.second + s3*c_T3.first*c_T4.second)* s1*s5*s6))
253 /(4*pow(3 + alpha0.first,3)*pow(c_T3.first,3)*pow(c_T4.first,3) -9*s2*s3*c_T3.first*c_T4.first*s4)))/
254 (2.*pow(c_T4.first,3)*pow(s2,2)*sqrt(-((disc + 2*s1*s5*s6)/(s2*s6))));
255 double aM_P = (2*(alpha0.first*c_T4.first*alpha0.second.second + c_T4.second*s2)*(disc + 2*s1*s5*s6)
256 - c_T4.first*s2*(4*s3*c_T3.first*c_T4.first*(c_T3.first*c_T4.first*alpha0.second.second +s3*c_T4.first*c_T3.second +s3*c_T3.first*c_T4.second) +
257 (disc*(- 9*s2*s3*c_T2.first*c_T3.first*c_T4.first* c_T2.second
258 + 9*((1 - alpha0.first*(3 + 2*alpha0.first))* c_T3.first*c_T4.first*alpha0.second.second - s2*s3*c_T4.first*c_T3.second
259 - s2*s3*c_T3.first*c_T4.second)* s4
260 + 8*(c_T3.first*c_T4.first*alpha0.second.second + s3*c_T4.first*c_T3.second + s3*c_T3.first*c_T4.second)* s1*s5*s6))
261 /(4*pow(3 + alpha0.first,3)*pow(c_T3.first,3)*pow(c_T4.first,3) -9*s2*s3*c_T3.first*c_T4.first*s4)))/
262 (2.*pow(c_T4.first,3)*pow(s2,2)*sqrt(-((disc + 2*s1*s5*s6)/(s2*s6))));
263 double aP_M = (c_T4.first*sqrt(-((disc + 2*s1*s5*s6)/ (s2*s6)))*
264 (-2*c_T3.second - (2*alpha0.first*c_T3.first*alpha0.second.first)/s2 + (c_T3.first*(4*s3*c_T3.first*c_T4.first*(c_T3.first*c_T4.first*alpha0.second.first + s3*c_T4.first*c_T3.second + s3*c_T3.first*c_T4.second)
265 + (disc*(-9*s2*s3*c_T2.first*c_T3.first*c_T4.first* c_T2.second
266 + 9*((1 - alpha0.first*(3 + 2*alpha0.first))* c_T3.first*c_T4.first*alpha0.second.first - s2*s3*c_T4.first*c_T3.second
267 - s2*s3*c_T3.first*c_T4.second)* s4 +
268 8*(c_T3.first*c_T4.first*alpha0.second.first + s3*c_T4.first*c_T3.second + s3*c_T3.first*c_T4.second)* s1*s5*s6))/
269 (4* pow(3 + alpha0.first,3)* pow(c_T3.first,3)* pow(c_T4.first,3) - 9*s2*s3*c_T3.first*c_T4.first*s4)))/
270 (disc + 2*s1*s5*s6)))/(2.*pow(c_T3.first,2));
271 double aP_P = (c_T4.first*sqrt(-((disc + 2*s1*s5*s6)/ (s2*s6)))*
272 (-2*c_T3.second - (2*alpha0.first*c_T3.first*alpha0.second.second)/s2 + (c_T3.first*(4*s3*c_T3.first*c_T4.first*(c_T3.first*c_T4.first*alpha0.second.second + s3*c_T4.first*c_T3.second + s3*c_T3.first*c_T4.second)
273 + (disc*(-9*s2*s3*c_T2.first*c_T3.first*c_T4.first* c_T2.second
274 + 9*((1 - alpha0.first*(3 + 2*alpha0.first))* c_T3.first*c_T4.first*alpha0.second.second - s2*s3*c_T4.first*c_T3.second
275 - s2*s3*c_T3.first*c_T4.second)* s4 +
276 8*(c_T3.first*c_T4.first*alpha0.second.second + s3*c_T4.first*c_T3.second + s3*c_T3.first*c_T4.second)* s1*s5*s6))/
277 (4* pow(3 + alpha0.first,3)* pow(c_T3.first,3)* pow(c_T4.first,3) - 9*s2*s3*c_T3.first*c_T4.first*s4)))/
278 (disc + 2*s1*s5*s6)))/(2.*pow(c_T3.first,2));
279 Estimate1DPtr _h_alphaM;
280 book(_h_alphaM,2,1,3);
281 _h_alphaM->bin(1).set(aM, make_pair(-aM_M , -aM_P ));
282
283 Estimate1DPtr _h_alphaP;
284 book(_h_alphaP,2,1,4);
285 _h_alphaP->bin(1).set(aP, make_pair(-aP_M , -aP_P));
286 // now for Delta
287 double sDelta = (-2.*(3. + alpha0.first)*c_T3.first)/(aM*sqrt(1 - sqr(alpha0.first)));
288 double cDelta = (-3*(3 + alpha0.first)*c_T2.first)/(aM*aP*sqrt(1 - sqr(alpha0.first)));
289 double Delta = asin(sDelta);
290 if(cDelta<0.) Delta = M_PI-Delta;
291 double ds_P = (-9*c_T2.first*((-1 + alpha0.first)*(1 + alpha0.first)* (3 + alpha0.first)*c_T3.first*c_T4.first*c_T2.second + c_T2.first*c_T4.first*(c_T3.first*(alpha0.second.first + 3*alpha0.first*alpha0.second.first) -(-1 + alpha0.first)*(1 + alpha0.first)*(3 + alpha0.first)*c_T3.second)
292 - (-1 + alpha0.first)*(1 + alpha0.first)* (3 + alpha0.first)*c_T2.first*c_T3.first*c_T4.second)*disc)/
293 (pow(1 - pow(alpha0.first,2),1.5)*pow(c_T4.first,3)*pow(-((disc + 2*s1*s5*s6)/ (s2*s6)),1.5)*(-9*s2*s4 + 4*s1*s5*s6));
294 double ds_M = (-9*c_T2.first*((-1 + alpha0.first)*(1 + alpha0.first)* (3 + alpha0.first)*c_T3.first*c_T4.first*c_T2.second + c_T2.first*c_T4.first*(c_T3.first*(alpha0.second.second + 3*alpha0.first*alpha0.second.second) -(-1 + alpha0.first)*(1 + alpha0.first)*(3 + alpha0.first)*c_T3.second)
295 - (-1 + alpha0.first)*(1 + alpha0.first)* (3 + alpha0.first)*c_T2.first*c_T3.first*c_T4.second)*disc)/
296 (pow(1 - pow(alpha0.first,2),1.5)*pow(c_T4.first,3)*pow(-((disc + 2*s1*s5*s6)/ (s2*s6)),1.5)*(-9*s2*s4 + 4*s1*s5*s6));
297 ds_P /= sqrt(1.-sqr(sDelta));
298 ds_M /= sqrt(1.-sqr(sDelta));
299 Estimate1DPtr _h_sin;
300 book(_h_sin,2,1,2);
301 _h_sin->bin(1).set(Delta, make_pair( -ds_P, -ds_M));
302 }
303
304 /// @}
305
306
307 /// @name Histograms
308 /// @{
309 Histo1DPtr _h_T1,_h_T2,_h_T3,_h_T4,_h_T5;
310 Histo1DPtr _h_cTheta;
311 CounterPtr _wsum;
312 /// @}
313
314
315 };
316
317
318 RIVET_DECLARE_PLUGIN(BESIII_2022_I2099144);
319
320}
|