Rivet analyses


title: 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

```c++ // -- C++ --

include "Rivet/Analysis.hh"

include "Rivet/Analyses/MC_CENT_PPB_Projections.hh"

include "Rivet/Tools/Percentile.hh"

namespace Rivet {

class MC_CENT_PPB_ETA : public Analysis { public:

RIVET_DEFAULT_ANALYSIS_CTOR(MC_CENT_PPB_ETA);

/// Book histograms and initialise projections before the run
void init() {

  MSG_INFO("CENT parameter set to " << getOption<string>("cent", "REF"));

  // The centrality projection.
  declareCentrality(MC_SumETFwdPbCentrality(), "MC_CENT_PPB_CALIB", "SumETPb", "CENT");

  // The trigger projection.
  declare(MC_pPbMinBiasTrigger(), "Trigger");

  // The particles to be analysed.
  declare(ChargedFinalState(Cuts::abseta < 2.7 && Cuts::pT > 0.1 * GeV), "CFS");

  // The centrality bins and the corresponding histograms.
  std::vector<std::pair<double, double>> centralityBins = {{0, 1},   {1, 5},   {5, 10},  {10, 20},
                                                           {20, 30}, {30, 40}, {40, 60}, {60, 90}};
  // std::vector< std::tuple<int, int, int> > refData =
  //   { {2, 1, 8}, {2, 1, 7}, {2, 1, 6}, {2, 1, 5},
  //     {2, 1, 4}, {2, 1, 3}, {2, 1, 2}, {2, 1, 1} };
  std::vector<std::tuple<size_t, size_t, size_t>> refData;
  refData.reserve(8);
  for (size_t i = 8; i > 0; --i) {
    refData.push_back(std::tuple<size_t, size_t, size_t>(2, 1, i));
  }

  // The centrality-binned histograms.
  _hEta = book<Histo1D>("CENT", centralityBins, refData);
}


/// Perform the per-event analysis
void analyze(const Event& event) {

  if (!apply<TriggerProjection>(event, "Trigger")()) vetoEvent;

  _hEta->init(event);
  for (const auto& p : apply<ChargedFinalState>(event, "CFS").particles()) _hEta->fill(p.eta());
}


/// Finalize
void finalize() {
  // Scale by the inverse sum of event weights in each centrality bin.
  _hEta->normalizePerEvent();
}

private:

/// The histograms binned in centrality.
Percentile<Histo1D> _hEta;

};

RIVET_DECLARE_PLUGIN(MC_CENT_PPB_ETA);

} ```