Rivet analyses referenceALICE_2016_I1394676Charged particle production as function of centrality, peripheral events only, in PbPb collisions at 2.76 TeV.Experiment: ALICE (LHC) Inspire ID: 1394676 Status: UNVALIDATED Authors:
Beam energies: (287040.0, 287040.0) GeV Run details:
Charged particle pseudorapidity density in centrality classes 30-40, 40-50, 50-60, 60-70, 70-80, 80-90. Measurements cover a wide $\eta$ range from -3.5 to 5. Centrality classes refer to forward V0 spectrum, as also measured by ALICE, can be modified to use a user definition instead. Source code: ALICE_2016_I1394676.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/ChargedFinalState.hh"
4#include "Rivet/Analyses/AliceCommon.hh"
5
6namespace Rivet {
7
8
9 /// @brief ALICE PbPb at 2.76 TeV eta distributions, peripheral events.
10 class ALICE_2016_I1394676 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(ALICE_2016_I1394676);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 // Initialise and register projections
23 // Centrality projection.
24 declareCentrality(ALICE::V0MMultiplicity(), "ALICE_2015_CENT_PBPB",
25 "V0M","V0M");
26 // Projections for the 2-out-of-3 trigger.
27 declare(ChargedFinalState( (Cuts::eta > 2.8 && Cuts::eta < 5.1) &&
28 Cuts::pT > 0.1*GeV), "VZERO1");
29 declare(ChargedFinalState( (Cuts::eta > -3.7 && Cuts::eta < -1.7) &&
30 Cuts::pT > 0.1*GeV), "VZERO2");
31 declare(ChargedFinalState(Cuts::abseta < 1. && Cuts::pT > 0.15*GeV), "SPD");
32
33 // Primary particles.
34 declare(ALICE::PrimaryParticles(Cuts::abseta < 5.6),"APRIM");
35
36 // The centrality bins and the corresponding histograms and sow counters.
37 centralityBins = { 40, 50, 60, 70, 80, 90 };
38 for (int i = 0, N = centralityBins.size(); i < N; ++i) {
39 book(histEta[centralityBins[i]], 1, 1, i + 1);
40 book(sow[centralityBins[i]], "sow_" + toString(i));
41 }
42 }
43
44
45 /// Perform the per-event analysis
46 void analyze(const Event& event) {
47 // Trigger projections.
48 const ChargedFinalState& vz1 =
49 apply<ChargedFinalState>(event,"VZERO1");
50 const ChargedFinalState& vz2 =
51 apply<ChargedFinalState>(event,"VZERO2");
52 const ChargedFinalState& spd =
53 apply<ChargedFinalState>(event,"SPD");
54 int fwdTrig = (vz1.particles().size() > 0 ? 1 : 0);
55 int bwdTrig = (vz2.particles().size() > 0 ? 1 : 0);
56 int cTrig = (spd.particles().size() > 0 ? 1 : 0);
57
58 if (fwdTrig + bwdTrig + cTrig < 2) vetoEvent;
59 const CentralityProjection& cent = apply<CentralityProjection>(event,"V0M");
60 double c = cent();
61 // No centralities below 30 %
62 if (c < 30.) return;
63 // Find the correct centrality histogram
64 auto hItr = histEta.upper_bound(c);
65 if (hItr == histEta.end()) return;
66 // Find the correct sow.
67 auto sItr = sow.upper_bound(c);
68 if (sItr == sow.end()) return;
69 sItr->second->fill();
70
71 // Fill the histograms.
72 for ( const auto& p :
73 apply<ALICE::PrimaryParticles>(event,"APRIM").particles() )
74 if(p.abscharge() > 0) hItr->second->fill(p.eta());
75
76 }
77
78
79 /// Normalise histograms etc., after the run
80 void finalize() {
81
82 for (int i = 0, N = centralityBins.size(); i < N; ++i)
83 histEta[centralityBins[i]]->scaleW(1./sow[centralityBins[i]]->sumW());
84
85 }
86
87 /// @}
88
89
90 /// @name Histograms
91 /// @{
92 vector<double> centralityBins;
93 map<double,Histo1DPtr> histEta;
94 map<double, CounterPtr> sow;
95 /// @}
96
97
98 };
99
100
101 RIVET_DECLARE_PLUGIN(ALICE_2016_I1394676);
102
103
104}
|