rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BELLE_2008_I791660

Cross section for $e^+e^-\to \Lambda_c^+\bar{\Lambda}_c^-$ below 5.4 GeV.
Experiment: BELLE (KEKB)
Inspire ID: 791660
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev.Lett. 101 (2008) 172001
Beams: e+ e-
Beam energies: ANY
Run details:
  • e+e- to hadrons

Cross section for $e^+e^-\to \Lambda_c^+\bar{\Lambda}_c^-$ below 5.4 GeV.

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