rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

OPAL_2003_I599181

Inclusive analysis of the b quark fragmentation function in Z decays
Experiment: OPAL (LEP2)
Inspire ID: 599181
Status: VALIDATED
Authors:
  • Simone Amoroso
References: 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)

A study of b quark fragmentation function is presented using inclusively reconstructed weakly decaying B hadrons. The measurement uses about four million hadronic Z decays recorded in 1992-2000 with the OPAL detector at LEP.

Source code: OPAL_2003_I599181.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 OPAL b-fragmentation measurement for weak B-hadron decays
10  /// @author Simone Amoroso
11  class OPAL_2003_I599181 : public Analysis {
12  public:
13
14    /// Constructor
15    RIVET_DEFAULT_ANALYSIS_CTOR(OPAL_2003_I599181);
16
17
18    /// @name Analysis methods
19    /// @{
20
21    /// Book histograms and initialise projections before the run
22    void init() {
23
24      // Initialise and register projections
25      declare(Beam(), "Beams");
26      declare(UnstableParticles(), "UFS");
27
28      // Book histograms
29      book(_histXbweak, "TMP/hist", refData(1,1,1));
30
31      book(_histMeanXbweak, 5, 1, 1);
32
33    }
34
35
36    /// Perform the per-event analysis
37    void analyze(const Event& event) {
38
39      // Get beams and average beam momentum
40      const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
41      const double meanBeamMom = ( beams.first.p3().mod() +beams.second.p3().mod() ) / 2.0;
42      MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
43
44      const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
45      // Get Bottom hadrons
46      const Particles bhads = select(ufs.particles(), isBottomHadron);
47
48      for (const Particle& bhad : bhads) {
49        // Check for weak decay, i.e. no more bottom present in children
50        if (bhad.isLastWith(hasBottom)) {
51          const double xp = bhad.E()/meanBeamMom;
52          _histXbweak->fill(xp);
53          _histMeanXbweak->fill("91.2", xp);
54        }
55      }
56    }
57
58
59    /// Normalise histograms etc., after the run
60    void finalize() {
61      normalize(_histXbweak);
62      Estimate1DPtr tmp;
63      book(tmp,1,1,1);
64      barchart(_histXbweak,tmp);
65    }
66
67    /// @}
68
69
70  private:
71
72    Histo1DPtr _histXbweak;
73    BinnedProfilePtr<string> _histMeanXbweak;
74
75  };
76
77
78
79  RIVET_DECLARE_PLUGIN(OPAL_2003_I599181);
80
81
82}