rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2022_I2158325

Analysis of $\psi(2S)$ decays to $\Sigma^-\bar\Sigma^+$
Experiment: BES (BEPC)
Inspire ID: 2158325
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 in $e^+e^-\to \psi(2S) \to \Sigma^-\bar\Sigma^+$. Gives information about the decay and is useful for testing correlations in hadron decays.

Source code: BESIII_2022_I2158325.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) -> Sigma- sigmabar+
 11  class BESIII_2022_I2158325 : public Analysis {
 12  public:
 13
 14    /// Constructor
 15    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2022_I2158325);
 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(Cuts::abspid==3112), "UFS");
 27      declare(FinalState(), "FS");
 28      // histograms
 29      book(_h,1,1,1);
 30    }
 31
 32    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 33      for( const Particle &child : p.children()) {
 34	if(child.children().empty()) {
 35	  nRes[child.pid()]-=1;
 36	  --ncount;
 37	}
 38	else
 39	  findChildren(child,nRes,ncount);
 40      }
 41    }
 42
 43    /// Perform the per-event analysis
 44    void analyze(const Event& event) {
 45      // get the axis, direction of incoming electron
 46      const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
 47      Vector3 axis;
 48      if(beams.first.pid()>0)
 49	axis = beams.first .momentum().p3().unit();
 50      else
 51	axis = beams.second.momentum().p3().unit();
 52      // types of final state particles
 53      const FinalState& fs = apply<FinalState>(event, "FS");
 54      map<long,int> nCount;
 55      int ntotal(0);
 56      for (const Particle& p :  fs.particles()) {
 57	nCount[p.pid()] += 1;
 58	++ntotal;
 59      }
 60      // loop over Sigma+ baryons
 61      const UnstableParticles & ufs = apply<UnstableParticles>(event, "UFS");
 62      Particle Sigma,SigBar;
 63      bool matched(false);
 64      for (const Particle& p :  ufs.particles()) {
 65       	if(p.children().empty()) continue;
 66       	map<long,int> nRes=nCount;
 67       	int ncount = ntotal;
 68       	findChildren(p,nRes,ncount);
 69       	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      	      if(p.pid()>0) {
 87      		Sigma = p;
 88      		SigBar = p2;
 89      	      }
 90      	      else {
 91      		Sigma = p2;
 92      		SigBar = p;
 93      	      }	
 94       	      break;
 95       	    }
 96       	  }
 97       	}
 98      	if(matched) break;
 99      }
100      if(!matched) vetoEvent;
101      _h->fill(axis.dot(Sigma.momentum().p3().unit()));
102    }
103
104    pair<double,pair<double,double> > calcAlpha0(Histo1DPtr hist) {
105      if(hist->numEntries()==0.) return make_pair(0.,make_pair(0.,0.));
106      double d = 3./(pow(hist->xMax(),3)-pow(hist->xMin(),3));
107      double c = 3.*(hist->xMax()-hist->xMin())/(pow(hist->xMax(),3)-pow(hist->xMin(),3));
108      double sum1(0.),sum2(0.),sum3(0.),sum4(0.),sum5(0.);
109      for (const auto& bin : hist->bins() ) {
110       	double Oi = bin.sumW();
111        if(Oi==0.) continue;
112        double a =  d*(bin.xMax() - bin.xMin());
113        double b = d/3.*(pow(bin.xMax(),3) - pow(bin.xMin(),3));
114       	double Ei = bin.errW();
115        sum1 +=   a*Oi/sqr(Ei);
116        sum2 +=   b*Oi/sqr(Ei);
117        sum3 += sqr(a)/sqr(Ei);
118        sum4 += sqr(b)/sqr(Ei);
119        sum5 +=    a*b/sqr(Ei);
120      }
121      // calculate alpha
122      double alpha = (-c*sum1 + sqr(c)*sum2 + sum3 - c*sum5)/(sum1 - c*sum2 + c*sum4 - sum5);
123      // and error
124      double cc = -pow((sum3 + sqr(c)*sum4 - 2*c*sum5),3);
125      double bb = -2*sqr(sum3 + sqr(c)*sum4 - 2*c*sum5)*(sum1 - c*sum2 + c*sum4 - sum5);
126      double aa =  sqr(sum1 - c*sum2 + c*sum4 - sum5)*(-sum3 - sqr(c)*sum4 + sqr(sum1 - c*sum2 + c*sum4 - sum5) + 2*c*sum5);
127      double dis = sqr(bb)-4.*aa*cc;
128      if(dis>0.) {
129	dis = sqrt(dis);
130	return make_pair(alpha,make_pair(0.5*(-bb+dis)/aa,-0.5*(-bb-dis)/aa));
131      }
132      else {
133	return make_pair(alpha,make_pair(0.,0.));
134      }
135    }
136
137    /// Normalise histograms etc., after the run
138    void finalize() {
139      normalize(_h);
140      // calculate alpha0
141      pair<double,pair<double,double> > alpha0 = calcAlpha0(_h);
142      Estimate1DPtr _h_alpha0;
143      book(_h_alpha0,2,1,1);
144      _h_alpha0->bin(1).set(alpha0.first, make_pair(alpha0.second.first,alpha0.second.second));
145    }
146
147    /// @}
148
149
150    /// @name Histograms
151    /// @{
152    Histo1DPtr _h;
153    /// @}
154
155
156  };
157
158
159  RIVET_DECLARE_PLUGIN(BESIII_2022_I2158325);
160
161}