rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BESIII_2019_I1743841

Cross section for $K^+K^-K^+K^-$ and $K^+K^-\phi$ for $E_{\text{CMS}}=2.10$ to $3.08$ GeV
Experiment: BESIII (BEPC)
Inspire ID: 1743841
Status: VALIDATED
Authors:
  • Peter Richardson
References: Beams: e+ e-
Beam energies: ANY
Run details:
  • e+e- to hadrons

Measurement of the cross section for $e^+e^- \to$ $K^+K^-K^+K^-$ and $K^+K^-\phi$ for center of mass energies between 2.10 and 3.08 GeV by the BESIII experiment.

Source code: BESIII_2019_I1743841.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/FinalState.hh"
  4#include "Rivet/Projections/UnstableParticles.hh"
  5
  6namespace Rivet {
  7
  8
  9  /// @brief 2K+2K- and K+K- phi cross section
 10  class BESIII_2019_I1743841 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BESIII_2019_I1743841);
 15
 16
 17    /// @name Analysis methods
 18    //@{
 19
 20    /// Book histograms and initialise projections before the run
 21    void init() {
 22      // Initialise and register projections
 23      declare(FinalState(), "FS");
 24      declare(UnstableParticles(), "UFS");
 25      // book counters
 26      book(_c2Kp2Km , "TMP/2Kp2Km" );
 27      book(_cKpKmPhi, "TMP/KpKmPhi");
 28    }
 29
 30    void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
 31      for( const Particle &child : p.children()) {
 32	if(child.children().empty()) {
 33	  nRes[child.pid()]-=1;
 34	  --ncount;
 35	}
 36	else
 37	  findChildren(child,nRes,ncount);
 38      }
 39    }
 40
 41    /// Perform the per-event analysis
 42    void analyze(const Event& event) {
 43      const FinalState& fs = apply<FinalState>(event, "FS");
 44
 45      map<long,int> nCount;
 46      int ntotal(0);
 47      for (const Particle& p :  fs.particles()) {
 48	nCount[p.pid()] += 1;
 49	++ntotal;
 50      }
 51      if(ntotal==4 && nCount[321]==2 && nCount[-321]==2)
 52	_c2Kp2Km->fill();
 53      const FinalState& ufs = apply<FinalState>(event, "UFS");
 54      for (const Particle& p :  ufs.particles(Cuts::pid==333)) {
 55      	if(p.children().empty()) continue;
 56	map<long,int> nRes=nCount;
 57	int ncount = ntotal;
 58	findChildren(p,nRes,ncount);
 59	// phi K+K-
 60	if(ncount==2) {
 61	  bool matched = true;
 62	  for(auto const & val : nRes) {
 63	    if(abs(val.first)==321) {
 64	      if(val.second!=1) {
 65		matched = false;
 66		break;
 67	      }
 68	    }
 69	    else if(val.second!=0) {
 70	      matched = false;
 71	      break;
 72	    }
 73	  }
 74	  if(matched)
 75	    _cKpKmPhi->fill();
 76	}
 77      }
 78    }
 79
 80
 81    /// Normalise histograms etc., after the run
 82    void finalize() {
 83      for(unsigned int ix=1;ix<3;++ix) {
 84	double sigma = 0., error = 0.;
 85	if(ix==1) {
 86	  sigma =  _c2Kp2Km->val();
 87	  error =  _c2Kp2Km->err();
 88	}
 89	else {
 90	  sigma =  _cKpKmPhi->val();
 91	  error =  _cKpKmPhi->err();
 92	}
 93    	sigma *= crossSection()/ sumOfWeights() /picobarn;
 94    	error *= crossSection()/ sumOfWeights() /picobarn;
 95	Scatter2D temphisto(refData(ix, 1, 1));
 96	Scatter2DPtr  mult;
 97	book(mult,ix, 1, 1);
 98	for (size_t b = 0; b < temphisto.numPoints(); b++) {
 99	  const double x  = temphisto.point(b).x();
100	  pair<double,double> ex = temphisto.point(b).xErrs();
101	  pair<double,double> ex2 = ex;
102	  if(ex2.first ==0.) ex2. first=0.0001;
103	  if(ex2.second==0.) ex2.second=0.0001;
104	  if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
105	    mult->addPoint(x, sigma, ex, make_pair(error,error));
106	  }
107	  else {
108	    mult->addPoint(x, 0., ex, make_pair(0.,.0));
109	  }
110	}
111      }
112    }
113
114    //@}
115
116
117    /// @name Histograms
118    //@{
119    CounterPtr _c2Kp2Km,_cKpKmPhi;
120    //@}
121
122
123  };
124
125
126  // The hook for the plugin system
127  RIVET_DECLARE_PLUGIN(BESIII_2019_I1743841);
128
129
130}