rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2023_I2660219

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

Analysis of the angular distribution of the baryons, and decay products, produced in $e^+e^-\to J/\psi \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_I2660219.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  J/psi -> Xi0 Xibar0
 11  class BESIII_2023_I2660219 : public Analysis {
 12  public:
 13
 14    /// Constructor
 15    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2023_I2660219);
 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      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      const double cPbar = pPbar.p3().unit().dot(axis2);
176      _h_cProton[1]->fill(cPbar);
177      // moments
178      const double T1 = sqr(sinX)*n1x*n2x+sqr(cosX)*n1z*n2z;
179      const double T2 = -sinX*cosX*(n1x*n2z+n1z*n2x);
180      const double T3 = -sinX*cosX*n1y;
181      const double T4 = -sinX*cosX*n2y;
182      const 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      return make_pair(sum2/sum1,sqrt(1./sum1));
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())) + pow(bin.xMax(),3)*(  5. - 3.*sqr(bin.xMax())))/15.;
251        }
252        else {
253          assert(false);
254        }
255        double Ei = bin.errW();
256        sum1 += sqr(bi/Ei);
257        sum2 += bi/sqr(Ei)*(Oi-ai);
258      }
259      return make_pair(sum2/sum1,sqrt(1./sum1));
260    }
261
262    /// Normalise histograms etc., after the run
263    void finalize() {
264      const double aLambda = 0.754;
265      normalize(_h_cTheta);
266      normalize(_h_cProton);
267      scale(_h_T1, 1.0/ *_wsum);
268      scale(_h_T2, 1.0/ *_wsum);
269      scale(_h_T3, 1.0/ *_wsum);
270      scale(_h_T4, 1.0/ *_wsum);
271      scale(_h_T5, 1.0/ *_wsum);
272      // calculate alpha0
273      pair<double,pair<double,double> > alpha0 = calcAlpha0(_h_cTheta);
274      Estimate0DPtr _h_alpha0;
275      book(_h_alpha0, 1, 1, 1);
276      _h_alpha0->set(alpha0.first, alpha0.second);
277      double s2 = -1. + sqr(alpha0.first);
278      double s3 = 3 + alpha0.first;
279      double s1 = sqr(s3);
280      // alpha parameters
281      pair<double,double> alpha[2];
282      for (unsigned int ix=0; ix<2; ++ix) {
283        Estimate0DPtr h_alpha;
284        book(h_alpha, 1, 1, 3+ix);
285        alpha[ix] = calcAlpha(_h_cProton[ix]);
286        alpha[ix].first /= aLambda;
287        if (ix==1) alpha[ix].first *=-1;
288        alpha[ix].second /= aLambda;
289        h_alpha->set(alpha[ix].first, alpha[ix].second);
290      }
291      // now for Delta
292      pair<double,double> c_T2 = calcCoeff(2,_h_T2);
293      pair<double,double> c_T3 = calcCoeff(3,_h_T3);
294      pair<double,double> c_T4 = calcCoeff(4,_h_T4);
295      double s4 = sqr(c_T2.first);
296      double s5 = sqr(c_T3.first);
297      double s6 = sqr(c_T4.first);
298      double disc = s1*s5*s6*(-9.*s2*s4 + 4.*s1*s5*s6);
299      if (disc<0.) return;
300      disc = sqrt(disc);
301      double sDelta = (-2.*(3. + alpha0.first)*c_T3.first)/(alpha[0].first*sqrt(1 - sqr(alpha0.first)));
302      double cDelta = (-3*(3 + alpha0.first)*c_T2.first)/(alpha[0].first*alpha[1].first*sqrt(1 - sqr(alpha0.first)));
303      double Delta = asin(sDelta);
304      if (cDelta<0.) Delta = M_PI-Delta;
305      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 +
306                   c_T2.first*c_T4.first*(c_T3.first*(alpha0.second.first + 3*alpha0.first*alpha0.second.first) -
307                   (-1 + alpha0.first)*(1 + alpha0.first)*(3 + alpha0.first)*c_T3.second) -
308				           (-1 + alpha0.first)*(1 + alpha0.first)*  (3 + alpha0.first)*c_T2.first*c_T3.first*c_T4.second)*disc) /
309                   (pow(1 - pow(alpha0.first,2),1.5)*pow(c_T4.first,3)*pow(-((disc + 2*s1*s5*s6) /
310                   (s2*s6)),1.5)*(-9*s2*s4 + 4*s1*s5*s6));
311      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 +
312                    c_T2.first*c_T4.first*(c_T3.first*(alpha0.second.second + 3*alpha0.first*alpha0.second.second) -
313                    (-1 + alpha0.first)*(1 + alpha0.first)*(3 + alpha0.first)*c_T3.second) -
314                    (-1 + alpha0.first)*(1 + alpha0.first)*  (3 + alpha0.first) * c_T2.first*c_T3.first*c_T4.second)*disc) /
315                    (pow(1 - pow(alpha0.first,2),1.5)*pow(c_T4.first,3)*pow(-((disc + 2*s1*s5*s6) /
316                    (s2*s6)),1.5)*(-9*s2*s4 + 4*s1*s5*s6));
317      ds_P /= sqrt(1.-sqr(sDelta));
318      ds_M /= sqrt(1.-sqr(sDelta));
319      Estimate0DPtr _h_sin;
320      book(_h_sin, 1, 1, 2);
321      _h_sin->set(Delta, make_pair( -ds_P, -ds_M) );
322    }
323
324    /// @}
325
326
327    /// @name Histograms
328    /// @{
329    Histo1DPtr _h_T1, _h_T2, _h_T3, _h_T4, _h_T5;
330    Histo1DPtr _h_cTheta,_h_cProton[2];
331    CounterPtr _wsum;
332    /// @}
333
334
335  };
336
337
338  RIVET_DECLARE_PLUGIN(BESIII_2023_I2660219);
339
340}