Rivet analyses referenceLHCB_2019_I1760257Ratio of strange to non-strange B meson production at 7,8 and 13 TeVExperiment: LHCB (LHC) Inspire ID: 1760257 Status: VALIDATED NOHEPDATA Authors:
Beam energies: (3500.0, 3500.0); (4000.0, 4000.0); (6500.0, 6500.0) GeV Run details:
Ratio of strange to non-strange B meson production at 7,8 and 13 TeV. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: LHCB_2019_I1760257.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief strange fraction at 7,8,13 TeV
9 class LHCB_2019_I1760257 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(LHCB_2019_I1760257);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 // projection
22 declare(UnstableParticles(), "UFS");
23 //histograms
24 for(unsigned int ix=0;ix<2;++ix) {
25 book(_c_B[ix],"TMP/c_B_"+toString(ix+1),
26 refData<YODA::BinnedEstimate<string> >(1,1,1));
27 book(_h_pT[ix],"TMP/h_pT_"+toString(ix+1),refData(5,1,1));
28 for(unsigned int iy=0;iy<3;++iy) {
29 book(_h_pL[ix][iy],"TMP/h_pL_"+toString(ix+1)+"_"+toString(iy+1),refData(3,1,1+iy));
30 }
31 for(unsigned int iy=0;iy<5;++iy) {
32 book(_h_kin[ix][iy],"TMP/h_kin_"+toString(ix+1)+"_"+toString(iy+1),refData(4,1,1+iy));
33 }
34 }
35 if (isCompatibleWithSqrtS(7000)) _ie=0;
36 else if (isCompatibleWithSqrtS(8000)) _ie=1;
37 else if (isCompatibleWithSqrtS(13000)) _ie=2;
38 else {
39 throw Error("Invalid CMS energy for LHCB_2019_I1760257");
40 }
41 }
42
43
44 /// Perform the per-event analysis
45 void analyze(const Event& event) {
46 if (_edges.empty()) _edges = _c_B[0]->xEdges();
47 for( const Particle& p : apply<UnstableParticles>(event, "UFS").particles(Cuts::abspid==521 or
48 Cuts::abspid==531)) {
49 // kinematic region
50 // rapidity cuts
51 double y = p.rapidity(), eta = p.eta();
52 if(y<2. || y> 4.5 || eta<2. || eta>6.5) continue;
53 // momentum cuts
54 double pT = p.perp(), pL = p.momentum().z(), pTot=p.momentum().p3().mod();
55 if(pT<0.5 || pT>40. || pTot<20. || pTot>700. || pL<20. || pL>700.) continue;
56 // type of meson
57 unsigned int imeson = (p.abspid()%100)/10 - 2;
58 _c_B [imeson]->fill(_edges[_ie]);
59 if(_ie==2) _c_B [imeson]->fill(_edges[3]);
60 _h_pT[imeson]->fill(pT);
61 if (pL<75.) _h_pL[imeson][0]->fill(pT);
62 else if (pL<125.) _h_pL[imeson][1]->fill(pT);
63 else if (pL<700.) _h_pL[imeson][2]->fill(pT);
64 _h_kin[imeson][0]->fill(pTot);
65 _h_kin[imeson][1]->fill(pL );
66 _h_kin[imeson][2]->fill(pT );
67 _h_kin[imeson][3]->fill(eta );
68 _h_kin[imeson][4]->fill(y );
69 }
70 }
71
72
73 /// Normalise histograms etc., after the run
74 void finalize() {
75 // ratio of branching ratios from PDSG 2020
76 double brRatio = 1.08e-3/1.02e-3;
77 for(unsigned int iy=0;iy<5;++iy) {
78 Estimate1DPtr tmp;
79 book(tmp,4,1,iy+1);
80 divide(_h_kin[1][iy],_h_kin[0][iy],tmp);
81 tmp->scale(brRatio);
82 if(iy>=3) continue;
83 book(tmp,3,1,iy+1);
84 divide(_h_pL [1][iy],_h_pL [0][iy],tmp);
85 tmp->scale(brRatio);
86 }
87 Estimate1DPtr tmp;
88 book(tmp,5,1,1+_ie);
89 divide(_h_pT[1],_h_pT[0],tmp);
90 tmp->scale(brRatio);
91 // ratio
92 BinnedEstimatePtr<string> ratio;
93 book(ratio,1,1,1);
94 divide(_c_B[1],_c_B[0],ratio);
95 ratio->scale(brRatio);
96 }
97
98 /// @}
99
100
101 /// @name Histograms
102 /// @{
103 size_t _ie;
104 vector<string> _edges;
105 BinnedHistoPtr<string> _c_B[2];
106 Histo1DPtr _h_pL[2][3],_h_kin[2][5];
107 Histo1DPtr _h_pT[2];
108 /// @}
109
110 };
111
112
113 RIVET_DECLARE_PLUGIN(LHCB_2019_I1760257);
114
115}
|