rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

OPAL_1994_S2927284

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_S2927284.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_S2927284 : public Analysis {
13  public:
14
15    RIVET_DEFAULT_ANALYSIS_CTOR(OPAL_1994_S2927284);
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() +
34                                   beams.second.p3().mod() ) / 2.0;
35      MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
36
37      for (const Particle& p : fs.particles()) {
38        int id = p.abspid();
39        // charged pions
40        if (id == PID::PIPLUS) {
41          _histXpPiPlus->fill(p.p3().mod());
42        } else if(id == PID::KPLUS) {
43          _histXpKPlus->fill(p.p3().mod());
44        } else if(id == PID::PROTON) {
45          _histXpProton->fill(p.p3().mod());
46        }
47      }
48    }
49
50
51    void init() {
52      // Projections
53      declare(Beam(), "Beams");
54      declare(ChargedFinalState(), "FS");
55
56      book(_histXpPiPlus , 1, 1, 1);
57      book(_histXpKPlus  , 2, 1, 1);
58      book(_histXpProton , 3, 1, 1);
59    }
60
61
62    /// Finalize
63    void finalize() {
64      scale(_histXpPiPlus,1./sumOfWeights());
65      scale(_histXpKPlus ,1./sumOfWeights());
66      scale(_histXpProton,1./sumOfWeights());
67    }
68
69    /// @}
70
71
72  private:
73
74    Histo1DPtr _histXpPiPlus;
75    Histo1DPtr _histXpKPlus;
76    Histo1DPtr _histXpProton;
77
78  };
79
80
81
82  RIVET_DECLARE_ALIASED_PLUGIN(OPAL_1994_S2927284, OPAL_1994_I372772);
83
84}