rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

LHCB_2017_I1630633

$B^\pm$ meson production at 7 and 13 TeV
Experiment: LHCB (LHC)
Inspire ID: 1630633
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References:
  • JHEP 12 (2017) 026
Beams: p+ p+
Beam energies: (3500.0, 3500.0); (6500.0, 6500.0) GeV
Run details:
  • hadronic events with B+ mesons

Measurement of the double differential (in $p_\perp$ and $y$) cross section for $B^\pm$ meson production at 7 and 13 TeV by the LHCb collaboration. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Source code: LHCB_2017_I1630633.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/UnstableParticles.hh"
 4
 5namespace Rivet {
 6
 7
 8  /// @brief B+ cross section at 7 and 13 TeV
 9  class LHCB_2017_I1630633 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(LHCB_2017_I1630633);
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      int iloc=-1;
23      if (isCompatibleWithSqrtS(7000)) {
24	iloc = 0;
25      }
26      else if  (isCompatibleWithSqrtS(13000)) {
27	iloc = 1;
28      }
29      else
30	throw UserError("Centre-of-mass energy of the given input is neither 7 or 13 TeV.");
31      book(_h_B,{2.0,2.5,3.0,3.5,4.0,4.5});
32      for(unsigned int iy=0;iy<5;++iy)
33        book(_h_B->bin(iy+1),1+iloc,1,1+iy);
34      book(_h_pT,3,1,1+iloc);
35      book(_h_y ,4,1,1+iloc);
36    }
37
38
39    /// Perform the per-event analysis
40    void analyze(const Event& event) {
41      // Final state of unstable particles to get particle spectra
42      const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
43      for (const Particle& p : ufs.particles(Cuts::pid==521)) {
44        double absrap = p.absrap();
45	if(absrap<2. || absrap>4.5) continue;
46        double pT = p.perp();
47	if(pT>40.) continue;
48	_h_B ->fill(absrap,pT);
49	_h_pT->fill(pT);
50	_h_y ->fill(absrap);
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      scale(_h_B,factor);
60      divByGroupWidth(_h_B);
61      scale(_h_pT,factor);
62      scale(_h_y ,factor/1000.);
63    }
64
65    /// @}
66
67
68    /// @name Histograms
69    /// @{
70    Histo1DGroupPtr _h_B;
71    Histo1DPtr _h_pT,_h_y;
72    /// @}
73
74
75  };
76
77
78  RIVET_DECLARE_PLUGIN(LHCB_2017_I1630633);
79
80}