rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

LHCB_2013_I1238809

B meson production at 7 TeV
Experiment: LHCB (LHC)
Inspire ID: 1238809
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • JHEP 08 (2013) 117
Beams: p+ p+
Beam energies: (3500.0, 3500.0) GeV
Run details:
  • hadronic events with B meson

Measurement of the double differential (in $p_\perp$ and $y$) cross section for B meson production at 7 TeV by the LHCb collaboration.

Source code: LHCB_2013_I1238809.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/UnstableParticles.hh"
 4
 5namespace Rivet {
 6
 7
 8  /// @brief B meson production at 7 TeV
 9  class LHCB_2013_I1238809 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(LHCB_2013_I1238809);
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      for(unsigned int ib=0;ib<3;++ib) {
23	book(_h_sigma[ib],1,1,1+ib);
24	book(_h_pT[ib]   ,5+ib,1,1);
25	book(_h_y [ib]   ,8+ib,1,1);
26        book(_h_B[ib],{2.0,2.5,3.0,3.5,4.0,4.5});
27	for(unsigned int iy=0;iy<5;++iy) {
28	  book(_h_B[ib]->bin(iy+1),2+ib,1,1+iy);
29	}
30      }
31    }
32
33
34    /// Perform the per-event analysis
35    void analyze(const Event& event) {
36      // Final state of unstable particles to get particle spectra
37      const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
38      for (const Particle& p : ufs.particles(Cuts::pid==511 or Cuts::pid==521 or Cuts::pid==531 )) {
39        double absrap = p.absrap();
40	if(absrap<2. || absrap>4.5) continue;
41	unsigned int ib=(p.pid()%100)/10-1;
42        double pT = p.perp();
43	if(pT>40.) continue;
44	_h_sigma[ib]->fill(round(sqrtS()));
45	_h_B[ib]->fill(absrap,pT);
46	_h_pT[ib]->fill(pT);
47	_h_y[ib]->fill(absrap);
48      }
49    }
50
51
52    /// Normalise histograms etc., after the run
53    void finalize() {
54      // 1/2 due rapidity folding +/-
55      double factor = 0.5*crossSection()/microbarn/sumOfWeights();
56      for(unsigned int ib=0;ib<3;++ib) {
57	scale(_h_B[ib],factor);
58        divByGroupWidth(_h_B[ib]);
59	scale(_h_sigma[ib],factor);
60	scale(_h_y    [ib],factor);
61	scale(_h_pT   [ib],factor);
62      }
63    }
64
65    /// @}
66
67
68    /// @name Histograms
69    /// @{
70    BinnedHistoPtr<int> _h_sigma[3];
71    Histo1DGroupPtr _h_B[3];
72    Histo1DPtr _h_pT[3],_h_y[3];
73    /// @}
74
75
76  };
77
78
79  RIVET_DECLARE_PLUGIN(LHCB_2013_I1238809);
80
81}