rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

OPAL_1994_I372772

Measurement of the production rates of charged hadrons in $e^+e^-$ annihilation at the $Z^0$
Experiment: OPAL (LEP 1)
Inspire ID: 372772
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Z.Phys.C63:181-196,1994
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)

The inclusive production rates of $\pi^\pm$, $K^\pm$ and $p\bar{p}$ in $Z^0$ decays measured using the OPAL detector at LEP. Only the differential cross sections are currently implemented.

Source code: OPAL_1994_I372772.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/Beam.hh"
 4#include "Rivet/Projections/ChargedFinalState.hh"
 5
 6namespace Rivet {
 7
 8
 9  /// @brief OPAL charged particle fragmentation functions
10  ///
11  /// @author Peter Richardson
12  class OPAL_1994_I372772 : public Analysis {
13  public:
14
15    RIVET_DEFAULT_ANALYSIS_CTOR(OPAL_1994_I372772);
16
17
18    /// @name Analysis methods
19    /// @{
20
21    void analyze(const Event& e) {
22
23      // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
24      const FinalState& fs = apply<FinalState>(e, "FS");
25      if (fs.particles().size() < 2) {
26        MSG_DEBUG("Failed ncharged cut");
27        vetoEvent;
28      }
29      MSG_DEBUG("Passed ncharged cut");
30
31      // Get beams and average beam momentum
32      const ParticlePair& beams = apply<Beam>(e, "Beams").beams();
33      const double meanBeamMom = ( beams.first.p3().mod() + beams.second.p3().mod() ) / 2.0;
34      MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
35
36      for (const Particle& p : fs.particles()) {
37        int id = p.abspid();
38        // charged pions
39        if (id == PID::PIPLUS) {
40          _histXpPiPlus->fill(p.p3().mod());
41        } else if (id == PID::KPLUS) {
42          _histXpKPlus->fill(p.p3().mod());
43        } else if (id == PID::PROTON) {
44          _histXpProton->fill(p.p3().mod());
45        }
46      }
47    }
48
49
50    void init() {
51      // Projections
52      declare(Beam(), "Beams");
53      declare(ChargedFinalState(), "FS");
54
55      book(_histXpPiPlus, 1, 1, 1);
56      book(_histXpKPlus,  2, 1, 1);
57      book(_histXpProton, 3, 1, 1);
58    }
59
60
61    /// Finalize
62    void finalize() {
63      scale(_histXpPiPlus, 1./sumOfWeights());
64      scale(_histXpKPlus,  1./sumOfWeights());
65      scale(_histXpProton, 1./sumOfWeights());
66    }
67
68    /// @}
69
70
71  private:
72
73    Histo1DPtr _histXpPiPlus;
74    Histo1DPtr _histXpKPlus;
75    Histo1DPtr _histXpProton;
76
77  };
78
79
80
81  RIVET_DECLARE_ALIASED_PLUGIN(OPAL_1994_I372772, OPAL_1994_S2927284);
82
83}