rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2017_I1506414

Analysis of $J/\psi$ and $\psi(2S)$ decays to $\Xi^0\bar\Xi^0$ and $\Sigma^{*0}\bar\Sigma^{*0}$
Experiment: BESIII (BEPC)
Inspire ID: 1506414
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Lett. B770 (2017) 217-225
Beams: e- e+
Beam energies: (1.6, 1.6); (1.8, 1.8) GeV
Run details:
  • e+e- > J/psi and Psi(2S). Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Analysis of the angular distribution of the baryons produced in $e^+e^-\to J/\psi,\psi(2S) \to \Xi^0\bar\Xi^0$ and $\Sigma^{*0}\bar\Sigma^{*0}$. Gives information about the decay and is useful for testing correlations in hadron decays. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Source code: BESIII_2017_I1506414.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 Add a short analysis description here
 11  class BESIII_2017_I1506414 : public Analysis {
 12  public:
 13
 14    /// Constructor
 15    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2017_I1506414);
 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 histograms
 30      if(isCompatibleWithSqrtS(3.1,1e-1)) {
 31	book(_h_xi , 1, 1, 2);
 32	book(_h_sig, 1, 1, 1);
 33      }
 34      else if (isCompatibleWithSqrtS(3.686, 1E-1)) {
 35	book(_h_xi , 1, 1, 4);
 36	book(_h_sig, 1, 1, 3);
 37      }
 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    /// Perform the per-event analysis
 52    void analyze(const Event& event) {
 53      // get the axis, direction of incoming electron
 54      const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
 55      Vector3 axis;
 56      if(beams.first.pid()>0)
 57	axis = beams.first .momentum().p3().unit();
 58      else
 59	axis = beams.second.momentum().p3().unit();
 60      // types of final state particles
 61      const FinalState& fs = apply<FinalState>(event, "FS");
 62      map<long,int> nCount;
 63      int ntotal(0);
 64      for (const Particle& p :  fs.particles()) {
 65	nCount[p.pid()] += 1;
 66	++ntotal;
 67      }
 68
 69
 70      const UnstableParticles & ufs = apply<UnstableParticles>(event, "UFS");
 71      for (const Particle& p :  ufs.particles(Cuts::abspid==3322 or Cuts::abspid==3214)) {
 72       	if(p.children().empty()) continue;
 73       	map<long,int> nRes=nCount;
 74       	int ncount = ntotal;
 75       	findChildren(p,nRes,ncount);
 76	bool 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(auto const & val : nRes2) {
 86	      if(val.second!=0) {
 87		matched = false;
 88		break;
 89	      }
 90	    }
 91	    // fond baryon and antibaryon
 92	    if(matched) {
 93	      // calc cosine
 94	      double ctheta;
 95	      if(p.pid()>0)
 96		ctheta = p .momentum().p3().unit().dot(axis);
 97	      else
 98		ctheta = p2.momentum().p3().unit().dot(axis);
 99	      if(abs(p.pid())==3322)
100		_h_xi ->fill(ctheta);
101	      else if(abs(p.pid())==3214)
102		_h_sig->fill(ctheta);
103	      break;
104	    }
105	  }
106	}
107	if(matched) break;
108      }
109    }
110    
111    pair<double,pair<double,double> > calcAlpha(Histo1DPtr hist) {
112      if(hist->numEntries()==0.) return make_pair(0.,make_pair(0.,0.));
113      double d = 3./(pow(hist->xMax(),3)-pow(hist->xMin(),3));
114      double c = 3.*(hist->xMax()-hist->xMin())/(pow(hist->xMax(),3)-pow(hist->xMin(),3));
115      double sum1(0.),sum2(0.),sum3(0.),sum4(0.),sum5(0.);
116      for (auto bin : hist->bins() ) {
117       	double Oi = bin.area();
118	if(Oi==0.) continue;
119	double a =  d*(bin.xMax() - bin.xMin());
120	double b = d/3.*(pow(bin.xMax(),3) - pow(bin.xMin(),3));
121       	double Ei = bin.areaErr();
122	sum1 +=   a*Oi/sqr(Ei);
123	sum2 +=   b*Oi/sqr(Ei);
124	sum3 += sqr(a)/sqr(Ei);
125	sum4 += sqr(b)/sqr(Ei);
126	sum5 +=    a*b/sqr(Ei);
127      }
128      // calculate alpha
129      double alpha = (-c*sum1 + sqr(c)*sum2 + sum3 - c*sum5)/(sum1 - c*sum2 + c*sum4 - sum5);
130      // and error
131      double cc = -pow((sum3 + sqr(c)*sum4 - 2*c*sum5),3);
132      double bb = -2*sqr(sum3 + sqr(c)*sum4 - 2*c*sum5)*(sum1 - c*sum2 + c*sum4 - sum5);
133      double aa =  sqr(sum1 - c*sum2 + c*sum4 - sum5)*(-sum3 - sqr(c)*sum4 + sqr(sum1 - c*sum2 + c*sum4 - sum5) + 2*c*sum5);      
134      double dis = sqr(bb)-4.*aa*cc;
135      if(dis>0.) {
136	dis = sqrt(dis);
137	return make_pair(alpha,make_pair(0.5*(-bb+dis)/aa,-0.5*(-bb-dis)/aa));
138      }
139      else {
140	return make_pair(alpha,make_pair(0.,0.));
141      }
142    }
143
144    /// Normalise histograms etc., after the run
145    void finalize() {
146      // find energy
147      int ioff=-1;
148      if(isCompatibleWithSqrtS(3.1,1e-1)) ioff=0;
149      else if (isCompatibleWithSqrtS(3.686, 1E-1)) ioff=1;
150      normalize(_h_xi,1.,false);
151      Scatter2DPtr _h_alpha_xi;
152      book(_h_alpha_xi,2,2*ioff+2,1);
153      pair<double,pair<double,double> > alpha = calcAlpha(_h_xi);
154      _h_alpha_xi->addPoint(0.5, alpha.first, make_pair(0.5,0.5),
155			    make_pair(alpha.second.first,alpha.second.second) );
156      normalize(_h_sig,1.,false);
157      Scatter2DPtr _h_alpha_sig;
158      book(_h_alpha_sig,2,2*ioff+1,1);
159      alpha = calcAlpha(_h_sig);
160      _h_alpha_sig->addPoint(0.5, alpha.first, make_pair(0.5,0.5),
161			     make_pair(alpha.second.first,alpha.second.second) );
162      
163    }
164    //@}
165
166    /// @name Histograms
167    //@{
168    Histo1DPtr _h_xi,_h_sig;
169    //@}
170
171
172  };
173
174
175  // The hook for the plugin system
176  RIVET_DECLARE_PLUGIN(BESIII_2017_I1506414);
177
178
179}