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