rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

ALEPH_1995_I382179

Inclusive pi+-, K+- and (p, anti-p) differential cross-sections at the Z resonance
Experiment: ALEPH (LEP)
Inspire ID: 382179
Status: VALIDATED
Authors:
  • Simone Amoroso
References: Beams: e+ e-
Beam energies: (45.6, 45.6) GeV
Run details:
  • e+e- production at the Z-peak with hadronic decays

Inclusive spectra of pions, Kaons, protons and antiprotons in hadronic decays of the Z0 measured as a function of z.

Source code: ALEPH_1995_I382179.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/FinalState.hh"
 4#include "Rivet/Projections/ChargedFinalState.hh"
 5#include "Rivet/Projections/Beam.hh"
 6
 7namespace Rivet {
 8
 9
10  /// @brief ALEPH pi+-, K+-, p and pbar differential cross-sections at the Z peak
11  class ALEPH_1995_I382179 : public Analysis {
12  public:
13
14    /// Constructor
15    RIVET_DEFAULT_ANALYSIS_CTOR(ALEPH_1995_I382179);
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(ChargedFinalState(), "FS");
27
28      // Book histograms
29      book(_histXpPion , 1, 1, 1);
30      book(_histXpKaon , 2, 1, 1);
31      book(_histXpProton , 3, 1, 1);
32
33    }
34
35
36    /// Perform the per-event analysis
37    void analyze(const Event& event) {
38
39      // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
40      const FinalState& fs = apply<FinalState>(event, "FS");
41      if (fs.particles().size() < 2) {
42	MSG_DEBUG("Failed ncharged cut");
43	vetoEvent;
44      }
45      MSG_DEBUG("Passed ncharged 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() + beams.second.p3().mod() ) / 2.0;
50      MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
51
52      for (const Particle& p : fs.particles()) {
53	int id = p.abspid();
54	// charged pions
55	if (id == PID::PIPLUS || id == PID::PIMINUS) {
56	  _histXpPion->fill(p.p3().mod()/meanBeamMom);
57	} else if(id == PID::KPLUS || id == PID::KMINUS) {
58	  _histXpKaon->fill(p.p3().mod()/meanBeamMom);
59	} else if(id == PID::PROTON || id == PID::ANTIPROTON) {
60	  _histXpProton->fill(p.p3().mod()/meanBeamMom);
61	}
62      }
63
64
65    }
66
67
68    /// Normalise histograms etc., after the run
69    void finalize() {
70      scale(_histXpPion, 1./sumOfWeights());
71      scale(_histXpKaon, 1./sumOfWeights());
72      scale(_histXpProton, 1./sumOfWeights());
73    }
74
75    //@}
76
77
78  private:
79
80
81    /// @name Histograms
82    Histo1DPtr _histXpPion;
83    Histo1DPtr _histXpKaon;
84    Histo1DPtr _histXpProton;
85
86
87  };
88
89
90
91  // The hook for the plugin system
92  RIVET_DECLARE_PLUGIN(ALEPH_1995_I382179);
93
94
95}