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/Tools/AliceCommon.hh"
5#include "Rivet/Projections/AliceCommon.hh"
6
7namespace Rivet {
8
9
10 /// @brief ALICE PbPb at 2.76 TeV eta distributions, peripheral events.
11 class ALICE_2016_I1394676 : public Analysis {
12 public:
13
14 /// Constructor
15 RIVET_DEFAULT_ANALYSIS_CTOR(ALICE_2016_I1394676);
16
17
18 /// @name Analysis methods
19 //@{
20
21 /// Book histograms and initialise projections before the run
22 void init() {
23 // Initialise and register projections
24 // Centrality projection.
25 declareCentrality(ALICE::V0MMultiplicity(), "ALICE_2015_PBPBCentrality",
26 "V0M","V0M");
27 // Projections for the 2-out-of-3 trigger.
28 declare(ChargedFinalState( (Cuts::eta > 2.8 && Cuts::eta < 5.1) &&
29 Cuts::pT > 0.1*GeV), "VZERO1");
30 declare(ChargedFinalState( (Cuts::eta > -3.7 && Cuts::eta < -1.7) &&
31 Cuts::pT > 0.1*GeV), "VZERO2");
32 declare(ChargedFinalState(Cuts::abseta < 1. && Cuts::pT > 0.15*GeV), "SPD");
33
34 // Primary particles.
35 declare(ALICE::PrimaryParticles(Cuts::abseta < 5.6),"APRIM");
36
37 // The centrality bins and the corresponding histograms and sow counters.
38 centralityBins = { 40, 50, 60, 70, 80, 90 };
39 for (int i = 0, N = centralityBins.size(); i < N; ++i) {
40 book(histEta[centralityBins[i]], 1, 1, i + 1);
41 book(sow[centralityBins[i]], "sow_" + toString(i));
42 }
43 }
44
45
46 /// Perform the per-event analysis
47 void analyze(const Event& event) {
48 // Trigger projections.
49 const ChargedFinalState& vz1 =
50 apply<ChargedFinalState>(event,"VZERO1");
51 const ChargedFinalState& vz2 =
52 apply<ChargedFinalState>(event,"VZERO2");
53 const ChargedFinalState& spd =
54 apply<ChargedFinalState>(event,"SPD");
55 int fwdTrig = (vz1.particles().size() > 0 ? 1 : 0);
56 int bwdTrig = (vz2.particles().size() > 0 ? 1 : 0);
57 int cTrig = (spd.particles().size() > 0 ? 1 : 0);
58
59 if (fwdTrig + bwdTrig + cTrig < 2) vetoEvent;
60 const CentralityProjection& cent = apply<CentralityProjection>(event,"V0M");
61 double c = cent();
62 // No centralities below 30 %
63 if (c < 30.) return;
64 // Find the correct centrality histogram
65 auto hItr = histEta.upper_bound(c);
66 if (hItr == histEta.end()) return;
67 // Find the correct sow.
68 auto sItr = sow.upper_bound(c);
69 if (sItr == sow.end()) return;
70 sItr->second->fill();
71
72 // Fill the histograms.
73 for ( const auto& p :
74 applyProjection<ALICE::PrimaryParticles>(event,"APRIM").particles() )
75 if(p.abscharge() > 0) hItr->second->fill(p.eta());
76
77 }
78
79
80 /// Normalise histograms etc., after the run
81 void finalize() {
82
83 for (int i = 0, N = centralityBins.size(); i < N; ++i)
84 histEta[centralityBins[i]]->scaleW(1./sow[centralityBins[i]]->sumW());
85
86 }
87
88 //@}
89
90
91 /// @name Histograms
92 //@{
93 vector<double> centralityBins;
94 map<double,Histo1DPtr> histEta;
95 map<double, CounterPtr> sow;
96 //@}
97
98
99 };
100
101
102 // The hook for the plugin system
103 RIVET_DECLARE_PLUGIN(ALICE_2016_I1394676);
104
105
106}
|