rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

LHCB_2013_I1215607

$B_s^0$ fraction at 7 TeV
Experiment: LHCB (LHC)
Inspire ID: 1215607
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References:
  • JHEP 04 (2013) 001
Beams: p+ p+
Beam energies: (3500.0, 3500.0) GeV
Run details:
  • bottom hadron production

Measurement of the fraction of $B_s^0$ production at 7 TeV by the LHCb collaboration.

Source code: LHCB_2013_I1215607.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/UnstableParticles.hh"
 4
 5namespace Rivet {
 6
 7
 8  /// @brief B_s fracion at 7 TeV
 9  class LHCB_2013_I1215607 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(LHCB_2013_I1215607);
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 ix=0;ix<2;++ix) {
23      	book(_h_pT[ix],"TMP/h_pT_"+toString(ix),refData(1,1,1));
24	book(_h_y [ix],"TMP/h_y_" +toString(ix),refData(2,1,1));
25      }
26    }
27
28
29    /// Perform the per-event analysis
30    void analyze(const Event& event) {
31      // Final state of unstable particles to get particle spectra
32      const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
33      // loop over onium states
34      for( const Particle & p : ufs.particles(Cuts::abspid==531 || Cuts::abspid==511)) {
35      	// skip copies due mixing
36      	if(p.children().size()==1 && p.children()[0].abspid()==p.abspid()) continue;
37      	double eta=p.abseta();
38      	if(eta<2. || eta>5.) continue;
39      	double pT = p.perp();
40      	if(pT<1.5 || pT>40.) continue;
41      	if(p.abspid()==531) {
42      	  _h_pT[0]->fill(pT);
43      	  _h_y[0]->fill(eta);
44      	}
45      	else {
46      	  _h_pT[1]->fill(pT);
47      	  _h_y[1]->fill(eta);
48      	}
49      }
50    }
51
52
53    /// Normalise histograms etc., after the run
54    void finalize() {
55      Estimate1DPtr tmp;
56      book(tmp,1,1,1);
57      divide(_h_pT[0],_h_pT[1],tmp);
58      book(tmp,2,1,1);
59      divide(_h_y [0],_h_y[1],tmp);
60    }
61
62    /// @}
63
64
65    /// @name Histograms
66    /// @{
67    Histo1DPtr _h_pT[2],_h_y[2];
68    /// @}
69
70
71  };
72
73
74  RIVET_DECLARE_PLUGIN(LHCB_2013_I1215607);
75
76}