rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2023_I2634735

Analysis of $\psi(2S)$ decays to $\Xi^0\bar{\Xi}^0$
Experiment: BESIII (BEPC)
Inspire ID: 2634735
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References: Beams: e- e+
Beam energies: (1.8, 1.8) GeV
Run details:
  • e+e- > psi(2S)

Analysis of the angular distribution of the baryons, and decay products, produced in $e^+e^-\to \psi(2S) \to \Xi^0\bar{\Xi}^0$. Gives information about the decay and is useful for testing correlations in hadron decays. The phase and $\alpha$ parameters were taken from the tables in the paper.

Source code: BESIII_2023_I2634735.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) -> Xi0 Xibar0
 11  class BESIII_2023_I2634735 : public Analysis {
 12  public:
 13
 14    /// Constructor
 15    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2023_I2634735);
 16
 17
 18    /// @name Analysis methods
 19    /// @{
 20
 21    /// Book histograms and initialise projections before the run
 22    void init() {
 23      // Initialise and register projections
 24      declare(Beam(), "Beams");
 25      declare(UnstableParticles(), "UFS");
 26      declare(FinalState(), "FS");
 27      // Book histograms
 28      book(_h_T1, "TMP/T1",20,-1.,1.);
 29      book(_h_T2, "TMP/T2",20,-1.,1.);
 30      book(_h_T3, "TMP/T3",20,-1.,1.);
 31      book(_h_T4, "TMP/T4",20,-1.,1.);
 32      book(_h_T5, "TMP/T5",20,-1.,1.);
 33      book(_h_cTheta,"TMP/cTheta",20,-1.,1.);
 34      for (unsigned int ix=0; ix<2; ++ix) {
 35        book(_h_cProton[ix],"TMP/cProton_"+toString(ix+1), 20, -1., 1.);
 36      }
 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) {
 58      	axis = beams.first .mom().p3().unit();
 59      }
 60      else {
 61      	axis = beams.second.mom().p3().unit();
 62      }
 63      // types of final state particles
 64      const FinalState& fs = apply<FinalState>(event, "FS");
 65      map<long,int> nCount;
 66      int ntotal(0);
 67      for (const Particle& p : fs.particles()) {
 68      	nCount[p.pid()] += 1;
 69      	++ntotal;
 70      }
 71      // loop over Xi baryons
 72      const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
 73      Particle Xi,XiBar;
 74      bool matched(false);
 75      for (const Particle& p : ufs.particles(Cuts::abspid==3322)) {
 76        if (p.children().empty()) continue;
 77        map<long,int> nRes=nCount;
 78        int ncount = ntotal;
 79        findChildren(p,nRes,ncount);
 80        matched=false;
 81        // check for antiparticle
 82        for (const Particle& p2 :  ufs.particles(Cuts::pid==-p.pid())) {
 83          if (p2.children().empty()) continue;
 84          map<long,int> nRes2=nRes;
 85          int ncount2 = ncount;
 86          findChildren(p2,nRes2,ncount2);
 87          if (ncount2==0) {
 88            matched = true;
 89            for (const auto& val : nRes2) {
 90              if (val.second!=0) {
 91                matched = false;
 92                break;
 93              }
 94            }
 95            // found baryon and antibaryon
 96            if (matched) {
 97              if (p.pid()>0) {
 98                Xi    = p;
 99                XiBar = p2;
100              }
101              else {
102                Xi    = p2;
103                XiBar = p;
104              }
105              break;
106            }
107          }
108        }
109        if (matched) break;
110      }
111      if (!matched) vetoEvent;
112      // find the lambda and antilambda
113      Particle Lambda,LamBar;
114      if (Xi.children()[0].pid() ==3122 && Xi.children()[1].pid()==111) {
115      	Lambda = Xi.children()[0];
116      }
117      else if (Xi.children()[1].pid() ==3122  && Xi.children()[0].pid()==111) {
118      	Lambda = Xi.children()[1];
119      }
120      else {
121        vetoEvent;
122      }
123      if (XiBar.children()[0].pid() ==-3122  && XiBar.children()[1].pid()==111) {
124      	LamBar = XiBar.children()[0];
125      }
126      else if (XiBar.children()[1].pid() ==-3122 && XiBar.children()[0].pid()==111) {
127      	LamBar = XiBar.children()[1];
128      }
129      else {
130        vetoEvent;
131      }
132      // boost to the Xi rest frame
133      LorentzTransform boost1 = LorentzTransform::mkFrameTransformFromBeta(Xi.mom().betaVec());
134      Vector3 e1z = Xi.mom().p3().unit();
135      Vector3 e1y = e1z.cross(axis).unit();
136      Vector3 e1x = e1y.cross(e1z).unit();
137      FourMomentum pLambda = boost1.transform(Lambda.mom());
138      Vector3 axis1 = pLambda.p3().unit();
139      double n1x(e1x.dot(axis1)),n1y(e1y.dot(axis1)),n1z(e1z.dot(axis1));
140      Particle proton;
141      if (Lambda.children().size()!=2) vetoEvent;
142      if (Lambda.children()[0].pid()== 2212 && Lambda.children()[1].pid()==-211) {
143        proton = Lambda.children()[0];
144      }
145      else if (Lambda.children()[1].pid()== 2212 && Lambda.children()[0].pid()==-211) {
146        proton = Lambda.children()[1];
147      }
148      else {
149        vetoEvent;
150      }
151      LorentzTransform boost3 = LorentzTransform::mkFrameTransformFromBeta(pLambda.betaVec());
152      FourMomentum pProton = boost3.transform(boost1.transform(proton.mom()));
153      const double cProton = pProton.p3().unit().dot(axis1);
154      _h_cProton[0]->fill(cProton);
155      // boost to the Xi bar rest frame
156      LorentzTransform boost2 = LorentzTransform::mkFrameTransformFromBeta(XiBar.mom().betaVec());
157      FourMomentum pLamBar = boost2.transform(LamBar.mom());
158      Vector3 axis2 = pLamBar.p3().unit();
159      double n2x(e1x.dot(axis2)),n2y(e1y.dot(axis2)),n2z(e1z.dot(axis2));
160      double cosX = axis.dot(Xi.mom().p3().unit());
161      double sinX = sqrt(1.-sqr(cosX));
162      Particle pbar;
163      if (LamBar.children().size()!=2) vetoEvent;
164      if (LamBar.children()[0].pid()==-2212 && LamBar.children()[1].pid()== 211) {
165        pbar = LamBar.children()[0];
166      }
167      else if (LamBar.children()[1].pid()==-2212 && LamBar.children()[0].pid()== 211) {
168        pbar = LamBar.children()[1];
169      }
170      else {
171        vetoEvent;
172      }
173      LorentzTransform boost4 = LorentzTransform::mkFrameTransformFromBeta(pLamBar.betaVec());
174      FourMomentum pPbar = boost4.transform(boost2.transform(pbar.mom()));
175      double cPbar = pPbar.p3().unit().dot(axis2);
176      _h_cProton[1]->fill(cPbar);
177      // moments
178      double T1 = sqr(sinX)*n1x*n2x+sqr(cosX)*n1z*n2z;
179      double T2 = -sinX*cosX*(n1x*n2z+n1z*n2x);
180      double T3 = -sinX*cosX*n1y;
181      double T4 = -sinX*cosX*n2y;
182      double T5 = n1z*n2z-sqr(sinX)*n1y*n2y;
183      _h_T1->fill(cosX,T1);
184      _h_T2->fill(cosX,T2);
185      _h_T3->fill(cosX,T3);
186      _h_T4->fill(cosX,T4);
187      _h_T5->fill(cosX,T5);
188      _h_cTheta->fill(cosX);
189      _wsum->fill();
190    }
191
192    pair<double,pair<double,double> > calcAlpha0(Histo1DPtr hist) {
193      if (hist->numEntries()==0.) return make_pair(0.,make_pair(0.,0.));
194      double d = 3./(pow(hist->xMax(),3)-pow(hist->xMin(),3));
195      double c = 3.*(hist->xMax()-hist->xMin())/(pow(hist->xMax(),3)-pow(hist->xMin(),3));
196      double sum1(0.),sum2(0.),sum3(0.),sum4(0.),sum5(0.);
197      for (const auto& bin : hist->bins() ) {
198       	double Oi = bin.sumW();
199        if (Oi==0.) continue;
200        double a =  d*(bin.xMax() - bin.xMin());
201        double b = d/3.*(pow(bin.xMax(),3) - pow(bin.xMin(),3));
202       	double Ei = bin.errW();
203        sum1 +=   a*Oi/sqr(Ei);
204        sum2 +=   b*Oi/sqr(Ei);
205        sum3 += sqr(a)/sqr(Ei);
206        sum4 += sqr(b)/sqr(Ei);
207        sum5 +=    a*b/sqr(Ei);
208      }
209      // calculate alpha
210      double alpha = (-c*sum1 + sqr(c)*sum2 + sum3 - c*sum5)/(sum1 - c*sum2 + c*sum4 - sum5);
211      // and error
212      double cc = -pow((sum3 + sqr(c)*sum4 - 2*c*sum5),3);
213      double bb = -2*sqr(sum3 + sqr(c)*sum4 - 2*c*sum5)*(sum1 - c*sum2 + c*sum4 - sum5);
214      double aa =  sqr(sum1 - c*sum2 + c*sum4 - sum5)*(-sum3 - sqr(c)*sum4 + sqr(sum1 - c*sum2 + c*sum4 - sum5) + 2*c*sum5);
215      double dis = sqr(bb)-4.*aa*cc;
216      if (dis>0.) {
217        dis = sqrt(dis);
218        return make_pair(alpha,make_pair(0.5*(-bb+dis)/aa,-0.5*(-bb-dis)/aa));
219      }
220      else {
221        return make_pair(alpha,make_pair(0.,0.));
222      }
223    }
224
225    pair<double,double> calcAlpha(Histo1DPtr hist) {
226      if (hist->numEntries()==0.) return make_pair(0.,0.);
227      double sum1(0.), sum2(0.);
228      for (const auto& bin : hist->bins() ) {
229        double Oi = bin.sumW();
230        if (Oi==0.) continue;
231        double ai = 0.5*(bin.xMax()-bin.xMin());
232        double bi = 0.5*ai*(bin.xMax()+bin.xMin());
233        double Ei = bin.errW();
234        sum1 += sqr(bi/Ei);
235        sum2 += bi/sqr(Ei)*(Oi-ai);
236      }
237      return make_pair(sum2/sum1,sqrt(1./sum1));
238    }
239
240    pair<double,double> calcCoeff(unsigned int imode, Histo1DPtr hist) {
241      if (hist->numEntries()==0.) return make_pair(0.,0.);
242      double sum1(0.),sum2(0.);
243      for (const auto& bin : hist->bins()) {
244        double Oi = bin.sumW();
245        if (Oi==0.) continue;
246        double ai(0.), bi(0.);
247        if (imode==0) {
248          bi = (pow(1.-sqr(bin.xMin()),1.5) - pow(1.-sqr(bin.xMax()),1.5))/3.0;
249        }
250        else if (imode>=2 && imode<=4) {
251          bi = (pow(bin.xMin(),3)*(-5. + 3.*sqr(bin.xMin())) + pow(bin.xMax(),3)*(5. - 3.*sqr(bin.xMax())))/15.;
252        }
253        else {
254          assert(false);
255        }
256        const 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    /// Normalise histograms etc., after the run
264    void finalize() {
265      const double aLambda = 0.754;
266      normalize(_h_cTheta);
267      normalize(_h_cProton);
268      scale(_h_T1, 1.0/ *_wsum);
269      scale(_h_T2, 1.0/ *_wsum);
270      scale(_h_T3, 1.0/ *_wsum);
271      scale(_h_T4, 1.0/ *_wsum);
272      scale(_h_T5, 1.0/ *_wsum);
273      // calculate alpha0
274      pair<double,pair<double,double> > alpha0 = calcAlpha0(_h_cTheta);
275      Estimate0DPtr _h_alpha0;
276      book(_h_alpha0,1,1,1);
277      _h_alpha0->set(alpha0.first,  alpha0.second);
278      double s2 = -1. + sqr(alpha0.first);
279      double s3 = 3 + alpha0.first;
280      double s1 = sqr(s3);
281      // alpha parameters
282      pair<double,double> alpha[2];
283      for(unsigned int ix=0;ix<2;++ix) {
284	Estimate0DPtr _h_alpha;
285	book(_h_alpha,1,1,3+2*ix);
286	alpha[ix] = calcAlpha(_h_cProton[ix]);
287	alpha[ix].first  /= aLambda;
288	if(ix==1) alpha[ix].first *=-1;
289	alpha[ix].second /= aLambda;
290	_h_alpha->set(alpha[ix].first, alpha[ix].second);
291      }
292      // now for Delta
293      pair<double,double> c_T2 = calcCoeff(2,_h_T2);
294      pair<double,double> c_T3 = calcCoeff(3,_h_T3);
295      pair<double,double> c_T4 = calcCoeff(4,_h_T4);
296      double s4 = sqr(c_T2.first);
297      double s5 = sqr(c_T3.first);
298      double s6 = sqr(c_T4.first);
299      double disc = s1*s5*s6*(-9.*s2*s4 + 4.*s1*s5*s6);
300      if (disc<0.)  return;
301      disc = sqrt(disc);
302      double sDelta = (-2.*(3. + alpha0.first)*c_T3.first)/(alpha[0].first*sqrt(1 - sqr(alpha0.first)));
303      double cDelta = (-3*(3 + alpha0.first)*c_T2.first)/(alpha[0].first*alpha[1].first*sqrt(1 - sqr(alpha0.first)));
304      double Delta = asin(sDelta);
305      if(cDelta<0.) Delta = M_PI-Delta;
306      double ds_P = (-9*c_T2.first*((-1 + alpha0.first)*(1 + alpha0.first) *
307                    (3 + alpha0.first)*c_T3.first*c_T4.first*c_T2.second +
308                    c_T2.first*c_T4.first*(c_T3.first*(alpha0.second.first +
309                    3*alpha0.first*alpha0.second.first) -(-1 + alpha0.first) *
310                    (1 + alpha0.first)*(3 + alpha0.first)*c_T3.second) -
311                    (-1 + alpha0.first)*(1 + alpha0.first) *
312                    (3 + alpha0.first)*c_T2.first*c_T3.first*c_T4.second)*disc) /
313                    (pow(1 - pow(alpha0.first,2),1.5)*pow(c_T4.first,3) *
314                    pow(-((disc + 2*s1*s5*s6) / (s2*s6)),1.5)*(-9*s2*s4 + 4*s1*s5*s6));
315      double ds_M = (-9*c_T2.first*((-1 + alpha0.first)*(1 + alpha0.first) *
316                    (3 + alpha0.first)*c_T3.first*c_T4.first*c_T2.second +
317                    c_T2.first*c_T4.first*(c_T3.first*(alpha0.second.second +
318                    3*alpha0.first*alpha0.second.second) - (-1 + alpha0.first) *
319                    (1 + alpha0.first)*(3 + alpha0.first)*c_T3.second) -
320                    (-1 + alpha0.first)*(1 + alpha0.first) *
321                    (3 + alpha0.first)*c_T2.first*c_T3.first * c_T4.second)*disc) /
322                    (pow(1 - pow(alpha0.first,2),1.5)*pow(c_T4.first,3) *
323                    pow(-((disc + 2*s1*s5*s6) /(s2*s6)),1.5)*(-9*s2*s4 + 4*s1*s5*s6));
324      ds_P /= sqrt(1.-sqr(sDelta));
325      ds_M /= sqrt(1.-sqr(sDelta));
326      Estimate0DPtr _h_sin;
327      book(_h_sin, 1, 1, 2);
328      _h_sin->set(Delta, make_pair( -ds_P, -ds_M));
329    }
330
331    /// @}
332
333
334    /// @name Histograms
335    /// @{
336    Histo1DPtr _h_T1,_h_T2,_h_T3,_h_T4,_h_T5;
337    Histo1DPtr _h_cTheta,_h_cProton[2];
338    CounterPtr _wsum;
339    /// @}
340
341
342  };
343
344
345  RIVET_DECLARE_PLUGIN(BESIII_2023_I2634735);
346
347}