rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

STAR_2006_I709170

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_I709170.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/ChargedFinalState.hh"
  4#include "Rivet/Projections/IdentifiedFinalState.hh"
  5
  6namespace Rivet {
  7
  8
  9  /// STAR identified hadron spectra in pp at 200 GeV
 10  class STAR_2006_I709170 : public Analysis {
 11  public:
 12
 13    RIVET_DEFAULT_ANALYSIS_CTOR(STAR_2006_I709170);
 14
 15
 16    /// Book projections and histograms
 17    void init() {
 18      ChargedFinalState bbc1(Cuts::etaIn(-5.0,-3.3)); // beam-beam-counter trigger
 19      ChargedFinalState bbc2(Cuts::etaIn( 3.3, 5.0)); // beam-beam-counter trigger
 20      declare(bbc1, "BBC1");
 21      declare(bbc2, "BBC2");
 22
 23      IdentifiedFinalState pionfs(Cuts::abseta < 2.5 && Cuts::pT > 0.3*GeV);
 24      IdentifiedFinalState protonfs(Cuts::abseta < 2.5 && Cuts::pT > 0.4*GeV);
 25      pionfs.acceptIdPair(PID::PIPLUS);
 26      protonfs.acceptIdPair(PID::PROTON);
 27      declare(pionfs, "PionFS");
 28      declare(protonfs, "ProtonFS");
 29
 30      book(_h_pT_piplus     ,2, 1, 1); // full range pion binning
 31      book(_h_pT_piminus    ,7, 1, 1); // full range pion binning
 32      book(_tmp_pT_piplus   ,"TMP/pT_piplus", refData(25, 1, 2)); // pi histo compatible with more restricted proton binning
 33      book(_tmp_pT_piminus  ,"TMP/pT_piminus", refData(26, 1, 2)); // pi histo compatible with more restricted proton binning
 34      book(_h_pT_proton     ,12, 1, 1);
 35      book(_h_pT_antiproton ,17, 1, 1);
 36
 37      book(_s_piminus_piplus, 23, 1, 2);
 38      book(_s_antipr_pr     , 24, 1, 2);
 39      book(_s_pr_piplus     , 25, 1, 2);
 40      book(_s_antipr_piminus, 26, 1, 2);
 41
 42      book(_sumWeightSelected, "_sumWeightSelected");
 43    }
 44
 45
 46    /// Do the analysis
 47    void analyze(const Event& event) {
 48      const ChargedFinalState& bbc1 = apply<ChargedFinalState>(event, "BBC1");
 49      const ChargedFinalState& bbc2 = apply<ChargedFinalState>(event, "BBC2");
 50      if (bbc1.size() < 1 || bbc2.size() < 1) {
 51        MSG_DEBUG("Failed beam-beam-counter trigger");
 52        vetoEvent;
 53      }
 54
 55      const IdentifiedFinalState& pionfs = apply<IdentifiedFinalState>(event, "PionFS");
 56      for (const Particle& p : pionfs.particles()) {
 57        if (p.absrap() < 0.5) {
 58          /// @todo Use a binned counter to avoid this bin width cancellation hack
 59          const double pT = p.pT() / GeV;
 60          ((p.pid() > 0) ? _h_pT_piplus : _h_pT_piminus)->fill(pT, 1.0/pT);
 61          ((p.pid() > 0) ? _tmp_pT_piplus : _tmp_pT_piminus)->fill(pT, 1.0/pT);
 62        }
 63      }
 64
 65      const IdentifiedFinalState& protonfs = apply<IdentifiedFinalState>(event, "ProtonFS");
 66      for (const Particle& p : protonfs.particles()) {
 67        if (p.absrap() < 0.5) {
 68          /// @todo Use a binned counter to avoid this bin width cancellation hack
 69          const double pT = p.pT() / GeV;
 70          ((p.pid() > 0) ? _h_pT_proton : _h_pT_antiproton)->fill(pT, 1.0/pT);
 71        }
 72      }
 73      _sumWeightSelected->fill();
 74    }
 75
 76
 77    /// Finalize
 78    void finalize() {
 79      divide(_h_pT_piminus, _h_pT_piplus, _s_piminus_piplus);
 80      divide(_h_pT_antiproton, _h_pT_proton, _s_antipr_pr);
 81      divide(_h_pT_proton, _tmp_pT_piplus, _s_pr_piplus);
 82      divide(_h_pT_antiproton, _tmp_pT_piminus, _s_antipr_piminus);
 83      const double factor = ((1/(2*M_PI)) / _sumWeightSelected->val());
 84      scale(_h_pT_piplus,     factor);
 85      scale(_h_pT_piminus,    factor);
 86      scale(_h_pT_proton,     factor);
 87      scale(_h_pT_antiproton, factor);
 88    }
 89
 90
 91  private:
 92
 93    /// @{
 94    CounterPtr _sumWeightSelected;
 95    Histo1DPtr _h_pT_piplus, _h_pT_piminus, _h_pT_proton, _h_pT_antiproton;
 96    Histo1DPtr _tmp_pT_piplus, _tmp_pT_piminus;
 97    Estimate1DPtr _s_piminus_piplus, _s_antipr_pr, _s_pr_piplus, _s_antipr_piminus;
 98    /// @}
 99
100  };
101
102
103
104  RIVET_DECLARE_ALIASED_PLUGIN(STAR_2006_I709170, STAR_2006_S6500200);
105
106}