rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

STAR_2006_S6500200

Identified hadron spectra in pp at 200 GeV
Experiment: STAR (RHIC pp 200 GeV)
Inspire ID: 709170
Status: VALIDATED
Authors:
  • Bedanga Mohanty
  • Hendrik Hoeth
References: Beams: p+ p+
Beam energies: (100.0, 100.0) GeV
Run details:
  • pp at 200 GeV

pT distributions of charged pions and (anti)protons in pp collisions at $\sqrt{s} = 200$ GeV, measured by the STAR experiment at RHIC in non-single-diffractive minbias events.

Source code: STAR_2006_S6500200.cc
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/IdentifiedFinalState.hh"

namespace Rivet {


  /// @brief STAR identified hadron spectra in pp at 200 GeV
  class STAR_2006_S6500200 : public Analysis {
  public:

    /// Constructor
    STAR_2006_S6500200()
      : Analysis("STAR_2006_S6500200"),
        _sumWeightSelected(0.0)
    {  }


    /// Book projections and histograms
    void init() {
      ChargedFinalState bbc1(-5.0,-3.3, 0.0*GeV); // beam-beam-counter trigger
      ChargedFinalState bbc2( 3.3, 5.0, 0.0*GeV); // beam-beam-counter trigger
      declare(bbc1, "BBC1");
      declare(bbc2, "BBC2");

      IdentifiedFinalState pionfs(Cuts::abseta < 2.5 && Cuts::pT > 0.3*GeV);
      IdentifiedFinalState protonfs(Cuts::abseta < 2.5 && Cuts::pT > 0.4*GeV);
      pionfs.acceptIdPair(PID::PIPLUS);
      protonfs.acceptIdPair(PID::PROTON);
      declare(pionfs, "PionFS");
      declare(protonfs, "ProtonFS");

      _h_pT_piplus     = bookHisto1D(1, 1, 1); // full range pion binning
      _h_pT_piminus    = bookHisto1D(1, 2, 1); // full range pion binning
      _tmp_pT_piplus   = bookHisto1D("TMP/pT_piplus", refData(2, 3, 1)); // pi histo compatible with more restricted proton binning
      _tmp_pT_piminus  = bookHisto1D("TMP/pT_piminus", refData(2, 4, 1)); // pi histo compatible with more restricted proton binning
      _h_pT_proton     = bookHisto1D(1, 3, 1);
      _h_pT_antiproton = bookHisto1D(1, 4, 1);

      _s_piminus_piplus = bookScatter2D(2, 1, 1);
      _s_antipr_pr      = bookScatter2D(2, 2, 1);
      _s_pr_piplus      = bookScatter2D(2, 3, 1);
      _s_antipr_piminus = bookScatter2D(2, 4, 1);
    }


    /// Do the analysis
    void analyze(const Event& event) {
      const ChargedFinalState& bbc1 = apply<ChargedFinalState>(event, "BBC1");
      const ChargedFinalState& bbc2 = apply<ChargedFinalState>(event, "BBC2");
      if (bbc1.size() < 1 || bbc2.size() < 1) {
        MSG_DEBUG("Failed beam-beam-counter trigger");
        vetoEvent;
      }

      const double weight = event.weight();

      const IdentifiedFinalState& pionfs = apply<IdentifiedFinalState>(event, "PionFS");
      foreach (const Particle& p, pionfs.particles()) {
        if (p.absrap() < 0.5) {
          /// @todo Use a binned counter to avoid this bin width cancellation hack
          const double pT = p.pT() / GeV;
          ((p.pid() > 0) ? _h_pT_piplus : _h_pT_piminus)->fill(pT, weight/pT);
          ((p.pid() > 0) ? _tmp_pT_piplus : _tmp_pT_piminus)->fill(pT, weight/pT);
        }
      }

      const IdentifiedFinalState& protonfs = apply<IdentifiedFinalState>(event, "ProtonFS");
      foreach (const Particle& p, protonfs.particles()) {
        if (p.absrap() < 0.5) {
          /// @todo Use a binned counter to avoid this bin width cancellation hack
          const double pT = p.pT() / GeV;
          ((p.pid() > 0) ? _h_pT_proton : _h_pT_antiproton)->fill(pT, weight/pT);
        }
      }
      _sumWeightSelected += event.weight();
    }


    /// Finalize
    void finalize() {
      divide(_h_pT_piminus, _h_pT_piplus, _s_piminus_piplus);
      divide(_h_pT_antiproton, _h_pT_proton, _s_antipr_pr);
      divide(_h_pT_proton, _tmp_pT_piplus, _s_pr_piplus);
      divide(_h_pT_antiproton, _tmp_pT_piminus, _s_antipr_piminus);
      scale(_h_pT_piplus,     1/(2*M_PI*_sumWeightSelected));
      scale(_h_pT_piminus,    1/(2*M_PI*_sumWeightSelected));
      scale(_h_pT_proton,     1/(2*M_PI*_sumWeightSelected));
      scale(_h_pT_antiproton, 1/(2*M_PI*_sumWeightSelected));
    }


  private:

    double _sumWeightSelected;
    Histo1DPtr _h_pT_piplus, _h_pT_piminus, _h_pT_proton, _h_pT_antiproton;
    Histo1DPtr _tmp_pT_piplus, _tmp_pT_piminus;
    Scatter2DPtr _s_piminus_piplus, _s_antipr_pr, _s_pr_piplus, _s_antipr_piminus;

  };



  // The hook for the plugin system
  DECLARE_RIVET_PLUGIN(STAR_2006_S6500200);

}