rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

NA49_2006_I694016

Inclusive production of charged pions in p+p collisions at 158 GeV/c beam momentum
Experiment: NA49 (SPS)
Inspire ID: 694016
Status: UNVALIDATED
Authors:
  • Viktar Kireyeu
References:
  • https://link.springer.com/article/10.1140/epjc/s2005-02391-9
Beams: p+ p+
Beam energies: (8.7, 8.7) GeV
Run details:
  • $pp$ collisions at 17.3 GeV. Minimum bias events.

Charged pion production in fixed target, $p_{\mathrm{lab}} = $158 GeV/c. The elastic trigger is implemented by looking for elastic final states with only 2 particles, instead of attempting to reproduce the experimental trigger, which cannot be directly unfolded.

Source code: NA49_2006_I694016.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/FinalState.hh"
 4#include "Rivet/Particle.hh"
 5
 6namespace Rivet {
 7
 8
 9  class NA49_2006_I694016 : public Analysis {
10  public:
11
12    /// @name Constructors etc.
13    /// @{
14    /// Constructor
15    NA49_2006_I694016() : Analysis("NA49_2006_I694016"){}
16
17
18
19    void init() {
20      declare(FinalState(), "FS");
21      book(_h_dndxf, 1,1,1);
22      book(_p_mptxf, 2,1,1);
23      book(_h_dndy,  3,1,1);
24      book(_c_ninel, "nInelastic");
25    }
26
27
28
29    void analyze(const Event& event) {
30      const FinalState& fs = apply<FinalState>(event, "FS");
31      const size_t numParticles = fs.particles().size();
32      const float SRT = event.sqrtS();
33
34      // Inelastic events selection
35      if (numParticles <= 2) {
36        MSG_DEBUG("Elastic event");
37        vetoEvent;
38      }
39      _c_ninel -> fill();
40
41      // Plot distributions
42      for(const Particle& p : fs.particles()) {
43        if(p.pid() == PID::PIPLUS){
44          double xF = p.pz() / (SRT/2.);
45          _h_dndxf -> fill(xF);
46          _h_dndy  -> fill(p.rapidity());
47          _p_mptxf -> fill(xF, p.pt());
48        }
49      }
50    }
51
52
53
54    void finalize() {
55      // Scale by the number of inelastic events
56      scale(_h_dndxf, 1./ *_c_ninel);
57      scale(_h_dndy, 1./ *_c_ninel);
58    }
59
60
61
62  private:
63    CounterPtr   _c_ninel;  // Counter of inelastic events
64    Histo1DPtr   _h_dndxf;  // dn/dxf histogram
65    Histo1DPtr   _h_dndy;   // dn/dy histogram
66    Profile1DPtr _p_mptxf;  // mean pT vs xF profile
67  };
68
69
70  RIVET_DECLARE_PLUGIN(NA49_2006_I694016);
71}