rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BES_1999_I508349

Charm cross sections and spectra at 4.03 and 4.14 GeV
Experiment: BES (BEPC)
Inspire ID: 508349
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D62 (2000) 012002
Beams: e+ e-
Beam energies: (2.0, 2.0); (2.1, 2.1) GeV
Run details:
  • e+e- to hadrons. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Measurement of the total cvharm cross section, together with the $D^0$, $D^+$ rates and spectra at 4.03 and 4.14 GeV by the BES collaboration. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Source code: BES_1999_I508349.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/UnstableParticles.hh"
  4
  5namespace Rivet {
  6
  7
  8  /// @brief charm cross sections
  9  class BES_1999_I508349 : public Analysis {
 10  public:
 11
 12    /// Constructor
 13    RIVET_DEFAULT_ANALYSIS_CTOR(BES_1999_I508349);
 14
 15
 16    /// @name Analysis methods
 17    /// @{
 18
 19    /// Book histograms and initialise projections before the run
 20    void init() {
 21      declare(UnstableParticles(),"UFS");
 22      book(_nD0   ,"/TMP/nD0"   );
 23      book(_nDp   ,"/TMP/nDp"   );
 24      book(_nDs   ,"/TMP/nDs"   );
 25      book(_nCharm,"/TMP/nCharm");
 26      if (isCompatibleWithSqrtS(4.03*GeV,1e-3)) {
 27        book(_h_D0,2,1,1);
 28        book(_h_Dp,2,1,2);
 29      }
 30      else if (isCompatibleWithSqrtS(4.14*GeV,1e-3)) {
 31        book(_h_D0,3,1,1);
 32        book(_h_Dp,3,1,2);
 33      } else {
 34        MSG_ERROR("Beam energy not supported!");
 35      }
 36    }
 37
 38
 39    /// Perform the per-event analysis
 40    void analyze(const Event& event) {
 41      double nD0(0),nDp(0),nDs(0);
 42      for(const Particle & p : apply<UnstableParticles>(event, "UFS").particles(Cuts::abspid==411 or Cuts::abspid==421 or Cuts::abspid==431)) {
 43        if (p.abspid()==421) {
 44          _h_D0->fill(p.momentum().p3().mod());
 45          ++nD0;
 46        }
 47        else if (p.abspid()==411) {
 48          _h_Dp->fill(p.momentum().p3().mod());
 49          ++nDp;
 50        }
 51        else {
 52          ++nDs;
 53        }
 54      }
 55      _nCharm->fill(0.5*(nD0+nDp+nDs));
 56      _nD0   ->fill(0.5*nD0);
 57      _nDp   ->fill(0.5*nDp);
 58      _nDs   ->fill(0.5*nDs);
 59    }
 60
 61
 62    /// Normalise histograms etc., after the run
 63    void finalize() {
 64      scale(_h_D0,0.5*crossSection()/sumOfWeights()/nanobarn);
 65      scale(_h_Dp,0.5*crossSection()/sumOfWeights()/nanobarn);
 66      for(unsigned int ix=1;ix<5;++ix) {
 67        double sigma = crossSection()/ sumOfWeights() /nanobarn;
 68        double error = crossSection()/ sumOfWeights() /nanobarn;
 69        if(ix==1) {
 70          sigma *= _nD0->val();
 71          error *= _nD0->err();
 72        }
 73        else if (ix==2){
 74          sigma *= _nDp->val();
 75          error *= _nDp->err();
 76        }
 77        else if (ix==3){
 78          sigma *= _nDs->val();
 79          error *= _nDs->err();
 80        }
 81        else if (ix==4){
 82          sigma *= _nCharm->val();
 83          error *= _nCharm->err();
 84        }
 85        Estimate1DPtr  mult;
 86        book(mult, 1, 1, ix);
 87        for (auto& b : mult->bins()) {
 88          if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
 89            b.set(sigma, error);
 90          }
 91        }
 92      }
 93    }
 94
 95    /// @}
 96
 97
 98    /// @name Histograms
 99    /// @{
100    CounterPtr _nD0,_nDp,_nDs,_nCharm;
101    Histo1DPtr _h_D0,_h_Dp;
102    /// @}
103
104
105  };
106
107
108  RIVET_DECLARE_PLUGIN(BES_1999_I508349);
109
110}