Rivet analyses referenceOPAL_1995_I393503$K^0$ Production in Hadronic $Z^0$ DecaysExperiment: OPAL (LEP) Inspire ID: 393503 Status: VALIDATED Authors:
Beam energies: (45.6, 45.6) GeV Run details:
The production of $K^0$ mesons measured using 1.3 million $Z^0$ events by the OPAL experiment at LEP. Only the fragmentation function is implemented. Source code: OPAL_1995_I393503.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4#include "Rivet/Projections/ChargedFinalState.hh"
5#include "Rivet/Projections/UnstableParticles.hh"
6#include "Rivet/Projections/Beam.hh"
7
8namespace Rivet {
9
10
11 /// @brief kaon spectra at LEP1
12 class OPAL_1995_I393503 : public Analysis {
13 public:
14
15 /// Constructor
16 RIVET_DEFAULT_ANALYSIS_CTOR(OPAL_1995_I393503);
17
18
19 /// @name Analysis methods
20 /// @{
21
22 /// Book histograms and initialise projections before the run
23 void init() {
24 declare(Beam(), "Beams");
25 declare(ChargedFinalState(), "FS");
26 declare(UnstableParticles(), "UFS");
27
28 // Book histograms
29 book(_h_K0_x , 2, 1, 1);
30 book(_h_K0_xi, 3, 1, 1);
31
32 }
33
34
35 /// Perform the per-event analysis
36 void analyze(const Event& event) {
37
38 // First, veto on leptonic events by requiring at least 4 charged FS particles
39 const FinalState& fs = apply<FinalState>(event, "FS");
40 const size_t numParticles = fs.particles().size();
41
42 // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
43 if (numParticles < 2) {
44 MSG_DEBUG("Failed leptonic event cut");
45 vetoEvent;
46 }
47 MSG_DEBUG("Passed leptonic event cut");
48
49 // Get beams and average beam momentum
50 const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
51 const double meanBeamMom = ( beams.first.p3().mod() +
52 beams.second.p3().mod() ) / 2.0;
53 MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
54
55 // Final state of unstable particles to get particle spectra
56 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
57
58 for (const Particle& p : ufs.particles(Cuts::pid==130 or
59 Cuts::pid==310)) {
60 double xp = p.p3().mod()/meanBeamMom;
61 _h_K0_x->fill(xp);
62 _h_K0_xi->fill(-log(xp));
63 }
64
65 }
66
67
68 /// Normalise histograms etc., after the run
69 void finalize() {
70 scale(_h_K0_x, 1./sumOfWeights());
71 scale(_h_K0_xi, 1./sumOfWeights());
72 }
73
74 /// @}
75
76
77 /// @name Histograms
78 /// @{
79 Histo1DPtr _h_K0_x,_h_K0_xi;
80 /// @}
81
82
83 };
84
85
86 RIVET_DECLARE_PLUGIN(OPAL_1995_I393503);
87
88
89}
|