rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

LHCB_2015_I1391511

J/$\psi$ production at 13 TeV
Experiment: LHCB (LHC)
Inspire ID: 1391511
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • JHEP 10 (2015) 172, 2015.
Beams: p+ p+
Beam energies: (6500.0, 6500.0) GeV
Run details:
  • J/psi production

Measurement of the double differential (in $p_\perp$ and $y$) cross section for $J/\psi$ production at 13 TeV by the LHCB collaboration.

Source code: LHCB_2015_I1391511.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/UnstableParticles.hh"
 4
 5namespace Rivet {
 6
 7
 8  /// @brief  J/psi production at 13 TeV
 9  class LHCB_2015_I1391511 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(LHCB_2015_I1391511);
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<3;++ix) {
23        book(_h_Jpsi[ix],{2.0,2.5,3.0,3.5,4.0,4.5});
24        for(unsigned int iy=0;iy<5;++iy) {
25          if(ix<2)
26            book(_h_Jpsi[ix]->bin(iy+1),1+ix,1,iy+1);
27          else
28            book(_h_Jpsi[ix]->bin(iy+1),"TMP/Jpsi_"+toString(iy),refData(3,1,iy+1));
29	}
30      }
31      for(unsigned int ix=0;ix<2;++ix) {
32	book(_h_pT[ix],4+ix,1,1);
33	book(_h_y [ix],6+ix,1,1);
34      }
35    }
36
37
38    /// Perform the per-event analysis
39    void analyze(const Event& event) {
40      // Final state of unstable particles to get particle spectra
41      const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
42      // J/psi
43      for (const Particle& p : ufs.particles(Cuts::pid==443)) {
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 ||  xp>14.) continue;
49	_h_Jpsi[nonPrompt]->fill(absrap,xp);
50	_h_Jpsi[2        ]->fill(absrap,xp);
51	_h_pT[nonPrompt  ]->fill(xp);
52	_h_y [nonPrompt  ]->fill(absrap);
53      }
54    }
55
56
57    /// Normalise histograms etc., after the run
58    void finalize() {
59      // 1/2 due rapidity folding +/-
60      double factor = 0.5*crossSection()/nanobarn/sumOfWeights();
61      for(unsigned int ix=0;ix<3;++ix) {
62        scale(_h_Jpsi[ix],factor);
63        divByGroupWidth(_h_Jpsi[ix]);
64      }
65      Estimate1DPtr tmp;
66      for(unsigned int ix=0;ix<_h_Jpsi[1]->numBins();++ix) {
67	book(tmp,3,1,1+ix);
68	divide(_h_Jpsi[1]->bin(ix+1),_h_Jpsi[2]->bin(ix+1),tmp);
69	tmp->scale(100.);
70      }
71      for(unsigned int ix=0;ix<2;++ix) {
72	scale(_h_pT[ix],factor);
73	scale(_h_y [ix],factor*1e-3);
74      }
75    }
76
77    /// @}
78
79
80    /// @name Histograms
81    /// @{
82    Histo1DGroupPtr _h_Jpsi[3];
83    Histo1DPtr _h_pT[2],_h_y[2];
84    /// @}
85
86
87  };
88
89
90  RIVET_DECLARE_PLUGIN(LHCB_2015_I1391511);
91
92}