rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

JADE_1984_I202785

Spectrum for $D^{*+}$ production in $e^+e^-$ collisions at $E_{\text{CMS}}=34.4$
Experiment: JADE (Petra)
Inspire ID: 202785
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Lett. 104B (1981) 325-329
Beams: e+ e-
Beam energies: (17.2, 17.2) GeV
Run details:
  • e+ e- to hadrons

Measurement of the $D^{*+}$ momentum spectrum in $e^+e^-$ collisions for a centre-of-mass energy of 34.4 GeV by the JADE experiment at Petra. The angular distribution is also measured.

Source code: JADE_1984_I202785.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/UnstableParticles.hh"
 4#include "Rivet/Projections/Beam.hh"
 5
 6namespace Rivet {
 7
 8
 9  /// @brief D*+ production at 34.4 GeV
10  class JADE_1984_I202785 : public Analysis {
11  public:
12
13    /// Constructor
14    RIVET_DEFAULT_ANALYSIS_CTOR(JADE_1984_I202785);
15
16
17    /// @name Analysis methods
18    /// @{
19
20    /// Book histograms and initialise projections before the run
21    void init() {
22      declare(Beam(), "Beams");
23      declare(UnstableParticles(), "UFS");
24
25      // Book histograms
26      book(_h_x, 1, 1, 1);
27      book(_h_theta, 3, 1, 1);
28      _axis = YODA::Axis<double>(6, -0.9, 0.9);
29    }
30
31
32    /// Perform the per-event analysis
33    void analyze(const Event& event) {
34
35      if (_edges.empty())  _edges = _h_theta->xEdges();
36      // Get beams and average beam momentum
37      const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
38      const double meanBeamMom = ( beams.first.p3().mod() +
39                                   beams.second.p3().mod() ) / 2.0;
40      MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
41      Vector3 axis = beams.first.pid() == PID::EMINUS ? beams.first.p3().unit() : beams.second.p3().unit();
42      const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
43      for (const Particle& p : ufs.particles(Cuts::abspid==413)) {
44        double modp = p.p3().mod();
45        double xE =p.E()/meanBeamMom;
46        _h_x->fill(xE);
47        if(xE>0.4 && p.pid()>0) {
48          _h_theta->fill(map2string(p.p3().dot(axis)/modp));
49        }
50      }
51    }
52
53
54    /// Normalise histograms etc., after the run
55    void finalize() {
56
57      normalize(_h_theta,33.6,false); // normalize to data
58      scale(_h_x, crossSection()/microbarn/sumOfWeights()*sqr(sqrtS()));
59
60    }
61
62    /// @}
63
64    string map2string(const double value) const {
65      const size_t idx = _axis.index(value);
66      if (idx && idx <= _edges.size())  return _edges[idx-1];
67      return "OTHER";
68    }
69
70
71    /// @name Histograms
72    /// @{
73    Histo1DPtr _h_x;
74    BinnedHistoPtr<string> _h_theta;
75    YODA::Axis<double> _axis;
76    vector<string> _edges;
77    /// @}
78
79
80  };
81
82
83  RIVET_DECLARE_PLUGIN(JADE_1984_I202785);
84
85
86}