rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

LHCB_2018_I1674916

Prompt $D_s+/D_s^-$ Asymmetry at 7 and 8 TeV
Experiment: LHCB (LHC)
Inspire ID: 1674916
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • JHEP 08 (2018) 008, 2018
Beams: p+ p+
Beam energies: (3500.0, 3500.0); (4000.0, 4000.0) GeV
Run details:
  • D_s production

Measurement of the production asymmetry for prompt $D_s+/D_s^-$ at 7 and 8 TeV by LHCb. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples.

Source code: LHCB_2018_I1674916.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/FinalState.hh"
 4#include "Rivet/Projections/UnstableParticles.hh"
 5
 6namespace Rivet {
 7
 8
 9  /// @brief D_s asymmetry
10  class LHCB_2018_I1674916 : public Analysis {
11  public:
12
13    /// Constructor
14    RIVET_DEFAULT_ANALYSIS_CTOR(LHCB_2018_I1674916);
15
16
17    /// @name Analysis methods
18    /// @{
19
20    /// Book histograms and initialise projections before the run
21    void init() {
22      // projection
23      declare(UnstableParticles(), "UFS");
24      for(unsigned int ix=0; ix<2; ++ix) {
25        book(_h[ix],{2.,3.,3.5,4.5});
26        for(unsigned int iy=0; iy<3; ++iy) {
27          book(_h[ix]->bin(iy+1),
28               "TMP/h_"+toString(ix+1)+"_"+toString(iy+1),
29               refData(2,1,1+iy));
30          }
31      }
32    }
33
34
35    /// Perform the per-event analysis
36    void analyze(const Event& event) {
37      const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
38      for (const Particle& p : ufs.particles(Cuts::abspid==431) ) {
39        if (p.fromBottom()) continue;
40        const double pT = p.perp();
41        const double y  = p.absrap();
42        const bool anti = p.pid()<0;
43        _h[anti]->fill(y,pT);
44      }
45    }
46
47
48    /// Normalise histograms etc., after the run
49    void finalize() {
50      unsigned int is=0;
51      if (isCompatibleWithSqrtS(7000)) {
52      	is=1;
53      }
54      else if (isCompatibleWithSqrtS(8000)) {
55      	is=2;
56      }
57      else  {
58      	throw Error("Invalid CMS energy for LHCB_2018_I1674916");
59      }
60      // asymmetry
61      for(unsigned int iy=0;iy<3;++iy) {
62        Estimate1DPtr tmp;
63        book(tmp,1+is,1,1+iy);
64        asymm(_h[0]->bin(iy+1),_h[1]->bin(iy+1),tmp);
65      }
66    }
67
68    /// @}
69
70
71    /// @name Histograms
72    /// @{
73    Histo1DGroupPtr _h[2];
74    /// @}
75
76
77  };
78
79
80  RIVET_DECLARE_PLUGIN(LHCB_2018_I1674916);
81
82}