Rivet analyses referenceOPAL_2003_I599181Inclusive analysis of the b quark fragmentation function in Z decaysExperiment: OPAL (LEP2) Inspire ID: 599181 Status: VALIDATED Authors:
Beam energies: (45.6, 45.6) GeV Run details:
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(_estXbweak, 1, 1, 1);
30 book(_histXbweak, "/TMP/Xbweak", refData(1, 1, 1));
31
32 book(_histMeanXbweak, 2, 1, 1);
33
34 }
35
36
37 /// Perform the per-event analysis
38 void analyze(const Event& event) {
39
40 // Get beams and average beam momentum
41 const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
42 const double meanBeamMom = ( beams.first.p3().mod() +beams.second.p3().mod() ) / 2.0;
43 MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
44
45 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
46 // Get Bottom hadrons
47 const Particles bhads = select(ufs.particles(), isBottomHadron);
48
49 for (const Particle& bhad : bhads) {
50 // Check for weak decay, i.e. no more bottom present in children
51 if (bhad.isLastWith(hasBottom)) {
52 const double xp = bhad.E()/meanBeamMom;
53 _histXbweak->fill(xp);
54 _histMeanXbweak->fill(_histMeanXbweak->bin(1).xMid(), xp);
55 }
56 }
57 }
58
59
60 /// Normalise histograms etc., after the run
61 void finalize() {
62 normalize(_histXbweak);
63 barchart(_histXbweak, _estXbweak);
64 }
65
66 /// @}
67
68
69 private:
70
71 Histo1DPtr _histXbweak;
72 Estimate1DPtr _estXbweak;
73 Profile1DPtr _histMeanXbweak;
74
75 };
76
77
78
79 RIVET_DECLARE_PLUGIN(OPAL_2003_I599181);
80
81
82}
|