rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2019_I1747092

Analysis of $\psi(2S)$ decays to $\Xi^{*-}\bar\Xi^{*+}$
Experiment: BESIII (BEPC)
Inspire ID: 1747092
Status: VALIDATED
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 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.

Source code: BESIII_2019_I1747092.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 BES psi2s -> Xi*- Xibar*+
 11  class BESIII_2019_I1747092 : public Analysis {
 12  public:
 13
 14    /// Constructor
 15    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2019_I1747092);
 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      
 29      book(_h_xim, 1, 1, 1);
 30      book(_h_xip, 1, 1, 2);
 31
 32    }
 33
 34    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 35      for(const Particle &child : p.children()) {
 36	if(child.children().empty()) {
 37	  nRes[child.pid()]-=1;
 38	  --ncount;
 39	}
 40	else
 41	  findChildren(child,nRes,ncount);
 42      }
 43    }
 44
 45    /// Perform the per-event analysis
 46    void analyze(const Event& event) {
 47      // get the axis, direction of incoming electron
 48      const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
 49      Vector3 axis;
 50      if(beams.first.pid()>0)
 51	axis = beams.first .momentum().p3().unit();
 52      else
 53	axis = beams.second.momentum().p3().unit();
 54      // types of final state particles
 55      const FinalState& fs = apply<FinalState>(event, "FS");
 56      map<long,int> nCount;
 57      int ntotal(0);
 58      for (const Particle& p : fs.particles()) {
 59	nCount[p.pid()] += 1;
 60	++ntotal;
 61      }
 62
 63      const UnstableParticles & ufs = apply<UnstableParticles>(event, "UFS");
 64      for (const Particle& p : ufs.particles(Cuts::abspid==3314)) {
 65       	if(p.children().empty()) continue;
 66       	map<long,int> nRes=nCount;
 67       	int ncount = ntotal;
 68       	findChildren(p,nRes,ncount);
 69	bool matched=false;
 70	// check for antiparticle
 71	for (const Particle& p2 : ufs.particles(Cuts::pid==-p.pid())) {
 72	  if(p2.children().empty()) continue;
 73	  map<long,int> nRes2=nRes;
 74	  int ncount2 = ncount;
 75	  findChildren(p2,nRes2,ncount2);
 76	  if(ncount2==0) {
 77	    matched = true;
 78	    for(auto const & val : nRes2) {
 79	      if(val.second!=0) {
 80		matched = false;
 81		break;
 82	      }
 83	    }
 84	    // fond baryon and antibaryon
 85	    if(matched) {
 86	      // calc cosine
 87	      double ctheta1 = p .momentum().p3().unit().dot(axis);
 88	      double ctheta2 = p2.momentum().p3().unit().dot(axis);
 89	      if(p.pid()<0) swap(ctheta1,ctheta2);
 90	      _h_xim->fill(ctheta1);
 91	      _h_xip->fill(ctheta2);
 92	      break;
 93	    }
 94	  }
 95	}
 96	if(matched) break;
 97      }
 98    }
 99
100    pair<double,pair<double,double> > calcAlpha(Histo1DPtr hist) {
101      if(hist->numEntries()==0.) return make_pair(0.,make_pair(0.,0.));
102      double d = 3./(pow(hist->xMax(),3)-pow(hist->xMin(),3));
103      double c = 3.*(hist->xMax()-hist->xMin())/(pow(hist->xMax(),3)-pow(hist->xMin(),3));
104      double sum1(0.),sum2(0.),sum3(0.),sum4(0.),sum5(0.);
105      for (auto bin : hist->bins() ) {
106       	double Oi = bin.area();
107	if(Oi==0.) continue;
108	double a =  d*(bin.xMax() - bin.xMin());
109	double b = d/3.*(pow(bin.xMax(),3) - pow(bin.xMin(),3));
110       	double Ei = bin.areaErr();
111	sum1 +=   a*Oi/sqr(Ei);
112	sum2 +=   b*Oi/sqr(Ei);
113	sum3 += sqr(a)/sqr(Ei);
114	sum4 += sqr(b)/sqr(Ei);
115	sum5 +=    a*b/sqr(Ei);
116      }
117      // calculate alpha
118      double alpha = (-c*sum1 + sqr(c)*sum2 + sum3 - c*sum5)/(sum1 - c*sum2 + c*sum4 - sum5);
119      // and error
120      double cc = -pow((sum3 + sqr(c)*sum4 - 2*c*sum5),3);
121      double bb = -2*sqr(sum3 + sqr(c)*sum4 - 2*c*sum5)*(sum1 - c*sum2 + c*sum4 - sum5);
122      double aa =  sqr(sum1 - c*sum2 + c*sum4 - sum5)*(-sum3 - sqr(c)*sum4 + sqr(sum1 - c*sum2 + c*sum4 - sum5) + 2*c*sum5);      
123      double dis = sqr(bb)-4.*aa*cc;
124      if(dis>0.) {
125	dis = sqrt(dis);
126	return make_pair(alpha,make_pair(0.5*(-bb+dis)/aa,-0.5*(-bb-dis)/aa));
127      }
128      else {
129	return make_pair(alpha,make_pair(0.,0.));
130      }
131    }
132
133    /// Normalise histograms etc., after the run
134    void finalize() {
135      normalize(_h_xim,1.,false);
136      normalize(_h_xip,1.,false);
137      Scatter2DPtr _h_alpha_xi;
138      book(_h_alpha_xi, 2,1,1);
139      pair<double,pair<double,double> > alpha = calcAlpha(_h_xim);
140      _h_alpha_xi->addPoint(0.5, alpha.first, make_pair(0.5,0.5),
141			    make_pair(alpha.second.first,alpha.second.second) );
142    }
143
144    //@}
145
146
147    /// @name Histograms
148    //@{+
149    Histo1DPtr _h_xim,_h_xip;
150    //@}
151
152
153  };
154
155
156  // The hook for the plugin system
157  RIVET_DECLARE_PLUGIN(BESIII_2019_I1747092);
158
159
160}