Rivet analyses referenceALICE_2015_PPCentralityExperiment: () Status: UNVALIDATED No authors listed No references listed Beams: * * Beam energies: ANY
1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/ImpactParameterProjection.hh"
4#include "Rivet/Projections/AliceCommon.hh"
5
6namespace Rivet {
7
8
9 class ALICE_2015_PPCentrality : public Analysis {
10 public:
11 RIVET_DEFAULT_ANALYSIS_CTOR(ALICE_2015_PPCentrality);
12
13 // Book histograms, initialize projections.
14 void init() {
15 declare(ALICE::V0AndTrigger(),"V0-AND");
16 declare(ALICE::V0MMultiplicity(),"V0M");
17 declare(ImpactParameterProjection(), "IMP");
18 book(_v0m, "V0M",100,0,200);
19 book(_imp, "V0M_IMP",100,0,20);
20 }
21
22
23 // Per-event analysis
24 void analyze(const Event& event) {
25 _imp->fill(apply<SingleValueProjection>(event,"IMP")());
26
27 // Check if we have any hit in either V0-A or -C. If not, the
28 // event is not selected and we get out.
29 if (!apply<ALICE::V0AndTrigger>(event,"V0-AND")()) return;
30
31 // Fill in the V0 multiplicity for this event
32 _v0m->fill(apply<ALICE::V0MMultiplicity>(event,"V0M")());
33 }
34
35
36 void finalize() {
37 _v0m->normalize();
38 _imp->normalize();
39 }
40
41
42 Histo1DPtr _v0m;
43 Histo1DPtr _imp;
44 };
45
46
47 // The hook for the plugin system
48 RIVET_DECLARE_PLUGIN(ALICE_2015_PPCentrality);
49
50}
|