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      for(unsigned int ix=0;ix<4;++ix)
23        book(_nD[ix], 1, 1, 1+ix);
24      
25      if (isCompatibleWithSqrtS(4.03*GeV,1e-3)) {
26        book(_h_D0,2,1,1);
27        book(_h_Dp,2,1,2);
28        _ecms = "4.03";
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        _ecms = "4.14";
34      } else {
35        MSG_ERROR("Beam energy not supported!");
36      }
37    }
38
39
40    /// Perform the per-event analysis
41    void analyze(const Event& event) {
42      double nD0(0),nDp(0),nDs(0);
43      for(const Particle & p : apply<UnstableParticles>(event, "UFS").particles(Cuts::abspid==411 or Cuts::abspid==421 or Cuts::abspid==431)) {
44        if (p.abspid()==421) {
45          _h_D0->fill(p.momentum().p3().mod());
46          ++nD0;
47        }
48        else if (p.abspid()==411) {
49          _h_Dp->fill(p.momentum().p3().mod());
50          ++nDp;
51        }
52        else {
53          ++nDs;
54        }
55      }
56      _nD[0]->fill(_ecms,0.5*nD0);
57      _nD[1]->fill(_ecms,0.5*nDp);
58      _nD[2]->fill(_ecms,0.5*nDs);
59      _nD[3]->fill(_ecms,0.5*(nD0+nDp+nDs));
60    }
61
62
63    /// Normalise histograms etc., after the run
64    void finalize() {
65      double fact = crossSection()/sumOfWeights()/nanobarn;
66      scale(_h_D0,0.5*fact);
67      scale(_h_Dp,0.5*fact);
68      for(unsigned int ix=0;ix<4;++ix)
69        scale(_nD[ix],fact);
70    }
71
72    /// @}
73
74
75    /// @name Histograms
76    /// @{
77    BinnedHistoPtr<string> _nD[4];
78    Histo1DPtr _h_D0,_h_Dp;
79    string _ecms;
80    /// @}
81
82
83  };
84
85
86  RIVET_DECLARE_PLUGIN(BES_1999_I508349);
87
88}