rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

LHCB_2015_I1316329

Prompt and non-prompt $\eta_c$ production at 7 and 8 TeV
Experiment: LHCB (LHC)
Inspire ID: 1316329
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Eur.Phys.J.C 75 (2015) 7, 311
Beams: p+ p+
Beam energies: (3500.0, 3500.0); (4000.0, 4000.0) GeV
Run details:
  • hadronic events with eta_c production

Measurement of the differential cross section with respect to $p_\perp$ of $\eta_c$ production at 7 and 8 TeV by the LHCb collaboration.

Source code: LHCB_2015_I1316329.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/UnstableParticles.hh"
 4
 5namespace Rivet {
 6
 7
 8  /// @brief eta_c production at 7,8 TeV
 9  class LHCB_2015_I1316329 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(LHCB_2015_I1316329);
14
15
16    /// @name Analysis methods
17    /// @{
18
19    /// Book histograms and initialise projections before the run
20    void init() {
21      declare(UnstableParticles(), "UFS");
22      unsigned int iloc=0;
23      if (isCompatibleWithSqrtS(7000)) {
24	iloc = 1;
25      }
26      else if  (isCompatibleWithSqrtS(8000)) {
27	iloc = 2;
28      }
29      else
30	throw UserError("Centre-of-mass energy of the given input is neither 7 or 8 TeV.");
31      for(unsigned int ix=0;ix<2;++ix) {
32	book(_h_etac[ix],iloc+2*ix,1,1);
33      }
34    }
35
36
37    /// Perform the per-event analysis
38    void analyze(const Event& event) {
39
40      // Final state of unstable particles to get particle spectra
41      const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
42
43      for (const Particle& p : ufs.particles(Cuts::pid==441)) {
44	// prompt/non-prompt
45	bool nonPrompt = p.fromBottom();
46        double absrap = p.absrap();
47        double xp = p.perp();
48	if(absrap>2. && absrap<4.5) {
49	  _h_etac[nonPrompt]->fill(xp);
50	}
51      }
52    }
53
54
55    /// Normalise histograms etc., after the run
56    void finalize() {
57      // 1/2 due rapidity folding +/-
58      double factor = 0.5*crossSection()/nanobarn/sumOfWeights();
59      for(unsigned int ix=0;ix<2;++ix)
60	scale(_h_etac[ix],factor);
61    }
62
63    /// @}
64
65
66    /// @name Histograms
67    /// @{
68    Histo1DPtr _h_etac[2];
69    /// @}
70
71
72  };
73
74
75  RIVET_DECLARE_PLUGIN(LHCB_2015_I1316329);
76
77}