rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

MC_CENT_PPB_ETA

Template analysis for ontaining eta distributions binned in centrality
Experiment: ()
Status: UNVALIDATED
Authors:
  • Leif Lönnblad
References:
  • arXiv: 1508.00848
  • Eur.Phys.J. C76 (2016) no.4, 199
Beams: * *
Beam energies: ANY
Run details:
  • Any!

Template analysis for obtaining eta distributions binned in centrality using the CentralityProjection and Percentile<> classes. The example is pPb collisions at 5 TeV and is based on the ATLAS analysis arXiv:1508.00848 [hep-ex]. The reference YODA file contains the corresponding plots from HepData. The generator should be run in minimum-bias mode with a cut on the transverse momentum of charged particles of 0.1 GeV, and setting particles with tcau>10 fm stable. Note that a calibration histogram for the generated centrality may be preloaded with the output of a corresponding MC_Cent_pPb_Calib analysis.

Source code: MC_CENT_PPB_ETA.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Analyses/MC_CENT_PPB_Projections.hh"
 4#include "Rivet/Tools/Percentile.hh"
 5
 6namespace Rivet {
 7
 8
 9  class MC_CENT_PPB_ETA : public Analysis {
10  public:
11
12    RIVET_DEFAULT_ANALYSIS_CTOR(MC_CENT_PPB_ETA);
13
14    /// Book histograms and initialise projections before the run
15    void init() {
16
17      MSG_INFO("CENT parameter set to " << getOption<string>("cent","REF"));
18
19      // The centrality projection.
20      declareCentrality(MC_SumETFwdPbCentrality(),
21                        "MC_CENT_PPB_CALIB", "SumETPb", "CENT");
22
23      // The trigger projection.
24      declare(MC_pPbMinBiasTrigger(), "Trigger");
25
26      // The particles to be analysed.
27      declare(ChargedFinalState(Cuts::abseta < 2.7 && Cuts::pT > 0.1*GeV), "CFS");
28
29      // The centrality bins and the corresponding histograms.
30      std::vector< std::pair<double, double> > centralityBins =
31        { {0, 1}, {1, 5}, {5, 10}, {10, 20},
32          {20, 30}, {30, 40}, {40, 60}, {60, 90} };
33      // std::vector< std::tuple<int, int, int> > refData =
34      //   { {2, 1, 8}, {2, 1, 7}, {2, 1, 6}, {2, 1, 5},
35      //     {2, 1, 4}, {2, 1, 3}, {2, 1, 2}, {2, 1, 1} };
36      std::vector< std::tuple<size_t, size_t, size_t> > refData;
37      refData.reserve(8);
38      for (size_t i = 8; i > 0; --i ) {
39        refData.push_back(std::tuple<size_t, size_t, size_t>(2, 1, i));
40      }
41
42      // The centrality-binned histograms.
43      _hEta = book<Histo1D>("CENT", centralityBins, refData);
44
45    }
46
47
48    /// Perform the per-event analysis
49    void analyze(const Event& event) {
50
51      if ( !apply<TriggerProjection>(event, "Trigger")() ) vetoEvent;
52
53      _hEta->init(event);
54      for ( const auto &p : apply<ChargedFinalState>(event,"CFS").particles() )
55        _hEta->fill(p.eta());
56    }
57
58
59    /// Finalize
60    void finalize() {
61      // Scale by the inverse sum of event weights in each centrality bin.
62      _hEta->normalizePerEvent();
63    }
64
65
66  private:
67
68    /// The histograms binned in centrality.
69    Percentile<Histo1D> _hEta;
70
71  };
72
73
74  RIVET_DECLARE_PLUGIN(MC_CENT_PPB_ETA);
75
76}