rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

DELPHI_1995_I394052

$K^\pm$ and $p,\bar{p}$ spectra in hadronic $Z^0$ decays
Experiment: DELPHI (LEP)
Inspire ID: 394052
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Nucl.Phys. B444 (1995) 3-26, 1995
Beams: e+ e-
Beam energies: (45.6, 45.6) GeV
Run details:
  • Hadronic Z decay events generated on the Z pole ($\sqrt{s} = 91.2$ GeV)

DELPHI results for the spectra for $K^\pm$ and $p,\bar{p}$ production in hadronic $Z^0$ decays.

Source code: DELPHI_1995_I394052.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/FinalState.hh"
  4#include "Rivet/Projections/ChargedFinalState.hh"
  5#include "Rivet/Projections/Beam.hh"
  6
  7namespace Rivet {
  8
  9
 10  /// @brief K+/- and protno spectra
 11  class DELPHI_1995_I394052 : public Analysis {
 12  public:
 13
 14    /// Constructor
 15    RIVET_DEFAULT_ANALYSIS_CTOR(DELPHI_1995_I394052);
 16
 17
 18    /// @name Analysis methods
 19    /// @{
 20
 21    /// Book histograms and initialise projections before the run
 22    void init() {
 23      declare(Beam(), "Beams");
 24      declare(ChargedFinalState(), "FS");
 25
 26      // Book histograms
 27      book(_h_kaon_p   , 3, 1, 1);
 28      book(_h_kaon_x   , 5, 1, 1);
 29      book(_h_proton_p , 4, 1, 1);
 30      book(_h_proton_x , 6, 1, 1);
 31
 32      _axis[0] = YODA::Axis<double>({0.017543859649122806, 0.024122807017543862, 0.03070175438596491,
 33                                     0.03728070175438596,  0.043859649122807015, 0.05482456140350877,
 34                                     0.06578947368421052,  0.07675438596491228,  0.08771929824561403,
 35                                     0.21929824561403508,  0.2631578947368421,   0.30701754385964913,
 36                                     0.3508771929824561,   0.39473684210526316,  0.43859649122807015,
 37                                     0.5043859649122807});
 38      _axis[1] = YODA::Axis<double>({0.03070175438596491, 0.03728070175438596, 0.043859649122807015,
 39                                     0.05482456140350877, 0.06578947368421052, 0.07675438596491228,
 40                                     0.08771929824561403, 0.09868421052631579, 0.10964912280701754});
 41    }
 42
 43
 44    /// Perform the per-event analysis
 45    void analyze(const Event& event) {
 46
 47      if (_edges[0].empty())  _edges[0] = _h_kaon_x->xEdges();
 48      if (_edges[1].empty())  _edges[1] = _h_proton_x->xEdges();
 49
 50      // First, veto on leptonic events by requiring at least 4 charged FS particles
 51      const FinalState& fs = apply<FinalState>(event, "FS");
 52      const size_t numParticles = fs.particles().size();
 53
 54      // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
 55      if (numParticles < 2) {
 56        MSG_DEBUG("Failed leptonic event cut");
 57        vetoEvent;
 58      }
 59      MSG_DEBUG("Passed leptonic event cut");
 60
 61      // Get beams and average beam momentum
 62      const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
 63      const double meanBeamMom = ( beams.first.p3().mod() + beams.second.p3().mod() ) / 2.0;
 64      MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
 65      for (const Particle& p : fs.particles(Cuts::abspid==321 or Cuts::abspid==2212)) {
 66        double modp = p.p3().mod();
 67        double xp = modp/meanBeamMom;
 68        if(abs(p.pid())==321) {
 69          _h_kaon_p->fill(modp);
 70          _h_kaon_x->fill(map2string(xp, 0));
 71        }
 72        else {
 73          _h_proton_p->fill(modp);
 74          _h_proton_x->fill(map2string(xp, 1));
 75        }
 76      }
 77    }
 78
 79
 80    /// Normalise histograms etc., after the run
 81    void finalize() {
 82      scale(_h_kaon_p  ,1./sumOfWeights());
 83      scale(_h_kaon_x  ,1./sumOfWeights());
 84      scale(_h_proton_p,1./sumOfWeights());
 85      scale(_h_proton_x,1./sumOfWeights());
 86    }
 87
 88    /// @}
 89
 90    string map2string(const double value, const size_t type) const {
 91      const size_t idx = _axis[type].index(value);
 92      if (idx && idx < 9)  return _edges[type][idx-1];
 93      if (idx > 9 && idx <= _edges[type].size()+1)  return _edges[type][idx-2];
 94      return "OTHER";
 95    }
 96
 97
 98    /// @name Histograms
 99    /// @{
100    Histo1DPtr _h_kaon_p, _h_proton_p;
101    BinnedHistoPtr<string> _h_kaon_x, _h_proton_x;
102    vector<string> _edges[2];
103    YODA::Axis<double> _axis[2];
104    /// @}
105
106
107  };
108
109
110  RIVET_DECLARE_PLUGIN(DELPHI_1995_I394052);
111
112
113}