rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2001_I558091

Inclusive $J/\psi$ cross section at 10.57 GeV
Experiment: BABAR (PEP-II)
Inspire ID: 558091
Status: VALIDATED
Authors:
  • Your Name
References:
  • PRL 87,162002
Beams: e- e+
Beam energies: ANY
Run details:
  • e+ e- to hadrons

Measurement of inclusive $J/psi$ production by BaBar for 10.57 GeV.

Source code: BABAR_2001_I558091.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/UnstableParticles.hh"
 4
 5namespace Rivet {
 6
 7
 8  /// @brief J/psi rate
 9  class BABAR_2001_I558091 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2001_I558091);
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(_c_jpsi, 1, 1, 1);
23    }
24
25
26    /// Perform the per-event analysis
27    void analyze(const Event& event) {
28      const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
29      double nJsi=0.;
30      for (const Particle& p : ufs.particles()) {
31        if (p.pid()==443) {
32          bool fs = true;
33          for (const Particle & child : p.children()) {
34            if(child.pid()==443) {
35              fs = false;
36              break;
37            }
38          }
39          if(fs) nJsi += 1.;
40        }
41      }
42      _c_jpsi->fill(Ecm, nJsi);
43    }
44
45
46    /// Normalise histograms etc., after the run
47    void finalize() {
48      const double fact = crossSection()/ sumOfWeights() /picobarn;
49      scale(_c_jpsi, fact);
50    }
51
52    /// @}
53
54
55    /// @name Histograms
56    /// @{
57    BinnedHistoPtr<string> _c_jpsi;
58    const string Ecm = "10.57";
59    /// @}
60
61
62  };
63
64
65  RIVET_DECLARE_PLUGIN(BABAR_2001_I558091);
66
67
68}