Rivet analyses referenceMC_Cent_pPb_CalibTemplate analysis for generating calibration histograms for centralityExperiment: () Status: UNVALIDATED Authors:
Beam energies: ANY Run details:
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.hh"
4#include "Rivet/Projections/ImpactParameterProjection.hh"
5
6namespace Rivet {
7
8
9/// Generic analysis looking at various distributions of final state particles
10class MC_Cent_pPb_Calib : public Analysis {
11
12public:
13
14 RIVET_DEFAULT_ANALYSIS_CTOR(MC_Cent_pPb_Calib);
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
65private:
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// The hook for the plugin system
78RIVET_DECLARE_PLUGIN(MC_Cent_pPb_Calib);
79
80}
|