Rivet analyses referenceBELLE_2010_I871475Mass distributions in $B^+\to J/\psi, \psi(2S) +K^+\pi^+\pi^-$Experiment: BELLE (KEKB) Inspire ID: 871475 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY Run details:
Measurement of mass distributions in the decays $B^+\to J/\psi, \psi(2S) +K^+\pi^+\pi^-$. The data were read from the plots in the paper and may not have been corrected for efficiency and resolution, although ther backgrounds given in the paper have been subtracted. Source code: BELLE_2010_I871475.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+ -> J/psi/psi(2S) K+ pi+ pi-
10 class BELLE_2010_I871475 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BELLE_2010_I871475);
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==521);
24 declare(ufs, "UFS");
25 DecayedParticles BP(ufs);
26 BP.addStable(100443);
27 BP.addStable(443);
28 declare(BP, "BP");
29 // histograms
30 vector<double> bins[2] = {{0.60,1.46,2.32,3.18,4.04,4.90},
31 {0.60,1.00,1.40,1.80,2.20,2.60}};
32 for (size_t ix=0; ix<2; ++ix) {
33 book(_c[ix],"TMP/c_"+toString(ix+1));
34 for (size_t iy=0; iy<3; ++iy) {
35 book(_h_all[ix][iy], 1+ix, 1, 1+iy);
36 if (iy>1) continue;
37 book(_h_slice[ix][iy], bins[ix]);
38 for (auto& b : _h_slice[ix][iy]->bins()) {
39 book(b, 3+ix, 1+iy, b.index());
40 }
41 }
42 }
43 }
44
45
46 /// Perform the per-event analysis
47 void analyze(const Event& event) {
48 static const map<PdgId,unsigned int> & mode1 = { { 321,1}, { 211,1}, {-211,1}, { 443,1}};
49 static const map<PdgId,unsigned int> & mode1CC = { {-321,1}, { 211,1}, {-211,1}, { 443,1}};
50 static const map<PdgId,unsigned int> & mode2 = { { 321,1}, { 211,1}, {-211,1}, { 100443,1}};
51 static const map<PdgId,unsigned int> & mode2CC = { {-321,1}, { 211,1}, {-211,1}, { 100443,1}};
52 DecayedParticles BP = apply<DecayedParticles>(event, "BP");
53 // loop over particles
54 for (unsigned int ix=0;ix<BP.decaying().size();++ix) {
55 int imode=-1, sign = 1;
56 if (BP.decaying()[ix].pid()>0 && BP.modeMatches(ix,4,mode1)) {
57 sign=1;
58 imode=0;
59 }
60 else if (BP.decaying()[ix].pid()<0 && BP.modeMatches(ix,4,mode1CC)) {
61 sign=-1;
62 imode=0;
63 }
64 else if (BP.decaying()[ix].pid()>0 && BP.modeMatches(ix,4,mode2)) {
65 sign=1;
66 imode=1;
67 }
68 else if (BP.decaying()[ix].pid()<0 && BP.modeMatches(ix,4,mode2CC)) {
69 sign=-1;
70 imode=1;
71 }
72 else {
73 continue;
74 }
75 const Particle& Kp = BP.decayProducts()[ix].at( 321*sign)[0];
76 const Particle& pip = BP.decayProducts()[ix].at( 211*sign)[0];
77 const Particle& pim = BP.decayProducts()[ix].at(-211*sign)[0];
78 double m2Kpipi = (Kp .momentum()+pip.momentum()+pim.momentum()).mass2();
79 double m2Kpi = (Kp .momentum()+pim.momentum()).mass2();
80 double m2pipi = (pip.momentum()+pim.momentum()).mass2();
81 _h_all[imode][0]->fill(m2Kpipi);
82 _h_all[imode][1]->fill(m2Kpi );
83 _h_all[imode][2]->fill(m2pipi );
84 _h_slice[imode][0]->fill(m2Kpipi, m2Kpi );
85 _h_slice[imode][1]->fill(m2Kpipi, m2pipi);
86 _c[imode]->fill();
87 }
88 }
89
90
91 /// Normalise histograms etc., after the run
92 void finalize() {
93 for (size_t ix=0; ix<2; ++ix) {
94 for (size_t iy=0; iy<3; ++iy) {
95 scale(_h_all[ix][iy], 1./ *_c[ix]);
96 if(iy>1) continue;
97 scale(_h_slice[ix][iy], 1./ *_c[ix]);
98 }
99 }
100 }
101
102 /// @}
103
104
105 /// @name Histograms
106 /// @{
107 Histo1DPtr _h_all[2][3];
108 Histo1DGroupPtr _h_slice[2][2];
109 CounterPtr _c[2];
110 /// @}
111
112
113 };
114
115
116 RIVET_DECLARE_PLUGIN(BELLE_2010_I871475);
117
118}
|