Rivet analyses referenceSTAR_2017_I1510593Bulk properties of identified hadrons in the Au Au medium from the RHIC beam-energy scanExperiment: STAR (RHIC) Inspire ID: 1510593 Status: UNVALIDATED Authors:
Beam energies: (758.5, 758.5); (1132.8, 1132.8); (1930.6, 1930.6); (2659.5, 2659.5); (3841.5, 3841.5) GeV Run details:
Results of measurements of bulk properties of the matter in Au+Au collisions at energies of the Beam Energy Scan program, using pions, kaons and protons identified : $\frac{dN}{dy}$ spectra, $\langle p_\perp \rangle$ spectra and particles ratios are shown. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: STAR_2017_I1510593.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/ChargedFinalState.hh"
4#include "Rivet/Projections/FinalState.hh"
5#include "Rivet/Projections/ImpactParameterProjection.hh"
6#include "Rivet/Projections/SingleValueProjection.hh"
7#include "Rivet/Tools/Percentile.hh"
8#include "Rivet/Analyses/RHICCommon.hh"
9#include "Rivet/Projections/HepMCHeavyIon.hh"
10
11namespace Rivet {
12
13
14 /// pT distributions, ratios and production yields of hadrons in STAR
15 class STAR_2017_I1510593 : public Analysis {
16 public:
17
18 RIVET_DEFAULT_ANALYSIS_CTOR(STAR_2017_I1510593);
19
20 string coStr(int i, int j, int k) {
21 return "/TMP/d" + toString(i) + "x" + toString(j) + "y" + toString(k);
22 }
23
24
25 /// Book histograms and initialise projections before the run
26 void init() {
27 // Initialise and register projections
28 declareCentrality(STAR_BES_Centrality(), "STAR_BES_CALIB", "CMULT", "CMULT");
29
30 // The observed particles.
31 declare(ChargedFinalState(Cuts::abseta < 0.5 &&
32 Cuts::absrap < 0.1 && Cuts::pT > 0.2), "CFS");
33
34 // Access the HepMC heavy ion info
35 declare(HepMCHeavyIon(), "HepMC");
36
37
38 // Energy bins
39 for (size_t i = 0, N = energies.size(); i < N; ++i) {
40 if (isCompatibleWithSqrtS(197*energies[i]*GeV)) enebin = i;
41 }
42
43 // Energy bins for Fig. 25
44 enebinfig = -1;
45 if (isCompatibleWithSqrtS(197.*energies[0])) enebinfig = 0;
46 if (isCompatibleWithSqrtS(197.*energies[4])) enebinfig = 1;
47
48 // Book all histograms for all energies in order to use re-entrant finalize
49 /// @todo Raw arrays would be a *lot* easier to read here (and N_cent is fixed)
50 _h_dpT_Piplus = vector<vector<Histo1DPtr> >(energies.size(), vector<Histo1DPtr>(centralities.size()));
51 _h_dpT_Pi = vector<vector<Histo1DPtr> >(energies.size(), vector<Histo1DPtr>(centralities.size()));
52 _h_dpT_Kaonplus = vector<vector<Histo1DPtr> >(energies.size(), vector<Histo1DPtr>(centralities.size()));
53 _h_dpT_Kaon = vector<vector<Histo1DPtr> >(energies.size(), vector<Histo1DPtr>(centralities.size()));
54 _h_dpT_Proton = vector<vector<Histo1DPtr> >(energies.size(), vector<Histo1DPtr>(centralities.size()));
55 _h_dpT_AntiProton = vector<vector<Histo1DPtr> >(energies.size(), vector<Histo1DPtr>(centralities.size()));
56 _wght_PiPlus = vector<vector<CounterPtr> >(energies.size(), vector<CounterPtr>(centralities.size()));
57 _wght_Pi = vector<vector<CounterPtr> >(energies.size(), vector<CounterPtr>(centralities.size()));
58 _wght_KaonPlus = vector<vector<CounterPtr> >(energies.size(), vector<CounterPtr>(centralities.size()));
59 _wght_Kaon = vector<vector<CounterPtr> >(energies.size(), vector<CounterPtr>(centralities.size()));
60 _wght_Proton = vector<vector<CounterPtr> >(energies.size(), vector<CounterPtr>(centralities.size()));
61 _wght_AntiProton = vector<vector<CounterPtr> >(energies.size(), vector<CounterPtr>(centralities.size()));
62 _h_npart_PiPlus = vector<Histo1DPtr>(energies.size());
63 _h_npart_PiMinus = vector<Histo1DPtr>(energies.size());
64 _h_npart_KaPlus = vector<Histo1DPtr>(energies.size());
65 _h_npart_KaMinus = vector<Histo1DPtr>(energies.size());
66 _h_npart_Proton = vector<Histo1DPtr>(energies.size());
67 _h_npart_AntiProton = vector<Histo1DPtr>(energies.size());
68 _wght_npart_PiPlus = vector<CounterPtr>(energies.size());
69 _wght_npart_PiMinus = vector<CounterPtr>(energies.size());
70 _wght_npart_KaonPlus = vector<CounterPtr>(energies.size());
71 _wght_npart_KaonMinus = vector<CounterPtr>(energies.size());
72 _wght_npart_Proton = vector<CounterPtr>(energies.size());
73 _wght_npart_AntiProton = vector<CounterPtr>(energies.size());
74 _h_npart_pT_PiPlus = vector<Profile1DPtr>(energies.size());
75 _h_npart_pT_PiMinus = vector<Profile1DPtr>(energies.size());
76 _h_npart_pT_KaPlus = vector<Profile1DPtr>(energies.size());
77 _h_npart_pT_KaMinus = vector<Profile1DPtr>(energies.size());
78 _h_npart_pT_Proton = vector<Profile1DPtr>(energies.size());
79 _h_npart_pT_AntiProton = vector<Profile1DPtr>(energies.size());
80
81 _h_npart_Piratio = vector<Profile1DPtr>(energies.size());
82 _h_npart_Karatio = vector<Profile1DPtr>(energies.size());
83 _h_npart_Pratio = vector<Profile1DPtr>(energies.size());
84 _h_npart_KaPi = vector<Profile1DPtr>(energies.size());
85 _h_npart_AntiPPi = vector<Profile1DPtr>(energies.size());
86 _h_npart_KaPiplus = vector<Profile1DPtr>(energies.size());
87 _h_npart_PPiplus = vector<Profile1DPtr>(energies.size());
88
89 for (int j = 0, N = energies.size(); j < N; ++j) {
90 for (int i = 0, M = centralities.size(); i < M; ++i) {
91 /// Book [energy][centrality] histograms.
92 book(_h_dpT_Pi[j][i], 2+j*6, 1, i+1);
93 book(_h_dpT_Piplus[j][i], 3+j*6, 1, i+1);
94 book(_h_dpT_Kaon[j][i], 4+j*6, 1, i+1);
95 book(_h_dpT_Kaonplus[j][i], 5+j*6, 1, i+1);
96 book(_h_dpT_AntiProton[j][i], 6+j*6, 1, i+1);
97 book(_h_dpT_Proton[j][i], 7+j*6, 1, i+1);
98 /// ...and the weights
99 book(_wght_Pi[j][i], coStr(2+j*6, 1, i+1));
100 book(_wght_PiPlus[j][i], coStr(3+j*6, 1, i+1));
101 book(_wght_Kaon[j][i], coStr(4+j*6, 1, i+1));
102 book(_wght_KaonPlus[j][i], coStr(5+j*6, 1, i+1));
103 book(_wght_AntiProton[j][i], coStr(6+j*6, 1, i+1));
104 book(_wght_Proton[j][i], coStr(7+j*6, 1, i+1));
105 }
106 }
107
108 /// Booking npart histograms
109 for (int i = 0, N = energies.size(); i < N; ++i) {
110 book(_h_npart_PiMinus[i], 32+i, 1, 1);
111 book(_h_npart_PiPlus[i], 32+i, 1, 2);
112 book(_h_npart_KaMinus[i], 32+i, 1, 3);
113 book(_h_npart_KaPlus[i], 32+i, 1, 4);
114 book(_h_npart_AntiProton[i], 32+i, 1, 5);
115 book(_h_npart_Proton[i], 32+i, 1, 6);
116 /// ...and the weights.
117 book(_wght_npart_PiMinus[i],coStr(32+i, 1, 1));
118 book(_wght_npart_PiPlus[i],coStr(32+i, 1, 2));
119 book(_wght_npart_KaonMinus[i],coStr(32+i, 1, 3));
120 book(_wght_npart_KaonPlus[i],coStr(32+i, 1, 4));
121 book(_wght_npart_AntiProton[i],coStr(32+i, 1, 5));
122 book(_wght_npart_Proton[i],coStr(32+i, 1, 6));
123 /// ... and the profiles.
124 book(_h_npart_pT_PiMinus[i], 37+i, 1, 1);
125 book(_h_npart_pT_PiPlus[i], 37+i, 1, 2);
126 book(_h_npart_pT_KaMinus[i], 37+i, 1, 3);
127 book(_h_npart_pT_KaPlus[i], 37+i, 1, 4);
128 book(_h_npart_pT_AntiProton[i], 37+i, 1, 5);
129 book(_h_npart_pT_Proton[i], 37+i, 1, 6);
130
131 book(_h_npart_Piratio[i], 42+i, 1, 1);
132 book(_h_npart_Karatio[i], 42+i, 1, 2);
133 book(_h_npart_Pratio[i], 42+i, 1, 3);
134 book(_h_npart_KaPi[i], 47+i, 1, 1);
135 book(_h_npart_AntiPPi[i], 47+i, 1, 2);
136 book(_h_npart_KaPiplus[i], 47+i, 1, 3);
137 book(_h_npart_PPiplus[i], 47+i, 1, 4);
138
139 }
140
141 book(_h_snn_npart_PiMinus, 52, 1, 1);
142 book(_h_snn_npart_PiPlus, 52, 1, 2);
143 book(_h_snn_npart_KaMinus, 52, 1, 3);
144 book(_h_snn_npart_KaPlus, 52, 1, 4);
145 book(_h_snn_npart_AntiProton, 52, 1, 5);
146 book(_h_snn_npart_Proton, 52, 1, 6);
147
148 book(_h_snn_mt_PiPlus, 53, 1, 1);
149 book(_h_snn_mt_PiMinus, 53, 1, 2);
150 book(_h_snn_mt_KaPlus, 53, 1, 3);
151 book(_h_snn_mt_KaMinus, 53, 1, 4);
152 book(_h_snn_mt_Proton, 53, 1, 5);
153 book(_h_snn_mt_AntiProton, 53, 1, 6);
154
155 book(_h_snn_Piratio, 54, 1, 1);
156 book(_h_snn_Karatio, 54, 1, 2);
157 book(_h_snn_Pratio, 54, 1, 3);
158 book(_h_snn_KaPiplus, 55, 1, 1);
159 book(_h_snn_KaPiminus, 55, 1, 2);
160
161 _h_yields = vector<Profile1DPtr>(2);
162 _h_ratios = vector<Profile1DPtr>(2);
163 for (int i = 0; i < 2; ++i) {
164 book(_h_yields[i], 56, 1, 1+i);
165 book(_h_ratios[i], 57, 1, 1+i);
166 }
167 }
168
169 /// Perform the per-event analysis
170 void analyze(const Event& event) {
171 const ChargedFinalState& cfs = apply<ChargedFinalState>(event, "CFS");
172 // Require at least two charged particles for the analysis to
173 // make sense. No further triggers are described in the paper.
174 const Particles& particles = cfs.particles();
175 nprtcl = particles.size();
176 if (nprtcl < 2) return;
177
178 /// Determine the centrality
179 const CentralityProjection& cent = apply<CentralityProjection>(event, "CMULT");
180 const double c = cent();
181
182 /// Determine the impact parameter
183 const HepMCHeavyIon & hi = apply<HepMCHeavyIon>(event, "HepMC");
184 const double Npart = hi.Npart_targ();
185
186 /// Determine the centrality bin
187 cenbin = (c < 5) ? 0 : c / 10 + 1;
188
189 /// Initializing for each event
190 for (size_t i = 0; i < 10; ++i) nparts[i] = 0;
191 for (size_t i = 0, N = energies.size(); i < N; ++i) {
192 nPi[i] = 0;
193 nPiPlus[i] = 0;
194 nKaon[i] = 0;
195 nKaonPlus[i] = 0;
196 nProton[i] = 0;
197 nAntiProton[i] = 0;
198 }
199
200 /// Loop over all charged particles of the CFS
201 for (const Particle& p : cfs.particles()) {
202 double pT = p.pT()/GeV;
203 double mass = p.mass()/GeV;
204 double mTm = sqrt(pT * pT + mass * mass) - mass;
205 if (p.absrap() < 0.1) {
206 const PdgId id = p.pid();
207 switch (id) {
208 case 211:
209 if (c < 80) {
210 _h_dpT_Piplus[enebin][cenbin]->fill(pT, 1. / pT);
211 _h_npart_PiPlus[enebin]->fill(Npart, 1. / (0.2 * 0.5 * Npart));
212 _h_npart_pT_PiPlus[enebin]->fill(Npart, pT, 5);
213 }
214 if (c < 5) {
215 ++nparts[0];
216 _h_snn_npart_PiPlus->fill(energies[enebin], 1.0 / (0.2 * 0.5 * Npart));
217 _h_snn_mt_PiPlus->fill(_h_snn_mt_PiPlus->bin(enebin).xMid(), mTm);
218 }
219 ++nPiPlus[enebin];
220 break;
221 case -211:
222 if (c < 80) {
223 _h_dpT_Pi[enebin][cenbin]->fill(pT, 1.0 / pT);
224 _h_npart_PiMinus[enebin]->fill(Npart, 1.0 / (0.2 * 0.5 * Npart));
225 _h_npart_pT_PiMinus[enebin]->fill(Npart, pT, 5);
226 }
227 if (c < 5) {
228 ++nparts[1];
229 _h_snn_npart_PiMinus->fill(_h_snn_npart_PiMinus->bin(enebin).xMid(), 1.0 / (0.2 * 0.5 * Npart));
230 _h_snn_mt_PiMinus->fill(_h_snn_mt_PiMinus->bin(enebin).xMid(), mTm);
231 }
232 ++nPi[enebin];
233 break;
234 case 321:
235 if (c < 80) {
236 _h_dpT_Kaonplus[enebin][cenbin]->fill(pT, 1.0 / pT);
237 _h_npart_KaPlus[enebin]->fill(Npart, 1.0 /(0.2 * 0.5 * Npart));
238 _h_npart_pT_KaPlus[enebin]->fill(Npart, pT, 5);
239 }
240 if (c < 5) {
241 ++nparts[2];
242 _h_snn_npart_KaPlus->fill(_h_snn_npart_KaPlus->bin(enebin).xMid(), 1.0 / (0.2 * 0.5 * Npart));
243 _h_snn_mt_KaPlus->fill(_h_snn_mt_KaPlus->bin(enebin).xMid(), mTm);
244 }
245 ++nKaonPlus[enebin];
246 break;
247 case -321:
248 if (c < 80) {
249 _h_dpT_Kaon[enebin][cenbin]->fill(pT, 1.0 / pT);
250 _h_npart_KaMinus[enebin]->fill(Npart, 1.0 / (0.2 * 0.5 * Npart));
251 _h_npart_pT_KaMinus[enebin]->fill(Npart, pT, 5);
252 }
253 if (c < 5) {
254 ++nparts[3];
255 _h_snn_npart_KaMinus->fill(_h_snn_npart_KaMinus->bin(enebin).xMid(), 1.0 / (0.2 * 0.5 * Npart));
256 _h_snn_mt_KaMinus->fill(_h_snn_mt_KaMinus->bin(enebin).xMid(), mTm);
257 }
258 ++nKaon[enebin];
259 break;
260 case 2212:
261 if (c < 80) {
262 _h_dpT_Proton[enebin][cenbin]->fill(pT, 1.0 / pT);
263 _h_npart_Proton[enebin]->fill(Npart, 1.0 /(0.2 * 0.5 * Npart));
264 _h_npart_pT_Proton[enebin]->fill(Npart, pT, 5);
265 }
266 if (c < 5) {
267 ++nparts[4];
268 _h_snn_npart_Proton->fill(_h_snn_npart_Proton->bin(enebin).xMid(), 1.0 / (0.2 * 0.5 * Npart));
269 _h_snn_mt_Proton->fill(_h_snn_mt_Proton->bin(enebin).xMid(), mTm);
270 }
271 ++nProton[enebin];
272 break;
273 case -2212:
274 if (c < 80) {
275 _h_dpT_AntiProton[enebin][cenbin]->fill(pT, 1.0 / pT);
276 _h_npart_AntiProton[enebin]->fill(Npart, 1.0 / (0.2 * 0.5 * Npart));
277 _h_npart_pT_AntiProton[enebin]->fill(Npart, pT, 5);
278 }
279 if (c < 5) {
280 ++nparts[5];
281 _h_snn_npart_AntiProton->fill(_h_snn_npart_AntiProton->bin(enebin).xMid(), 1.0 / (0.2 * 0.5 * Npart));
282 _h_snn_mt_AntiProton->fill(_h_snn_mt_AntiProton->bin(enebin).xMid(), mTm);
283 }
284 ++nAntiProton[enebin];
285 break;
286 case 3122:
287 if (c < 5) ++nparts[6];
288 break;
289 case -3122:
290 if (c < 5) ++nparts[7];
291 break;
292 case 3312:
293 if (c < 5) ++nparts[8];
294 break;
295 case -3312:
296 if (c < 5) ++nparts[9];
297 break;
298 }
299 }
300 }
301
302 /// Particle Ratios
303 //"if( > 1e-6)" because "> 0" or "!= 0" can cause errors
304 if (nPiPlus[enebin] > 1e-6) {
305 _h_npart_Piratio[enebin]->fill(Npart, nPi[enebin] / nPiPlus[enebin], 5);
306 _h_npart_KaPiplus[enebin]->fill(Npart, nKaonPlus[enebin] / nPiPlus[enebin], 5);
307 _h_npart_PPiplus[enebin]->fill(Npart, nProton[enebin] / nPiPlus[enebin], 5);
308 }
309
310 if (nPi[enebin] > 1e-6) {
311 _h_npart_KaPi[enebin]->fill(Npart, nKaon[enebin] / nPi[enebin], 5);
312 _h_npart_AntiPPi[enebin]->fill(Npart, nAntiProton[enebin] / nPi[enebin], 5);
313 }
314
315 if (nKaonPlus[enebin] > 1e-6)
316 _h_npart_Karatio[enebin]->fill(Npart, nKaon[enebin] / nKaonPlus[enebin], 5);
317
318 if (nProton[enebin] > 1e-6)
319 _h_npart_Pratio[enebin]->fill(Npart, nAntiProton[enebin] / nProton[enebin], 5);
320
321 /// Particle Yields
322 if (enebinfig == 0 || enebinfig == 1) {
323 for (size_t i = 0; i < 10; i++) {
324 if (nparts[i] > 1e-6)
325 _h_yields[enebinfig]->fill(i + 1, nparts[i], 5);
326 }
327 if (nparts[0] > 1e-6)
328 _h_ratios[enebinfig]->fill(1, nparts[1] / nparts[0], 5);
329 if (nparts[2] > 1e-6)
330 _h_ratios[enebinfig]->fill(2, nparts[3] / nparts[2], 5);
331 if (nparts[4] > 1e-6)
332 _h_ratios[enebinfig]->fill(3, nparts[5] / nparts[4], 5);
333 if (nparts[6] > 1e-6)
334 _h_ratios[enebinfig]->fill(4, nparts[7] / nparts[6], 5);
335 if (nparts[8] > 1e-6)
336 _h_ratios[enebinfig]->fill(5, nparts[9] / nparts[8], 5);
337 if (nparts[1] > 1e-6) {
338 _h_ratios[enebinfig]->fill(6, nparts[3] / nparts[1], 5);
339 _h_ratios[enebinfig]->fill(7, nparts[5] / nparts[1], 5);
340 _h_ratios[enebinfig]->fill(8, nparts[6] / nparts[1], 5);
341 _h_ratios[enebinfig]->fill(9, nparts[9] / nparts[1], 5);
342 }
343 }
344
345 if (nparts[0] > 1e-6) {
346 _h_snn_Piratio->fill(energies[enebin], nparts[1] / nparts[0], 5);
347 _h_snn_KaPiplus->fill(energies[enebin], nparts[2] / nparts[0], 5);
348 }
349
350 if (nparts[1] > 1e-6)
351 _h_snn_KaPiminus->fill(energies[enebin],nparts[3] / nparts[1], 5);
352 if (nparts[2] > 1e-6)
353 _h_snn_Karatio->fill(energies[enebin],nparts[3] / nparts[2], 5);
354 if (nparts[4] > 1e-6)
355 _h_snn_Pratio->fill(energies[enebin],nparts[5] / nparts[4], 5);
356
357 /// Sum the weight of the event
358 if (c < 80) {
359 _wght_Pi[enebin][cenbin]->fill();
360 _wght_PiPlus[enebin][cenbin]->fill();
361 _wght_Kaon[enebin][cenbin]->fill();
362 _wght_KaonPlus[enebin][cenbin]->fill();
363 _wght_Proton[enebin][cenbin]->fill();
364 _wght_AntiProton[enebin][cenbin]->fill();
365 _wght_npart_PiPlus[enebin]->fill();
366 _wght_npart_PiMinus[enebin]->fill();
367 _wght_npart_KaonPlus[enebin]->fill();
368 _wght_npart_KaonMinus[enebin]->fill();
369 _wght_npart_Proton[enebin]->fill();
370 _wght_npart_AntiProton[enebin]->fill();
371 }
372 }
373
374
375 /// Normalise histograms etc., after the run
376 void finalize() {
377 /// Normalisation
378 for (size_t j = 0; j < 5; ++j) {
379 for (size_t i = 0; i < 9; ++i) {
380 if (_h_dpT_Pi[j][i]->integral() != 0 && _wght_Pi[j][i]->sumW() != 0)
381 scale(_h_dpT_Pi[j][i], 1. / (TWOPI * 0.2 * _wght_Pi[j][i]->sumW()));
382 if (_h_dpT_Piplus[j][i]->integral() != 0 && _wght_PiPlus[j][i]->sumW() != 0)
383 scale(_h_dpT_Piplus[j][i], 1. / (TWOPI * 0.2 * _wght_PiPlus[j][i]->sumW()));
384 if (_h_dpT_Kaon[j][i]->integral() != 0 && _wght_Kaon[j][i]->sumW() != 0)
385 scale(_h_dpT_Kaon[j][i], 1. / (TWOPI * 0.2 * _wght_Kaon[j][i]->sumW()));
386 if (_h_dpT_Kaonplus[j][i]->integral() != 0 && _wght_KaonPlus[j][i]->sumW() != 0)
387 scale(_h_dpT_Kaonplus[j][i], 1. / (TWOPI * 0.2 * _wght_KaonPlus[j][i]->sumW()));
388 if (_h_dpT_AntiProton[j][i]->integral() != 0 && _wght_Proton[j][i]->sumW() != 0)
389 scale(_h_dpT_AntiProton[j][i], 1. / (TWOPI * 0.2 * _wght_Proton[j][i]->sumW()));
390 if (_h_dpT_Proton[j][i]->integral() != 0 && _wght_AntiProton[j][i]->sumW() != 0)
391 scale(_h_dpT_Proton[j][i], 1. / (TWOPI * 0.2 * _wght_AntiProton[j][i]->sumW()));
392 }
393 }
394
395 /// Filling the bins with a value (here out of the defined
396 /// screening range of the plot) when it has not been filled by
397 /// anything, otherwise it won't want to plot
398 for (size_t j = 0, N = energies.size(); j < N; ++j) {
399 for (size_t i = 0, M = _h_npart_PiPlus[j]->numBins(); i < M; ++i)
400 if (_h_npart_PiPlus[j]->bin(i).numEntries() == 0)
401 _h_npart_PiPlus[j]->fill(_h_npart_PiPlus[j]->bin(i).xMid(), -0.1);
402
403 for (size_t i = 0, M = _h_npart_PiMinus[j]->numBins(); i < M; ++i)
404 if (_h_npart_PiMinus[j]->bin(i).numEntries() == 0)
405 _h_npart_PiMinus[j]->fill(_h_npart_PiMinus[j]->bin(i).xMid(), -0.1);
406
407 for (size_t i = 0, M = _h_npart_KaPlus[j]->numBins(); i < M; ++i)
408 if (_h_npart_KaPlus[j]->bin(i).numEntries() == 0)
409 _h_npart_KaPlus[j]->fill(_h_npart_KaPlus[j]->bin(i).xMid(), -0.1);
410
411 for (size_t i = 0, M = _h_npart_KaMinus[j]->numBins(); i < M; ++i)
412 if (_h_npart_KaMinus[j]->bin(i).numEntries() == 0)
413 _h_npart_KaMinus[j]->fill(_h_npart_KaMinus[j]->bin(i).xMid(), -0.1);
414
415 for (size_t i = 0, M = _h_npart_Proton[j]->numBins(); i < M; ++i)
416 if (_h_npart_Proton[j]->bin(i).numEntries() == 0)
417 _h_npart_Proton[j]->fill(_h_npart_Proton[j]->bin(i).xMid(), -0.1);
418
419 for (size_t i = 0, M = _h_npart_AntiProton[j]->numBins(); i < M; ++i)
420 if (_h_npart_AntiProton[j]->bin(i).numEntries() == 0)
421 _h_npart_AntiProton[j]->fill(_h_npart_AntiProton[j]->bin(i).xMid(), -0.1);
422
423 for (size_t i = 0, M = _h_npart_pT_PiPlus[j]->numBins(); i < M; ++i)
424 if (_h_npart_pT_PiPlus[j]->bin(i).numEntries() == 0)
425 _h_npart_pT_PiPlus[j]->fill(_h_npart_pT_PiPlus[j]->bin(i).xMid(), -0.1);
426
427 for (size_t i = 0, M = _h_npart_pT_PiMinus[j]->numBins(); i < M; ++i)
428 if (_h_npart_pT_PiMinus[j]->bin(i).numEntries() == 0)
429 _h_npart_pT_PiMinus[j]->fill(_h_npart_pT_PiMinus[j]->bin(i).xMid(), -0.1);
430
431 for (size_t i = 0, M = _h_npart_pT_KaPlus[j]->numBins(); i < M; ++i)
432 if (_h_npart_pT_KaPlus[j]->bin(i).numEntries() == 0)
433 _h_npart_pT_KaPlus[j]->fill(_h_npart_pT_KaPlus[j]->bin(i).xMid(), -0.1);
434
435 for (size_t i = 0, M = _h_npart_pT_KaMinus[j]->numBins(); i < M; ++i)
436 if (_h_npart_pT_KaMinus[j]->bin(i).numEntries() == 0)
437 _h_npart_pT_KaMinus[j]->fill(_h_npart_pT_KaMinus[j]->bin(i).xMid(), -0.1);
438
439 for (size_t i = 0, M = _h_npart_pT_Proton[j]->numBins(); i < M; ++i)
440 if (_h_npart_pT_Proton[j]->bin(i).numEntries() == 0)
441 _h_npart_pT_Proton[j]->fill(_h_npart_pT_Proton[j]->bin(i).xMid(), -0.1);
442
443 for (size_t i = 0, M = _h_npart_pT_AntiProton[j]->numBins(); i < M; ++i)
444 if (_h_npart_pT_AntiProton[j]->bin(i).numEntries() == 0)
445 _h_npart_pT_AntiProton[j]->fill(_h_npart_pT_AntiProton[j]->bin(i).xMid(), -0.1);
446 }
447
448 for (size_t j = 0; j < 5; ++j)
449 for (size_t i = 0; i < 9; ++i) {
450 if (_h_npart_Piratio[j]->bin(i).numEntries() == 0)
451 _h_npart_Piratio[j]->fill(_h_npart_Piratio[j]->bin(i).xMid(), -0.1);
452
453 if (_h_npart_Karatio[j]->bin(i).numEntries() == 0)
454 _h_npart_Karatio[j]->fill(_h_npart_Karatio[j]->bin(i).xMid(), -0.1);
455
456 if (_h_npart_Pratio[j]->bin(i).numEntries() == 0)
457 _h_npart_Pratio[j]->fill(_h_npart_Pratio[j]->bin(i).xMid(), -0.1);
458
459 if (_h_npart_KaPi[j]->bin(i).numEntries() == 0)
460 _h_npart_KaPi[j]->fill(_h_npart_KaPi[j]->bin(i).xMid(), -0.1);
461
462 if (_h_npart_AntiPPi[j]->bin(i).numEntries() == 0)
463 _h_npart_AntiPPi[j]->fill(_h_npart_AntiPPi[j]->bin(i).xMid(), -0.1);
464
465 if (_h_npart_KaPiplus[j]->bin(i).numEntries() == 0)
466 _h_npart_KaPiplus[j]->fill(_h_npart_KaPiplus[j]->bin(i).xMid(), -0.1);
467
468 if (_h_npart_PPiplus[j]->bin(i).numEntries() == 0)
469 _h_npart_PPiplus[j]->fill(_h_npart_PPiplus[j]->bin(i).xMid(), -0.1);
470 }
471
472
473 for (size_t j = 0; j < 2; ++j) {
474 for (size_t i = 0, N = _h_ratios[j]->numBins(); i < N; ++i)
475 if (_h_ratios[j]->bin(i).numEntries() == 0)
476 _h_ratios[j]->fill(_h_ratios[j]->bin(i).xMid(), -0.1);
477 for (size_t i = 0, N = _h_yields[j]->numBins(); i < N; ++i)
478 if (_h_yields[j]->bin(i).numEntries() == 0)
479 _h_yields[j]->fill(_h_yields[j]->bin(i).xMid(), -0.1);
480 }
481
482 for (size_t i = 0, N = energies.size(); i < N; ++i) {
483 if (_h_snn_npart_PiPlus->bin(i).numEntries() == 0)
484 _h_snn_npart_PiPlus->fill(_h_snn_npart_PiPlus->bin(i).xMid(), -0.1);
485
486 if (_h_snn_npart_PiMinus->bin(i).numEntries() == 0)
487 _h_snn_npart_PiMinus->fill(_h_snn_npart_PiMinus->bin(i).xMid(), -0.1);
488
489 if (_h_snn_npart_KaPlus->bin(i).numEntries() == 0)
490 _h_snn_npart_KaPlus->fill(_h_snn_npart_KaPlus->bin(i).xMid(), -0.1);
491
492 if (_h_snn_npart_KaMinus->bin(i).numEntries() == 0)
493 _h_snn_npart_KaMinus->fill(_h_snn_npart_KaMinus->bin(i).xMid(), -0.1);
494
495 if (_h_snn_npart_Proton->bin(i).numEntries() == 0)
496 _h_snn_npart_Proton->fill(_h_snn_npart_Proton->bin(i).xMid(), -0.1);
497
498 if (_h_snn_npart_AntiProton->bin(i).numEntries() == 0)
499 _h_snn_npart_AntiProton->fill(_h_snn_npart_AntiProton->bin(i).xMid(), -0.1);
500
501 if (_h_snn_mt_PiPlus->bin(i).numEntries() == 0)
502 _h_snn_mt_PiPlus->fill(_h_snn_mt_PiPlus->bin(i).xMid(), -0.1);
503
504 if (_h_snn_mt_PiMinus->bin(i).numEntries() == 0)
505 _h_snn_mt_PiMinus->fill(_h_snn_mt_PiMinus->bin(i).xMid(), -0.1);
506
507 if (_h_snn_mt_KaPlus->bin(i).numEntries() == 0)
508 _h_snn_mt_KaPlus->fill(_h_snn_mt_KaPlus->bin(i).xMid(), -0.1);
509
510 if (_h_snn_mt_KaMinus->bin(i).numEntries() == 0)
511 _h_snn_mt_KaMinus->fill(_h_snn_mt_KaMinus->bin(i).xMid(), -0.1);
512
513 if (_h_snn_mt_Proton->bin(i).numEntries() == 0)
514 _h_snn_mt_Proton->fill(_h_snn_mt_Proton->bin(i).xMid(), -0.1);
515
516 if (_h_snn_mt_AntiProton->bin(i).numEntries() == 0)
517 _h_snn_mt_AntiProton->fill(_h_snn_mt_AntiProton->bin(i).xMid(), -0.1);
518
519 if (_h_snn_KaPiplus->bin(i).numEntries() == 0)
520 _h_snn_KaPiplus->fill(_h_snn_KaPiplus->bin(i).xMid(), -0.1);
521
522 if (_h_snn_KaPiminus->bin(i).numEntries() == 0)
523 _h_snn_KaPiminus->fill(_h_snn_KaPiminus->bin(i).xMid(), -0.1);
524
525 if (_h_snn_Piratio->bin(i).numEntries() == 0)
526 _h_snn_Piratio->fill(_h_snn_Piratio->bin(i).xMid(), -0.1);
527
528 if (_h_snn_Karatio->bin(i).numEntries() == 0)
529 _h_snn_Karatio->fill(_h_snn_Karatio->bin(i).xMid(), -0.1);
530
531 if (_h_snn_Pratio->bin(i).numEntries() == 0)
532 _h_snn_Pratio->fill(_h_snn_Pratio->bin(i).xMid(), -0.1);
533 }
534 }
535
536
537 private:
538
539 /// @name Histograms
540 /// @{
541 vector<vector<Histo1DPtr>> _h_dpT_Pi;
542 vector<vector<Histo1DPtr>> _h_dpT_Piplus;
543 vector<vector<Histo1DPtr>> _h_dpT_Kaon;
544 vector<vector<Histo1DPtr>> _h_dpT_Kaonplus;
545 vector<vector<Histo1DPtr>> _h_dpT_AntiProton;
546 vector<vector<Histo1DPtr>> _h_dpT_Proton;
547
548 vector<vector<CounterPtr>> _wght_Pi;
549 vector<vector<CounterPtr>> _wght_PiPlus;
550 vector<vector<CounterPtr>> _wght_Kaon;
551 vector<vector<CounterPtr>> _wght_KaonPlus;
552 vector<vector<CounterPtr>> _wght_Proton;
553 vector<vector<CounterPtr>> _wght_AntiProton;
554
555 vector<Profile1DPtr> _h_npart_Piratio;
556 vector<Profile1DPtr> _h_npart_Karatio;
557 vector<Profile1DPtr> _h_npart_Pratio;
558 vector<Profile1DPtr> _h_npart_KaPi;
559 vector<Profile1DPtr> _h_npart_AntiPPi;
560 vector<Profile1DPtr> _h_npart_KaPiplus;
561 vector<Profile1DPtr> _h_npart_PPiplus;
562 vector<Profile1DPtr> _h_yields;
563 vector<Profile1DPtr> _h_ratios;
564
565 vector<Histo1DPtr> _h_npart_PiPlus;
566 vector<Histo1DPtr> _h_npart_PiMinus;
567 vector<Histo1DPtr> _h_npart_KaPlus;
568 vector<Histo1DPtr> _h_npart_KaMinus;
569 vector<Histo1DPtr> _h_npart_Proton;
570 vector<Histo1DPtr> _h_npart_AntiProton;
571
572 vector<CounterPtr> _wght_npart_PiPlus;
573 vector<CounterPtr> _wght_npart_PiMinus;
574 vector<CounterPtr> _wght_npart_KaonPlus;
575 vector<CounterPtr> _wght_npart_KaonMinus;
576 vector<CounterPtr> _wght_npart_Proton;
577 vector<CounterPtr> _wght_npart_AntiProton;
578
579 vector<Profile1DPtr> _h_npart_pT_PiPlus;
580 vector<Profile1DPtr> _h_npart_pT_PiMinus;
581 vector<Profile1DPtr> _h_npart_pT_KaPlus;
582 vector<Profile1DPtr> _h_npart_pT_KaMinus;
583 vector<Profile1DPtr> _h_npart_pT_Proton;
584 vector<Profile1DPtr> _h_npart_pT_AntiProton;
585
586 Histo1DPtr _h_snn_npart_PiPlus;
587 Histo1DPtr _h_snn_npart_PiMinus;
588 Histo1DPtr _h_snn_npart_KaPlus;
589 Histo1DPtr _h_snn_npart_KaMinus;
590 Histo1DPtr _h_snn_npart_Proton;
591 Histo1DPtr _h_snn_npart_AntiProton;
592 Profile1DPtr _h_snn_mt_PiPlus;
593 Profile1DPtr _h_snn_mt_PiMinus;
594 Profile1DPtr _h_snn_mt_KaPlus;
595 Profile1DPtr _h_snn_mt_KaMinus;
596 Profile1DPtr _h_snn_mt_Proton;
597 Profile1DPtr _h_snn_mt_AntiProton;
598 Profile1DPtr _h_snn_KaPiplus;
599 Profile1DPtr _h_snn_KaPiminus;
600 Profile1DPtr _h_snn_Piratio;
601 Profile1DPtr _h_snn_Karatio;
602 Profile1DPtr _h_snn_Pratio;
603 /// @}
604
605 /// @name Variables
606 /// @{
607 int cenbin, enebin = 0, enebinfig = 0;
608 double nprtcl, nPi[5], nPiPlus[5], nKaon[5], nKaonPlus[5], nProton[5], nAntiProton[5];
609 // The following vector contains the counters for all particles used in
610 // Fig. 25. In the right order : pi+, pi-, K+, K-, p, Antip, Lambda,
611 // AntiLambda, Xi, AntiXi
612 double nparts[10];
613 /// @}
614
615 /// @name Bin edges
616 /// @{
617 const doubles energies = {7.7, 11.5, 19.6, 27.0, 39.0};
618 const doubles centralities = {5, 10, 20, 30, 40, 50, 60, 70, 80};
619 /// @}
620
621 };
622
623
624 RIVET_DECLARE_PLUGIN(STAR_2017_I1510593);
625
626}
|