Rivet analyses referenceBELLE_2021_I1748231$B\to K\ell^+\ell^-$ decaysExperiment: BELLE (KEKB) Inspire ID: 1748231 Status: VALIDATED NOHEPDATA SINGLEWEIGHT Authors:
Beam energies: ANY Run details:
Measurement of the flavour separated differential branching ratio and asymmetries in $B\to K\ell^+\ell^-$ decays. Source code: BELLE_2021_I1748231.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4#include "Rivet/Projections/DecayedParticles.hh"
5
6namespace Rivet {
7
8
9 /// @brief B -> K l+ l-
10 class BELLE_2021_I1748231 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BELLE_2021_I1748231);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 // Initialise and register projections
23 UnstableParticles ufs = UnstableParticles(Cuts::abspid==511 or
24 Cuts::abspid==521);
25 declare(ufs, "UFS");
26 DecayedParticles BB(ufs);
27 BB.addStable( 443);
28 BB.addStable(100443);
29 BB.addStable(PID::K0S);
30 declare(BB, "BB");
31 for(unsigned int ix=0;ix<4;++ix)
32 for(unsigned int iy=0;iy<3;++iy) {
33 book(_h_br[ix][iy],1,1+ix,1+iy);
34 book(_h_brB[ix][iy],"TMP/h_br_"+toString(ix)+"_"+toString(iy),refData(1,1+ix,1+iy));
35 }
36 for(unsigned int ix=0;ix<2;++ix)
37 book(_c[ix],"TMP/nB_"+toString(ix+1));
38 }
39
40
41 /// Perform the per-event analysis
42 void analyze(const Event& event) {
43 static const map<PdgId,unsigned int> & mode1 = { { 321,1},{ 13,1}, {-13,1}};
44 static const map<PdgId,unsigned int> & mode1CC = { {-321,1},{ 13,1}, {-13,1}};
45 static const map<PdgId,unsigned int> & mode2 = { { 310,1},{ 13,1}, {-13,1}};
46 static const map<PdgId,unsigned int> & mode3 = { { 321,1},{ 11,1}, {-11,1}};
47 static const map<PdgId,unsigned int> & mode3CC = { {-321,1},{ 11,1}, {-11,1}};
48 static const map<PdgId,unsigned int> & mode4 = { { 310,1},{ 11,1}, {-11,1}};
49 DecayedParticles BB = apply<DecayedParticles>(event, "BB");
50 // loop over particles
51 for(unsigned int ix=0;ix<BB.decaying().size();++ix) {
52 if(BB.decaying()[ix].abspid()==521) _c[0]->fill();
53 else _c[1]->fill();
54 int imode=0;
55 if ((BB.decaying()[ix].pid()>0 && BB.modeMatches(ix,3,mode1)) ||
56 (BB.decaying()[ix].pid()<0 && BB.modeMatches(ix,3,mode1CC))) imode=0;
57 else if (BB.modeMatches(ix,3,mode2)) imode=1;
58 else if ((BB.decaying()[ix].pid()>0 && BB.modeMatches(ix,3,mode3)) ||
59 (BB.decaying()[ix].pid()<0 && BB.modeMatches(ix,3,mode3CC))) imode=2;
60 else if (BB.modeMatches(ix,3,mode4)) imode=3;
61 else continue;
62 int il = imode<2 ? 13 : 11;
63 const Particle & lp = BB.decayProducts()[ix].at(-il)[0];
64 const Particle & lm = BB.decayProducts()[ix].at( il)[0];
65 double qq = (lp.momentum()+lm.momentum()).mass2();
66 for(unsigned int iy=0;iy<3;++iy) {
67 _h_br[imode][iy]->fill(qq);
68 _h_brB[imode][iy]->fill(qq);
69 }
70 }
71 }
72
73
74 /// Normalise histograms etc., after the run
75 void finalize() {
76 // ratio of lifetimes
77 double rLife = 1.078;
78 // normalize BR plots
79 for(unsigned int ix=0;ix<4;++ix) {
80 for(unsigned int iy=0;iy<3;++iy) {
81 if(ix%2==0) {
82 scale(_h_br [ix][iy],1e7/ *_c[0]);
83 scale(_h_brB[ix][iy],1e7/ *_c[0]);
84 }
85 else {
86 scale(_h_br [ix][iy],1e7 / *_c[1]);
87 // KL0 modes 2x needed for isospin stuff
88 scale(_h_brB[ix][iy],2e7*rLife/ *_c[1]);
89 }
90 }
91 }
92 // RK and asymmetry plots
93 for(unsigned int ix=0;ix<3;++ix) {
94 Estimate1DPtr RK;
95 book(RK,3,1,1+ix);
96 divide(_h_brB[0][ix],_h_brB[2][ix],RK);
97 book(RK,3,2,1+ix);
98 divide(_h_brB[1][ix],_h_brB[3][ix],RK);
99 book(RK,3,3,1+ix);
100 for (size_t ibin=1; ibin<_h_brB[1][ix]->numBins()+1; ++ibin) {
101 double num = _h_brB[0][ix]->bin(ibin).sumW() +_h_brB[1][ix]->bin(ibin).sumW();
102 double numErr2 = _h_brB[0][ix]->bin(ibin).sumW2() +_h_brB[1][ix]->bin(ibin).sumW2();
103 double den = _h_brB[2][ix]->bin(ibin).sumW() +_h_brB[3][ix]->bin(ibin).sumW();
104 double denErr2 = _h_brB[2][ix]->bin(ibin).sumW2() +_h_brB[3][ix]->bin(ibin).sumW2();
105 double val(0.),err(0.);
106 if(num>0. && den>0.) {
107 val = num/den;
108 err = val*(numErr2/sqr(num)+denErr2/sqr(den));
109 }
110 RK->bin(ibin).set(val, err);
111 }
112 book(RK,2,1,1+ix);
113 asymm(_h_brB[1][ix],_h_brB[0][ix],RK);
114 book(RK,2,2,1+ix);
115 asymm(_h_brB[3][ix],_h_brB[2][ix],RK);
116 // average plot
117 book(RK,2,3,1+ix);
118 for(unsigned int ibin=1; ibin<_h_brB[1][ix]->numBins()+1; ++ibin) {
119 double term0 = _h_brB[1][ix]->bin(ibin).sumW() +_h_brB[3][ix]->bin(ibin).sumW();
120 double term0Err2 = _h_brB[1][ix]->bin(ibin).sumW2() +_h_brB[3][ix]->bin(ibin).sumW2();
121 double term1 = _h_brB[0][ix]->bin(ibin).sumW() +_h_brB[2][ix]->bin(ibin).sumW();
122 double term1Err2 = _h_brB[0][ix]->bin(ibin).sumW2() +_h_brB[2][ix]->bin(ibin).sumW2();
123 double val(0.),err(0.);
124 if(term0>0. && term1>0.) {
125 val = (term0-term1)/(term0+term1);
126 err = 4.*(sqr(term1)*term0Err2 + sqr(term0)*term1Err2)/pow(term0+term1,4);
127 }
128 RK->bin(ibin).set(val, err);
129 }
130 }
131 }
132
133 /// @}
134
135
136 /// @name Histograms
137 /// @{
138 CounterPtr _c[2];
139 Histo1DPtr _h_br[4][3],_h_brB[4][3];
140 /// @}
141
142
143 };
144
145
146 RIVET_DECLARE_PLUGIN(BELLE_2021_I1748231);
147
148}
|