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