Rivet analyses referenceALICE_2012_I1126966Pion, Kaon, and Proton Production in Central Pb-Pb Collisions at 2.76 TeVExperiment: ALICE (LHC) Inspire ID: 1126966 Status: UNVALIDATED Authors:
Beam energies: (287040.0, 287040.0) GeV Run details:
Measurements of the transverse momentum distributions of charged pions, kaons and (anti)protons in Lead-Lead collisions at a centre-of-mass energy per nucleon of 2.76 TeV. The data, covering the PT range up to 4.5 GeV for protons, is restricted to the central rapidity range |y| < 0.5. Source code: ALICE_2012_I1126966.cc 1//-*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/CentralityProjection.hh"
4#include "Rivet/Analyses/AliceCommon.hh"
5
6namespace Rivet {
7
8
9 /// Pion, Kaon, and Proton Production in 0-5%
10 /// central Pb--Pb Collisions at 2.76 TeV
11 class ALICE_2012_I1126966 : public Analysis {
12 public:
13
14 /// Constructor
15 RIVET_DEFAULT_ANALYSIS_CTOR(ALICE_2012_I1126966);
16
17 /// Book histograms and initialise projections before the run
18 void init() {
19 // Particles of interest.
20 declare(ALICE::PrimaryParticles(Cuts::absrap < 0.5),"CFS");
21
22 // The event trigger.
23 declare(ALICE::V0AndTrigger(), "V0-AND");
24 // The centrality projection.
25 declareCentrality(ALICE::V0MMultiplicity(),
26 "ALICE_2015_CENT_PBPB", "V0M", "V0M");
27
28 // Invariant pT distributions.
29 book(_histPtPi, "d01-x01-y01"); //pi+
30 book(_histPtPibar, "d01-x01-y02");// pi-
31 book(_histPtKaon, "d02-x01-y01"); //K+
32 book(_histPtKaonbar, "d02-x01-y02"); //K-
33 book(_histPtProton, "d03-x01-y01"); //P+
34 book(_histPtProtonbar, "d03-x01-y02"); //P-
35 // Yield histograms.
36 book(_histNpi, "d04-x01-y01");
37 book(_histNpibar, "d04-x01-y02");
38 book(_histNKaon, "d04-x01-y03");
39 book(_histNKaonbar, "d04-x01-y04");
40 book(_histNproton, "d04-x01-y05");
41 book(_histNprotonbar, "d04-x01-y06");
42 // Sum of weights of triggered events.
43 book(sow, "sow");
44 }
45
46
47 /// Perform the per-event analysis
48 void analyze(const Event& event) {
49 // Analysis only considers 0-5% central events
50 if (apply<CentralityProjection>(event,"V0M")() > 5.0)
51 vetoEvent;
52 // Event trigger.
53 if (!apply<ALICE::V0AndTrigger>(event, "V0-AND")() ) vetoEvent;
54
55 sow->fill();
56 // ID particles counters for this event.
57 int Npi=0;
58 int Npibar=0;
59 int NKaon=0;
60 int NKaonbar=0;
61 int Nproton=0;
62 int Nprotonbar=0;
63
64 for (const Particle& p : apply<ALICE::PrimaryParticles>(event,"CFS").particles()) {
65 const double pWeight = 1.0 / p.pT() / 2. / M_PI;
66 switch (p.pid()) {
67 case 211: // pi+
68 Npi++;
69 _histPtPi->fill(p.pT()/GeV, pWeight);
70 break;
71 case -211: //pi-
72 Npibar++;
73 _histPtPibar->fill(p.pT()/GeV, pWeight);
74 break;
75 case 2212: // proton
76 Nproton++;
77 _histPtProton->fill(p.pT()/GeV, pWeight);
78 break;
79 case -2212: // p-bar
80 Nprotonbar++;
81 _histPtProtonbar->fill(p.pT()/GeV, pWeight);
82 break;
83 case 321: // K+
84 NKaon++;
85 _histPtKaon->fill(p.pT()/GeV, pWeight);
86 break;
87 case -321: // K-
88 NKaonbar++;
89 _histPtKaonbar->fill(p.pT()/GeV, pWeight);
90 break;
91 }
92 } // Particle loop ends.
93
94 // Fill yield histograms.
95 _histNpi->fill(0.0, Npi);
96 _histNpibar->fill(0.0, Npibar);
97 _histNKaon->fill(0.0, NKaon);
98 _histNKaonbar->fill(0.0, NKaonbar);
99 _histNproton->fill(0.0, Nproton);
100 _histNprotonbar->fill(0.0, Nprotonbar);
101 }
102
103
104 void finalize() {
105 const double s = 1./sow->sumW();
106 _histPtPi->scaleW(s);
107 _histPtPibar->scaleW(s);
108 _histPtKaon->scaleW(s);
109 _histPtKaonbar->scaleW(s);
110 _histPtProton->scaleW(s);
111 _histPtProtonbar->scaleW(s);
112 _histNpi->scaleW(s);
113 _histNpibar->scaleW(s);
114 _histNKaon->scaleW(s);
115 _histNKaonbar->scaleW(s);
116 _histNproton->scaleW(s);
117 _histNprotonbar->scaleW(s);
118
119}
120
121 private:
122
123 // pT histograms
124 Histo1DPtr _histPtPi;
125 Histo1DPtr _histPtKaon;
126 Histo1DPtr _histPtProton;
127 Histo1DPtr _histPtPibar;
128 Histo1DPtr _histPtKaonbar;
129 Histo1DPtr _histPtProtonbar;
130 Histo1DPtr _histNpi;
131 Histo1DPtr _histNpibar;
132 Histo1DPtr _histNKaon;
133 Histo1DPtr _histNKaonbar;
134 Histo1DPtr _histNproton;
135 Histo1DPtr _histNprotonbar;
136 CounterPtr sow;
137
138 };
139
140
141 RIVET_DECLARE_PLUGIN(ALICE_2012_I1126966);
142
143
144}
|