rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

LHCB_2011_I891233

Differential cross sections for $J/\psi$ production at 7 TeV
Experiment: LHCB (LHC)
Inspire ID: 891233
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Eur.Phys.J.C 71 (2011) 1645
Beams: p+ p+
Beam energies: (3500.0, 3500.0) GeV
Run details:
  • hadronic events with Jpsi production

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

Source code: LHCB_2011_I891233.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 7 TeV
 9  class LHCB_2011_I891233 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(LHCB_2011_I891233);
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<5;++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<4)
26            book(_h_Jpsi[ix]->bin(iy+1),6+ix,1,iy+1);
27          else
28            book(_h_Jpsi[ix]->bin(iy+1),"TMP/JPsi_"+toString(iy),refData(6,1,iy+1));
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      // J/psi
39      for (const Particle& p : ufs.particles(Cuts::pid==443)) {
40	// prompt/non-prompt
41	bool nonPrompt = p.fromBottom();
42        double absrap = p.absrap();
43        double xp = p.perp();
44	if(absrap<2. || absrap>4.5 ||  xp>14.) continue;
45        _h_Jpsi[4]->fill(absrap,xp);
46	if(nonPrompt) {
47	  _h_Jpsi[1]->fill(absrap,xp);
48	}
49	else {
50	  _h_Jpsi[0]->fill(absrap,xp);
51	  _h_Jpsi[2]->fill(absrap,xp);
52	  _h_Jpsi[3]->fill(absrap,xp);
53	}
54      }
55    }
56
57
58    /// Normalise histograms etc., after the run
59    void finalize() {
60      // 1/2 due rapidity folding +/-
61      double factor = 0.5*crossSection()/nanobarn/sumOfWeights();
62      for(unsigned int ix=0;ix<5;++ix) {
63	scale(_h_Jpsi[ix],factor);
64        divByGroupWidth(_h_Jpsi[ix]);
65      }
66      for(unsigned int ix=0;ix<_h_Jpsi[4]->numBins();++ix) {
67	Estimate1DPtr tmp;
68	book(tmp,10,1,ix+1);
69	divide(_h_Jpsi[1]->bin(ix+1),_h_Jpsi[4]->bin(ix+1),tmp);
70	tmp->scale(100.);
71      }
72    }
73
74    /// @}
75
76
77    /// @name Histograms
78    /// @{
79    Histo1DGroupPtr _h_Jpsi[5];
80    /// @}
81
82
83  };
84
85
86  RIVET_DECLARE_PLUGIN(LHCB_2011_I891233);
87
88}