Rivet analyses referenceALICE_2020_I1797443Production of light-flavor hadrons in pp collisions at 13 TeVExperiment: ALICE (LHC) Inspire ID: 1797443 Status: VALIDATED Authors:
Beam energies: (6500.0, 6500.0) GeV Run details:
The production of light and strange hadrons was measured in inelastic proton-proton (pp) collisions at a center-of-mass energy of 13 TeV at midrapidity (|y|<0.5) as a function of transverse momentum (pT) using the ALICE detector at the CERN LHC. Source code: ALICE_2020_I1797443.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief Production of light-flavor hadrons in pp collisions at 13 TeV
9 class ALICE_2020_I1797443 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(ALICE_2020_I1797443);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21
22 // All final-state and unstable particles within
23 // the given rapidity acceptance
24 const UnstableParticles up(Cuts::absrap < 0.5);
25 declare(up, "up");
26
27 // Book histograms
28 book(_h["pi"], 1, 1, 1);
29 book(_h["k"], 2, 1, 1);
30 book(_h["k0s"], 3, 1, 1);
31 book(_h["k*0"], 4, 1, 1);
32 book(_h["phi"], 5, 1, 1);
33 book(_h["p"], 6, 1, 1);
34 book(_h["l0"], 7, 1, 1);
35 book(_h["xi"], 8, 1, 1);
36 book(_h["omega"], 9, 1, 1);
37 // Book ratios
38 book(_s["k/pi"], 21, 1, 1);
39 book(_s["k*0/pi"], 22, 1, 1);
40 book(_s["k0s/pi"], 23, 1, 1);
41 book(_s["phi/pi"], 24, 1, 1);
42 book(_s["p/pi"], 42, 1, 1);
43 book(_s["l0/k0s"], 43, 1, 1);
44 book(_s["omega/phi"], 44, 1, 1);
45 book(_s["xi/phi"], 45, 1, 1);
46 // Book temporary histograms for ratios
47 book(_h["k_for_k/pi"], "TMP/k_for_k/pi", refData(21, 1, 1));
48 book(_h["pi_for_k/pi"], "TMP/pi_for_k/pi", refData(21, 1, 1));
49 book(_h["k*0_for_k*0/pi"], "TMP/k*0_for_k*0/pi", refData(22, 1, 1));
50 book(_h["pi_for_k*0/pi"], "TMP/pi_for_k*0/pi", refData(22, 1, 1));
51 book(_h["k0s_for_k0s/pi"], "TMP/k0s_for_k0s/pi", refData(23, 1, 1));
52 book(_h["pi_for_k0s/pi"], "TMP/pi_for_k0s/pi", refData(23, 1, 1));
53 book(_h["phi_for_phi/pi"], "TMP/phi_for_phi/pi", refData(24, 1, 1));
54 book(_h["pi_for_phi/pi"], "TMP/pi_for_phi/pi", refData(24, 1, 1));
55 book(_h["p_for_p/pi"], "TMP/p_for_p/pi", refData(42, 1, 1));
56 book(_h["pi_for_p/pi"], "TMP/pi_for_p/pi", refData(42, 1, 1));
57 book(_h["l0_for_l0/k0s"], "TMP/l0_for_l0/k0s", refData(43, 1, 1));
58 book(_h["k0s_for_l0/k0s"], "TMP/k0s_for_l0/k0s", refData(43, 1, 1));
59 book(_h["omega_for_omega/phi"], "TMP/omega_for_omega/phi", refData(44, 1, 1));
60 book(_h["phi_for_omega/phi"], "TMP/phi_for_omega/phi", refData(44, 1, 1));
61 book(_h["xi_for_xi/phi"], "TMP/xi_for_xi/phi", refData(45, 1, 1));
62 book(_h["phi_for_xi/phi"], "TMP/phi_for_xi/phi", refData(45, 1, 1));
63
64 }
65
66
67 /// Perform the per-event analysis
68 void analyze(const Event& event) {
69
70 const Particles& up = apply<UnstableParticles>(event, "up").particles();
71
72 for (const Particle& p : up) {
73 if (p.abspid() == 211) {
74 _h["pi"]->fill(p.pT() / GeV);
75 _h["pi_for_k/pi"]->fill(p.pT() / GeV);
76 _h["pi_for_k*0/pi"]->fill(p.pT() / GeV);
77 _h["pi_for_k0s/pi"]->fill(p.pT() / GeV);
78 _h["pi_for_phi/pi"]->fill(p.pT() / GeV);
79 _h["pi_for_p/pi"]->fill(p.pT() / GeV);
80 }
81 else if (p.abspid() == 321) {
82 _h["k"]->fill(p.pT() / GeV);
83 _h["k_for_k/pi"]->fill(p.pT() / GeV);
84 }
85 else if (p.abspid() == 310) {
86 _h["k0s"]->fill(p.pT() / GeV);
87 _h["k0s_for_k0s/pi"]->fill(p.pT() / GeV);
88 _h["k0s_for_l0/k0s"]->fill(p.pT() / GeV);
89 }
90 else if (p.abspid() == 2212) {
91 _h["p"]->fill(p.pT() / GeV);
92 _h["p_for_p/pi"]->fill(p.pT() / GeV);
93 }
94 else if (p.abspid() == 313) {
95 _h["k*0"]->fill(p.pT() / GeV);
96 _h["k*0_for_k*0/pi"]->fill(p.pT() / GeV);
97 }
98 else if (p.abspid() == 333) {
99 _h["phi"]->fill(p.pT() / GeV);
100 _h["phi_for_phi/pi"]->fill(p.pT() / GeV);
101 _h["phi_for_omega/phi"]->fill(p.pT() / GeV);
102 _h["phi_for_xi/phi"]->fill(p.pT() / GeV);
103 }
104 else if (p.abspid() == 3122) {
105 _h["l0"]->fill(p.pT() / GeV);
106 _h["l0_for_l0/k0s"]->fill(p.pT() / GeV);
107 }
108 else if (p.abspid() == 3312) {
109 _h["xi"]->fill(p.pT() / GeV);
110 _h["xi_for_xi/phi"]->fill(p.pT() / GeV);
111 }
112 else if (p.abspid() == 3334) {
113 _h["omega"]->fill(p.pT() / GeV);
114 _h["omega_for_omega/phi"]->fill(p.pT() / GeV);
115 }
116 }
117 }
118
119
120 /// Normalise histograms etc., after the run
121 void finalize() {
122
123 scale(_h, 1./sumOfWeights());
124 scale({_h["k0s_for_k0s/pi"], _h["phi_for_phi/pi"], _h["k0s_for_l0/k0s"]}, 2.);
125
126 divide(_h["k_for_k/pi"], _h["pi_for_k/pi"], _s["k/pi"]);
127 divide(_h["k*0_for_k*0/pi"], _h["pi_for_k*0/pi"], _s["k*0/pi"]);
128 divide(_h["k0s_for_k0s/pi"], _h["pi_for_k0s/pi"], _s["k0s/pi"]);
129 divide(_h["phi_for_phi/pi"], _h["pi_for_phi/pi"], _s["phi/pi"]);
130 divide(_h["p_for_p/pi"], _h["pi_for_p/pi"], _s["p/pi"]);
131 divide(_h["l0_for_l0/k0s"], _h["k0s_for_l0/k0s"], _s["l0/k0s"]);
132 divide(_h["omega_for_omega/phi"], _h["phi_for_omega/phi"], _s["omega/phi"]);
133 divide(_h["xi_for_xi/phi"], _h["phi_for_xi/phi"], _s["xi/phi"]);
134
135 }
136
137 ///@}
138
139
140 /// @name Histograms
141 ///@{
142 map<string, Histo1DPtr> _h;
143 map<string, Estimate1DPtr> _s;
144 ///@}
145
146
147 };
148
149
150 RIVET_DECLARE_PLUGIN(ALICE_2020_I1797443);
151
152}
|