Rivet analyses referenceLHCF_2012_I1115479Measurement of forward neutral pion transverse momentum spectra for $\sqrt{s}$ = 7 TeV proton-proton collisions at LHCExperiment: LHCF (LHC) Inspire ID: 1115479 Status: VALIDATED Authors:
Beam energies: (3500.0, 3500.0) GeV Run details:
The inclusive production rate of neutral pions has been measured by LHCf experiment during $\sqrt{s}=7$ TeV pp collision operation in early 2010. In order to ensure good event reconstruction efficiency, the range of the $\pi^0$ rapidity and $p_\perp$ are limited to $8.9 < y < 11.0$ and $p_\perp < 0.6$ GeV, respectively. Source code: LHCF_2012_I1115479.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4#include "Rivet/Tools/BinnedHistogram.hh"
5
6namespace Rivet {
7
8
9 class LHCF_2012_I1115479 : public Analysis {
10 public:
11
12 LHCF_2012_I1115479()
13 : Analysis("LHCF_2012_I1115479")
14 { }
15
16
17 public:
18
19 void init() {
20 declare(UnstableParticles(),"UFS");
21
22 {Histo1DPtr tmp; _binnedHistos_y_pT.add( 8.9, 9.0, book(tmp, 1, 1, 1));}
23 {Histo1DPtr tmp; _binnedHistos_y_pT.add( 9.0, 9.2, book(tmp, 2, 1, 1));}
24 {Histo1DPtr tmp; _binnedHistos_y_pT.add( 9.2, 9.4, book(tmp, 3, 1, 1));}
25 {Histo1DPtr tmp; _binnedHistos_y_pT.add( 9.4, 9.6, book(tmp, 4, 1, 1));}
26 {Histo1DPtr tmp; _binnedHistos_y_pT.add( 9.6, 10.0, book(tmp, 5, 1, 1));}
27 {Histo1DPtr tmp; _binnedHistos_y_pT.add(10.0, 11.0, book(tmp, 6, 1, 1));}
28 }
29
30
31 void analyze(const Event& event) {
32 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
33
34 const double dphi = TWOPI;
35
36 for (const Particle& p : ufs.particles()) {
37 if (p.pid() == 111) {
38 double pT = p.pT();
39 double y = p.rapidity();
40
41 if (pT > 0.6*GeV) continue;
42
43 const double scaled_weight = 1.0/(dphi*pT/GeV);
44 _binnedHistos_y_pT.fill(y, pT/GeV, scaled_weight);
45 }
46 }
47 }
48
49
50 void finalize() {
51 _binnedHistos_y_pT.scale( 1./sumOfWeights() , this);
52 }
53
54 private:
55
56 BinnedHistogram _binnedHistos_y_pT;
57
58 };
59
60
61 // The hook for the plugin system
62 RIVET_DECLARE_PLUGIN(LHCF_2012_I1115479);
63
64}
|