diff --git a/analyses/pluginRHIC/STAR_2006_S6500200.cc b/analyses/pluginRHIC/STAR_2006_S6500200.cc --- a/analyses/pluginRHIC/STAR_2006_S6500200.cc +++ b/analyses/pluginRHIC/STAR_2006_S6500200.cc @@ -1,108 +1,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(2, 1, 1); // full range pion binning _h_pT_piminus = bookHisto1D(7, 1, 1); // full range pion binning - _tmp_pT_piplus = bookHisto1D("TMP/pT_piplus", refData(25, 1, 1)); // pi histo compatible with more restricted proton binning - _tmp_pT_piminus = bookHisto1D("TMP/pT_piminus", refData(26, 1, 1)); // pi histo compatible with more restricted proton binning + _tmp_pT_piplus = bookHisto1D("TMP/pT_piplus", refData(25, 1, 2)); // pi histo compatible with more restricted proton binning + _tmp_pT_piminus = bookHisto1D("TMP/pT_piminus", refData(26, 1, 2)); // pi histo compatible with more restricted proton binning _h_pT_proton = bookHisto1D(12, 1, 1); _h_pT_antiproton = bookHisto1D(17, 1, 1); - _s_piminus_piplus = bookScatter2D(23, 1, 1); - _s_antipr_pr = bookScatter2D(24, 1, 1); - _s_pr_piplus = bookScatter2D(25, 1, 1); - _s_antipr_piminus = bookScatter2D(26, 1, 1); + _s_piminus_piplus = bookScatter2D(23, 1, 2); + _s_antipr_pr = bookScatter2D(24, 1, 2); + _s_pr_piplus = bookScatter2D(25, 1, 2); + _s_antipr_piminus = bookScatter2D(26, 1, 2); } /// Do the analysis void analyze(const Event& event) { const ChargedFinalState& bbc1 = apply(event, "BBC1"); const ChargedFinalState& bbc2 = apply(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(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(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); } diff --git a/analyses/pluginRHIC/STAR_2006_S6500200.plot b/analyses/pluginRHIC/STAR_2006_S6500200.plot --- a/analyses/pluginRHIC/STAR_2006_S6500200.plot +++ b/analyses/pluginRHIC/STAR_2006_S6500200.plot @@ -1,63 +1,63 @@ # BEGIN PLOT /STAR_2006_S6500200/d02-x01-y01 Title=$\pi^+$ transverse momentum XLabel=$p_\perp$ [GeV] YLabel=$1/(2\pi) \, d^2N/(p_\perp dy dp_\perp)$ [GeV$^{-2}$] FullRange=1 # END PLOT # BEGIN PLOT /STAR_2006_S6500200/d07-x01-y01 Title=$\pi^-$ transverse momentum XLabel=$p_\perp$ [GeV] YLabel=$1/(2\pi) \, d^2N/(p_\perp dy dp_\perp)$ [GeV$^{-2}$] FullRange=1 # END PLOT # BEGIN PLOT /STAR_2006_S6500200/d12-x01-y01 Title=Proton transverse momentum XLabel=$p_\perp$ [GeV] YLabel=$1/(2\pi) \, d^2N/(p_\perp dy dp_\perp)$ [GeV$^{-2}$] FullRange=1 # END PLOT -# BEGIN PLOT /STAR_2006_S6500200/d07-x01-y01 +# BEGIN PLOT /STAR_2006_S6500200/d17-x01-y01 Title=Anti-proton transverse momentum XLabel=$p_\perp$ [GeV] YLabel=$1/(2\pi) \, d^2N/(p_\perp dy dp_\perp)$ [GeV$^{-2}$] FullRange=1 # END PLOT -# BEGIN PLOT /STAR_2006_S6500200/d23-x01-y01 +# BEGIN PLOT /STAR_2006_S6500200/d23-x01-y02 Title=Ratio of $\pi^- / \pi^+$ as function of $p_\perp$ XLabel=$p_\perp$ [GeV] YLabel=$\pi^- / \pi^+$ LogY=0 YMin=0 YMax=2 # END PLOT -# BEGIN PLOT /STAR_2006_S6500200/d24-x02-y01 +# BEGIN PLOT /STAR_2006_S6500200/d24-x01-y02 Title=Ratio of $\bar p / p$ as function of $p_\perp$ XLabel=$p_\perp$ [GeV] YLabel=$\bar p / p$ LogY=0 YMin=0 YMax=2 # END PLOT -# BEGIN PLOT /STAR_2006_S6500200/d25-x03-y01 +# BEGIN PLOT /STAR_2006_S6500200/d25-x02-y02 Title=Ratio of $p / \pi^+$ as function of $p_\perp$ XLabel=$p_\perp$ [GeV] YLabel=$p / \pi^+$ LogY=0 YMin=0 YMax=0.8 # END PLOT -# BEGIN PLOT /STAR_2006_S6500200/d26-x04-y01 +# BEGIN PLOT /STAR_2006_S6500200/d26-x01-y02 Title=Ratio of $\bar p / \pi^-$ as function of $p_\perp$ XLabel=$p_\perp$ [GeV] YLabel=$\bar p / \pi^-$ LogY=0 YMin=0 YMax=0.8 # END PLOT