rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2007_I760730

Cross section for $e^+e^-\to\Lambda\bar{\Lambda}$, $\Sigma^0\bar{\Sigma}^0$ and $\Lambda\bar{\Sigma}^0$ between threshold and 3 GeV
Experiment: BABAR (PEP-II)
Inspire ID: 760730
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D76 (2007) 092006
Beams: e+ e-
Beam energies: ANY
Run details:
  • e+e- to hadrons

Measurement of the cross section for $e^+e^-\to\Lambda\bar{\Lambda}$ between threshold and 3 GeV.

Source code: BABAR_2007_I760730.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 e+e- > hyperons
 10  class BABAR_2007_I760730 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2007_I760730);
 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(_nLL, "/TMP/nLL" );
 26      book(_nSS, "/TMP/nSS" );
 27      book(_nLS, "/TMP/nLS" );
 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      // total hadronic and muonic cross sections
 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
 52      // find the Lambdas and Sigmas
 53      const FinalState& ufs = apply<UnstableParticles>(event, "UFS");
 54      for(unsigned int ix=0;ix<ufs.particles().size();++ix) {
 55      	const Particle& p1 = ufs.particles()[ix];
 56      	if(abs(p1.pid())!=3122&&abs(p1.pid())!=3212) continue;
 57      	bool matched = false;
 58      	// check fs
 59      	bool fs = true;
 60      	for(const Particle & child : p1.children()) {
 61      	  if(child.pid()==p1.pid()) {
 62      	    fs = false;
 63      	    break;
 64      	  }
 65      	}
 66      	if(!fs) continue;
 67      	// find the children
 68      	map<long,int> nRes = nCount;
 69      	int ncount = ntotal;
 70      	findChildren(p1,nRes,ncount);
 71      	for(unsigned int iy=ix+1;iy<ufs.particles().size();++iy) {
 72      	  const Particle& p2 = ufs.particles()[iy];
 73	  if(abs(p2.pid())!=3122&&abs(p2.pid())!=3212) continue;
 74	  // check fs
 75	  bool fs = true;
 76	  for(const Particle & child : p2.children()) {
 77	    if(child.pid()==p2.pid()) {
 78	      fs = false;
 79	      break;
 80	    }
 81	  }
 82	  if(!fs) continue;
 83      	  map<long,int> nRes2 = nRes;
 84      	  int ncount2 = ncount;
 85      	  findChildren(p2,nRes2,ncount2);
 86      	  if(ncount2!=0) continue;
 87      	  matched=true;
 88      	  for(auto const & val : nRes2) {
 89      	    if(val.second!=0) {
 90      	      matched = false;
 91      	      break;
 92      	    }
 93      	  }
 94      	  if(matched) {
 95	    if(abs(p1.pid())==3122 && abs(p2.pid())==3122)
 96	      _nLL->fill();
 97	    else if(abs(p1.pid())==3212 && abs(p2.pid())==3212)
 98	      _nSS->fill();
 99	    else
100	      _nLS->fill();
101      	    break;
102      	  }
103      	}
104      	if(matched) break;
105      }
106    }
107
108    /// Normalise histograms etc., after the run
109    void finalize() {
110      double fact = crossSection()/ sumOfWeights() /picobarn;
111      for(unsigned int ix=1;ix<4;++ix) {
112	double sigma,error;
113	if(ix==1) {
114	  sigma = _nLL->val()*fact;
115	  error = _nLL->err()*fact;
116	}
117	else if(ix==2) {
118	  sigma = _nSS->val()*fact;
119	  error = _nSS->err()*fact;
120	}
121	else {
122	  sigma = _nLS->val()*fact;
123	  error = _nLS->err()*fact;
124	}
125	Estimate1DPtr  mult;
126        book(mult, ix, 1, 1);
127	for (auto& b : mult->bins()) {
128	  if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
129	    b.set(sigma, error);
130	  }
131	}
132      }
133    }
134
135    /// @}
136
137
138    /// @name Histograms
139    /// @{
140    CounterPtr _nLL,_nSS,_nLS;
141    /// @}
142
143
144  };
145
146
147  RIVET_DECLARE_PLUGIN(BABAR_2007_I760730);
148
149
150}