Rivet analyses referenceOPAL_1997_I421977$\Sigma^{\pm}$ baryon production in $Z$ hadronic decays at OPALExperiment: OPAL (LEP) Inspire ID: 421977 Status: VALIDATED Authors:
Beam energies: (45.6, 45.6) GeV Run details:
Spectra for the production of the $\Sigma^\pm$ baryons at LEP I measured by OPAL. Source code: OPAL_1997_I421977.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/Beam.hh"
4#include "Rivet/Projections/ChargedFinalState.hh"
5#include "Rivet/Projections/UnstableParticles.hh"
6
7namespace Rivet {
8
9
10 /// @brief OPAL strange baryon paper
11 /// @author Peter Richardson
12 class OPAL_1997_I421977 : public Analysis {
13 public:
14
15 /// Constructor
16 RIVET_DEFAULT_ANALYSIS_CTOR(OPAL_1997_I421977);
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_plus, 1, 1, 1);
30 book(_h_minus, 2, 1, 1);
31 }
32
33
34 /// Perform the per-event analysis
35 void analyze(const Event& event) {
36 // First, veto on leptonic events by requiring at least 4 charged FS particles
37 const FinalState& fs = apply<FinalState>(event, "FS");
38 const size_t numParticles = fs.particles().size();
39
40 // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
41 if (numParticles < 2) {
42 MSG_DEBUG("Failed leptonic event cut");
43 vetoEvent;
44 }
45 MSG_DEBUG("Passed leptonic event cut");
46
47 // Get beams and average beam momentum
48 const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
49 const double meanBeamMom = ( beams.first.p3().mod() +
50 beams.second.p3().mod() ) / 2.0;
51 MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
52
53 // Final state of unstable particles to get particle spectra
54 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
55
56 for (const Particle& p : ufs.particles()) {
57 const int id = p.abspid();
58 double xE = p.E()/meanBeamMom;
59 if(id==3222) _h_plus ->fill(xE);
60 else if(id==3112) _h_minus->fill(xE);
61 }
62 }
63
64
65 /// Normalise histograms etc., after the run
66 void finalize() {
67
68 double fact=1./sumOfWeights();
69 scale(_h_plus , fact);
70 scale(_h_minus, fact);
71
72 }
73
74 /// @}
75
76
77 /// @name Histograms
78 /// @{
79 Histo1DPtr _h_plus,_h_minus;
80 /// @}
81
82
83 };
84
85
86 RIVET_DECLARE_PLUGIN(OPAL_1997_I421977);
87
88
89}
|