rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

MC_CENT_PPB_CALIB

Template analysis for generating calibration histograms for 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 generating calibration histograms to be used together with 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 experimental centrality calibration, but extracted from the plot in the paper. Note that this has not been unfolded for detector effects.

Source code: MC_CENT_PPB_CALIB.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Analyses/MC_CENT_PPB_Projections.hh"
 4#include "Rivet/Projections/ImpactParameterProjection.hh"
 5
 6namespace Rivet {
 7
 8
 9  /// Generic analysis looking at various distributions of final state particles
10  class MC_CENT_PPB_CALIB : public Analysis {
11  public:
12
13    RIVET_DEFAULT_ANALYSIS_CTOR(MC_CENT_PPB_CALIB);
14
15
16    /// Book histograms and initialise projections before the run
17    void init() {
18
19      // One projection for the actual observable, and one for the
20      // generated impact parameter.
21      declare(MC_SumETFwdPbCentrality(), "Centrality");
22      declare(ImpactParameterProjection(), "IMP");
23      declare(MC_pPbMinBiasTrigger(), "Trigger");
24
25      // The calibrationhistogram:
26      book(_calib, "SumETPb", 100, 0.0, 200.0);
27
28      // If histogram was pre-loaded, the calibration is done.
29      _done = ( _calib->numEntries() > 0 );
30
31      // The alternative histogram based on impact parameter. Note that
32      // it MUST be named the same as the histogram for the experimental
33      // observable with an added _IMP suffix for the Pecentile<>
34      // binning to work properly.
35      book(_impcalib, "SumETPb_IMP", 400, 0.0, 20.0);
36
37
38    }
39
40    /// Perform the per-event analysis
41    void analyze(const Event& event) {
42
43      if ( _done ) return;
44
45      // The alternative centrality based on generated impact
46      // parameter, assumes that the generator does not describe the
47      // full final state, and should therefore be filled even if the
48      // event is not triggered.
49      _impcalib->fill(apply<SingleValueProjection>(event, "IMP")());
50
51      if ( !apply<TriggerProjection>(event, "Trigger")() ) vetoEvent;
52
53      _calib->fill(apply<SingleValueProjection>(event, "Centrality")());
54
55    }
56
57    /// Finalize
58    void finalize() {
59
60      _calib->normalize();
61      _impcalib->normalize();
62
63    }
64
65  private:
66
67    /// The calibration histograms.
68    Histo1DPtr _calib;
69    Histo1DPtr _impcalib;
70
71    /// Safeguard from adding to a pre-loaded histogram.
72    bool _done;
73
74  };
75
76
77  RIVET_DECLARE_PLUGIN(MC_CENT_PPB_CALIB);
78
79}