Rivet analyses referenceALICE_2010_I852264Pseudorapidities at three energies, charged multiplicity at 7 TeVExperiment: ALICE (LHC) Inspire ID: 852264 Status: VALIDATED Authors:
Beam energies: (450.0, 450.0); (1180.0, 1180.0); (3500.0, 3500.0) GeV Run details:
This is an ALICE publication with pseudorapities for 0.9, 2.36 and 7TeV and the charged multiplicity at 7TeV. The analysis requires at least on charged particle in the event. Only the INEL distributions are considered here. Source code: ALICE_2010_I852264.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/ChargedFinalState.hh"
4
5namespace Rivet {
6
7
8 class ALICE_2010_I852264 : public Analysis {
9 public:
10
11 /// Constructor
12 RIVET_DEFAULT_ANALYSIS_CTOR(ALICE_2010_I852264);
13
14
15 /// @name Analysis methods
16 /// @{
17
18 /// Book histograms and initialise projections before the run
19 void init() {
20
21 ChargedFinalState cfs(Cuts::abseta < 1.0);
22 declare(cfs, "CFS");
23
24 size_t ih = 0;
25 for (double eVal : allowedEnergies()) {
26
27 const string en = toString(int(eVal));
28 if (isCompatibleWithSqrtS(eVal)) _sqs = en;
29
30 book(_h[en+"dN_deta"], 4+ih, 1, 1);
31 if (ih == 2) book(_h["dN_dNch"], 3, 1, 1);
32 book(_c[en], "Nevt_after_cuts_"+en);
33 ++ih;
34 }
35 if (_sqs == "" && !merging()) {
36 throw BeamError("Invalid beam energy for " + name() + "\n");
37 }
38 }
39
40
41 /// Perform the per-event analysis
42 void analyze(const Event& event) {
43 const ChargedFinalState& charged = apply<ChargedFinalState>(event, "CFS");
44 if (charged.size() < 1) vetoEvent;
45 _c[_sqs]->fill();
46 if (_sqs == "7000"s) _h["dN_dNch"]->fill(charged.size());
47
48 for (const Particle& p : charged.particles()) {
49 const double eta = p.eta();
50 _h[_sqs+"dN_deta"]->fill(eta);
51 }
52 }
53
54
55 /// Normalise histograms etc., after the run
56 void finalize() {
57 for (double eVal : allowedEnergies()) {
58 const string en = toString(int(eVal));
59 if (_c[en]->sumW() == 0) continue;
60 scale(_h[en+"dN_deta"], 1.0/ *_c[en]);
61 }
62 normalize(_h["dN_dNch"]);
63 }
64
65 /// @}
66
67
68 private:
69
70 /// @name Histograms
71 /// @{
72 map<string,Histo1DPtr> _h;
73 map<string, CounterPtr> _c;
74
75 string _sqs = "";
76 /// @}
77
78 };
79
80
81
82 RIVET_DECLARE_ALIASED_PLUGIN(ALICE_2010_I852264, ALICE_2010_S8625980);
83
84}
|