Rivet analyses referenceH1_1998_I477556Charged-particle photoproduction analysisExperiment: H1 (HERA Run I) Inspire ID: 477556 Status: UNVALIDATED Authors:
Beam energies: (820.0, 12.2) GeV Run details:
H1 photoproduction of charged particles from proton--positron collisions at beam energies of 820 GeV on 27.5 GeV. Notice that the flux factor has been divided out and this is for p+gamma at the average energy for proton-photon system. Source code: H1_1998_I477556.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4#include "Rivet/Projections/ChargedFinalState.hh"
5
6namespace Rivet {
7
8
9 /// @brief H1 charged particle photoproduction
10 class H1_1998_I477556 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(H1_1998_I477556);
15
16 /// @name Analysis methods
17 //@{
18
19 // Book projections and histograms
20 void init() {
21
22 // Acceptance
23 const FinalState fs(Cuts::abseta < 1 && Cuts::pT > 2*GeV);
24 const ChargedFinalState cfs(fs);
25 declare(cfs, "CFS");
26
27 // Table 1, pT spectra
28 book(_h_ch_pT, 1, 1, 1);
29 // Table 2, eta distributions with different pT cuts.
30 book(_h_ch_eta[0], 2, 1, 1);
31 book(_h_ch_eta[1], 2, 1, 2);
32 }
33
34 // Do the analysis
35 void analyze(const Event& event) {
36
37 // Loop over charged particles and fill histograms.
38 const Particles& particles = apply<FinalState>(event, "CFS").particles();
39 for (const Particle& p : particles) {
40
41 // Cross section for dsigma/dpt^2deta but as a function of pT.
42 // Use the conversion factor as a weight.
43 _h_ch_pT->fill(p.pt()/GeV, 1.0 / (2*p.pt()/GeV));
44 _h_ch_eta[0]->fill(p.eta());
45 if (p.pt() > 3. * GeV) _h_ch_eta[1]->fill(p.eta());
46 }
47 }
48
49 // Finalize
50 void finalize() {
51 const double sf = crossSection()/nanobarn/sumOfWeights();
52 // For d^2sigma/dpT^2deta scale with eta bin width.
53 scale(_h_ch_pT, 0.5 * sf);
54 scale(_h_ch_eta, sf);
55 }
56
57 //@}
58
59
60 private:
61
62 /// @name Histograms
63 //@{
64 Histo1DPtr _h_ch_pT, _h_ch_eta[2];
65 //@}
66
67 };
68
69 RIVET_DECLARE_PLUGIN(H1_1998_I477556);
70
71}
|