Rivet analyses referenceALICE_2014_I1244523Multiplicity Dependence of Pion, Kaon, Proton and Lambda Production in p--Pb Collisions at 5.02 TeV/nnExperiment: ALICE (LHC) Inspire ID: 1244523 Status: UNVALIDATED Authors:
Beam energies: (326560.0, 4000.0) GeV Run details:
Identified baryons and mesons plotted in invariant pT spectra as well as average pT and yield ratios. The measurements are done in centrality classes, and one must apply centrality selection by first running the ALICE pB centrality calibration analysis and preloading the produced histograms. No generator level cut on particle life time should be applied. Source code: ALICE_2014_I1244523.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/CentralityProjection.hh"
4#include "Rivet/Analyses/AliceCommon.hh"
5#include "Rivet/Tools/Cuts.hh"
6
7namespace Rivet {
8
9
10 /// @brief Identified particles in p--Pb @ 5 TeV
11 class ALICE_2014_I1244523 : public Analysis {
12 public:
13
14 /// Constructor
15 RIVET_DEFAULT_ANALYSIS_CTOR(ALICE_2014_I1244523);
16
17
18 /// @name Analysis methods
19 /// @{
20
21 int profileIndex(vector<double> cBins, double c) {
22 int index = 100;
23 if (c > 0 && c <= cBins[0]) return cBins.size() - 1;
24 for (size_t i = 0; i < cBins.size() - 1; ++i) {
25 if (c > cBins[i] && c <= cBins[i + 1]) {
26 index = i;
27 break;
28 }
29 }
30 // Catch low fluctuation.
31 return max(0, int(cBins.size() - index - 2));
32 }
33
34 void scaleHisto(Histo1DPtr h) {
35 for (auto& b : h->bins()) {
36 b.scaleW(1./b.xWidth()/b.xMid());
37 }
38 }
39
40 /// Book histograms and initialise projections before the run
41 void init() {
42 // The centrality projection.
43 declareCentrality(ALICE::V0AMultiplicity(),
44 "ALICE_2015_CENT_PPB", "V0A", "V0A");
45
46 // Define the cuts for the analysis:
47 // pPb Collision has a centre of mass system shift of +0.465
48 // They study -0.5 < yCoM < 0.0 -> -0.035 < y < 0.465
49 const Cut& cut = Cuts::rap < 0.035 && Cuts::rap > -0.465;
50 //const Cut& cut = Cuts::rap > -0.035 && Cuts::rap < 0.465;
51 const ALICE::PrimaryParticles fs(cut);
52 declare(fs,"FS");
53
54 // The event trigger.
55 declare(ALICE::V0AndTrigger(), "V0-AND");
56
57 // The centrality bins
58 centralityBins = {5.,10.,20.,40.,60.,80.,100.};
59
60 for (int i = 0; i < 4; ++i) {
61 // First we book the invariant spectra.
62 book(_histPipT[centralityBins[i]], 1, 1, 1 + i);
63 if (i < 3) book(_histPipT[centralityBins[i + 4]], 2, 1, 1 + i);
64 book(_histKpT[centralityBins[i]], 3, 1, 1 + i);
65 if (i < 3) book(_histKpT[centralityBins[i + 4]], 4, 1, 1 + i);
66 book(_histK0SpT[centralityBins[i]], 5, 1, 1 + i);
67 if (i < 3) book(_histK0SpT[centralityBins[i + 4]], 6, 1, 1 + i);
68 book(_histProtonpT[centralityBins[i]], 7, 1, 1 + i);
69 if (i < 3) book(_histProtonpT[centralityBins[i + 4]], 8, 1, 1 + i);
70 book(_histLambdapT[centralityBins[i]], 9, 1, 1 + i);
71 if (i < 3) book(_histLambdapT[centralityBins[i + 4]], 10, 1, 1 + i);
72 // The associated sow counters.
73 book(_sow[centralityBins[i]], "TMP/sow" + toString(i));
74 if (i < 3) book(_sow[centralityBins[i + 4]], "TMP/sow" + toString(i + 4));
75 // Then the pi spectra going into the centrality dependent pT ratios.
76 book(_tmpPi4KpT[centralityBins[i]], "TMP/NPi4K" + toString(i), refData(11, 1, 1 + i));
77 if (i < 3) book(_tmpPi4KpT[centralityBins[i + 4]], "TMP/NPi4K" + toString(i + 4), refData(12, 1, 1 + i));
78 book(_tmpPi4PpT[centralityBins[i]], "TMP/NPi4P" + toString(i), refData(13, 1, 1 + i));
79 if (i < 3) book(_tmpPi4PpT[centralityBins[i + 4]], "TMP/NPi4P" + toString(i + 4), refData(14, 1, 1 + i));
80 book(_tmpK4LpT[centralityBins[i]], "TMP/NK4L" + toString(i), refData(15, 1, 1 + i));
81 if (i < 3) book(_tmpK4LpT[centralityBins[i + 4]], "TMP/NK4L" + toString(i + 4), refData(16, 1, 1 + i));
82 // Then the rest of the spectra going into the cent. dep't pT ratios.
83 book(_tmpKpT[centralityBins[i]], "TMP/NK" + toString(i), refData(11, 1, 1 + i));
84 if (i < 3) book(_tmpKpT[centralityBins[i + 4]], "TMP/NK" + toString(i + 4), refData(12, 1, 1 + i));
85 book(_tmpProtonpT[centralityBins[i]], "TMP/NP" + toString(i), refData(13, 1, 1 + i));
86 if (i < 3) book(_tmpProtonpT[centralityBins[i + 4]], "TMP/NP" + toString(i + 4), refData(14, 1, 1 + i));
87 book(_tmpLambdapT[centralityBins[i]], "TMP/NL" + toString(i), refData(15, 1, 1 + i));
88 if (i < 3) book(_tmpLambdapT[centralityBins[i + 4]], "TMP/NL" + toString(i + 4), refData(16, 1, 1 + i));
89 // Then the centrality dependent pT ratios.
90 book(_ratioKPi[centralityBins[i]], 11, 1, 1 + i);
91 if (i < 3) book(_ratioKPi[centralityBins[i + 4]], 12, 1, 1 + i);
92 book(_ratioPPi[centralityBins[i]], 13, 1, 1 + i);
93 if (i < 3) book(_ratioPPi[centralityBins[i + 4]], 14, 1, 1 + i);
94 book(_ratioLK[centralityBins[i]], 15, 1, 1 + i);
95 if (i < 3) book(_ratioLK[centralityBins[i + 4]], 16, 1, 1 + i);
96 }
97
98 // Mean pT vs. multiplicity class.
99 book(_histLambdaMeanpT, 17, 1, 1);
100 book(_histProtonMeanpT, 18, 1, 1);
101 book(_histK0SMeanpT, 19, 1, 1);
102 book(_histKMeanpT, 20, 1, 1);
103 book(_histPiMeanpT, 21, 1, 1);
104
105 // Yield ratios.
106 book(_histKtoPiYield, 22, 1, 1);
107 book(_histProtontoPiYield, 22, 1, 2);
108 book(_histLambdatoPiYield, 22, 1, 3);
109
110 book(_histKYield, "TMP/KY", refData(22,1,1));
111 book(_histProtonYield, "TMP/PrY", refData(22,1,2));
112 book(_histLambdaYield, "TMP/LY", refData(22,1,3));
113 book(_histPiYield, "TMP/PiY", refData(22,1,1));
114 book(_histPi4LYield, "TMP/PiLY",refData(22,1,3)); // HepData entry is wrong -- look in the paper.
115
116 }
117
118
119 /// Perform the per-event analysis
120 void analyze(const Event& event) {
121 // Event trigger.
122 if (!apply<ALICE::V0AndTrigger>(event, "V0-AND")() ) vetoEvent;
123 // Centrality
124 const CentralityProjection& cent = apply<CentralityProjection>(event,"V0A");
125 double c = cent();
126 // Find the index for the profiles.
127 int index = profileIndex(centralityBins, c);
128 // Find the correct histograms
129 // all the pion histos
130 auto pi1Itr = _histPipT.upper_bound(c);
131 // Test the first one.
132 if (pi1Itr == _histPipT.end()) return;
133 auto pi2Itr = _tmpPi4KpT.upper_bound(c);
134 auto pi3Itr = _tmpPi4PpT.upper_bound(c);
135 // Then the rest
136 auto kItr = _histKpT.upper_bound(c);
137 auto k0Itr = _histK0SpT.upper_bound(c);
138 auto krItr = _tmpKpT.upper_bound(c);
139 auto klItr = _tmpK4LpT.upper_bound(c);
140 auto pItr = _histProtonpT.upper_bound(c);
141 auto prItr = _tmpProtonpT.upper_bound(c);
142 auto lItr = _histLambdapT.upper_bound(c);
143 auto lrItr = _tmpLambdapT.upper_bound(c);
144 // And the sow
145 auto sowItr = _sow.upper_bound(c);
146 sowItr->second->fill();
147
148
149 const ALICE::PrimaryParticles& fs = apply<ALICE::PrimaryParticles>(event,"FS");
150 // Count number of particles for yields.
151 int npi = 0, nk = 0, np = 0, nlam = 0;
152 for (const auto& p : fs.particles()) {
153 const double pT = p.pT();
154 const int pid = abs(p.pid());
155 const double nW = 1 / M_PI / pT; // Dividing and multiplying by 2 because dy.
156 if (pid == 211) { // pi+/-
157 ++npi;
158 pi1Itr->second->fill(pT, nW);
159 pi2Itr->second->fill(pT);
160 pi3Itr->second->fill(pT);
161 _histPiMeanpT->fill(_histPiMeanpT->bin(index).xMid(), pT);
162 }
163 else if (pid == 321) { // K +/-
164 ++nk;
165 kItr->second->fill(pT, nW);
166 krItr->second->fill(pT);
167 _histKMeanpT->fill(_histKMeanpT->bin(index).xMid(), pT);
168 }
169 else if (pid == 310) { // K0S
170 k0Itr->second->fill(pT, nW);
171 klItr->second->fill(pT);
172 _histK0SMeanpT->fill(_histK0SMeanpT->bin(index).xMid(), pT);
173 }
174 else if (pid == 2212) { // p + pbar
175 ++np;
176 pItr->second->fill(pT, nW);
177 prItr->second->fill(pT);
178 _histProtonMeanpT->fill(_histProtonMeanpT->bin(index).xMid(), pT);
179 }
180 else if (pid == 3122) { // Lambda + Lambdabar
181 ++nlam;
182 lItr->second->fill(pT, nW);
183 lrItr->second->fill(pT);
184 _histLambdaMeanpT->fill(_histLambdaMeanpT->bin(index).xMid(), pT);
185 }
186 }
187 // Fill the yield profiles.
188 _histKYield->fill(_histKYield->bin(index).xMid(), double(nk));
189 _histPi4LYield->fill(_histPi4LYield->bin(index).xMid(), double(npi));
190 _histProtonYield->fill(_histProtonYield->bin(index).xMid(), double(np));
191 _histPiYield->fill(_histPiYield->bin(index).xMid(), double(npi));
192 _histLambdaYield->fill(_histLambdaYield->bin(index).xMid(), double(nlam));
193 }
194
195 /// Normalise histograms etc., after the run
196 void finalize() {
197
198 // Loop over centrality classes.
199 for (int i = 0; i < 7; i++){
200
201 // Normalize the spectra.
202 _histPipT[centralityBins[i]]->scaleW(1./_sow[centralityBins[i]]->sumW());
203 _histKpT[centralityBins[i]]->scaleW(1./_sow[centralityBins[i]]->sumW());
204 _histK0SpT[centralityBins[i]]->scaleW(1./_sow[centralityBins[i]]->sumW());
205 _histProtonpT[centralityBins[i]]->scaleW(1./_sow[centralityBins[i]]->sumW());
206 _histLambdapT[centralityBins[i]]->scaleW(1./_sow[centralityBins[i]]->sumW());
207
208 // Make the pT ratios.
209 divide(_tmpKpT[centralityBins[i]], _tmpPi4KpT[centralityBins[i]], _ratioKPi[centralityBins[i]]);
210 divide(_tmpProtonpT[centralityBins[i]], _tmpPi4PpT[centralityBins[i]], _ratioPPi[centralityBins[i]]);
211 divide(_tmpLambdapT[centralityBins[i]], _tmpK4LpT[centralityBins[i]], _ratioLK[centralityBins[i]]);
212 }
213
214 divide(_histKYield, _histPiYield, _histKtoPiYield);
215 divide(_histProtonYield, _histPiYield, _histProtontoPiYield);
216 divide(_histLambdaYield, _histPi4LYield, _histLambdatoPiYield);
217
218 }
219
220 /// @}
221
222private:
223 vector<double> centralityBins;
224 // pT spectra (separated by multiplicity classes)
225 map<double, Histo1DPtr> _histPipT;
226 map<double, Histo1DPtr> _histKpT;
227 map<double, Histo1DPtr> _histK0SpT;
228 map<double, Histo1DPtr> _histProtonpT;
229 map<double, Histo1DPtr> _histLambdapT;
230
231 // Associated sum of weights.
232 map<double, CounterPtr> _sow;
233
234 // pT spectra for ratios.
235 map<double, Histo1DPtr> _tmpPi4KpT;
236 map<double, Histo1DPtr> _tmpPi4PpT;
237 map<double, Histo1DPtr> _tmpK4LpT;
238 map<double, Histo1DPtr> _tmpKpT;
239 map<double, Histo1DPtr> _tmpProtonpT;
240 map<double, Histo1DPtr> _tmpLambdapT;
241
242 // The acual ratios.
243 map<double, Estimate1DPtr> _ratioKPi;
244 map<double, Estimate1DPtr> _ratioPPi;
245 map<double, Estimate1DPtr> _ratioLK;
246
247 // Mean pT vs. Multiplicity
248 Profile1DPtr _histKMeanpT;
249 Profile1DPtr _histK0SMeanpT;
250 Profile1DPtr _histProtonMeanpT;
251 Profile1DPtr _histLambdaMeanpT;
252 Profile1DPtr _histPiMeanpT;
253
254 // Total yields
255 Profile1DPtr _histKYield;
256 Profile1DPtr _histProtonYield;
257 Profile1DPtr _histLambdaYield;
258 Profile1DPtr _histPiYield;
259 Profile1DPtr _histPi4LYield;
260
261 // Yield ratios.
262 Estimate1DPtr _histKtoPiYield;
263 Estimate1DPtr _histProtontoPiYield;
264 Estimate1DPtr _histLambdatoPiYield;
265
266 };
267
268
269 RIVET_DECLARE_PLUGIN(ALICE_2014_I1244523);
270
271
272}
|