Rivet Analyses Reference

MC_Cent_pPb_Eta

Template analysis for ontaining eta distributions binned in centrality
Experiment: ()
Status: UNVALIDATED
Authors:
  • Leif Lönnblad
References: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
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Analyses/MC_Cent_pPb.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::eta > -2.7 && Cuts::eta < 2.7 &&
                              Cuts::pT > 0.1*GeV), "CFS");
    
    // The centrality bins and the corresponding histograms.
    std::vector< std::pair<float, float> > 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<int, int, int> > refData;
    for ( int i = 8; i > 0; --i )
      refData.push_back(std::tuple<int, int, int>(2, 1, i));

    // The centrality-binned histograms.
    _hEta = bookPercentile<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;

};


// The hook for the plugin system
RIVET_DECLARE_PLUGIN(MC_Cent_pPb_Eta);

}