Rivet analyses referenceBELLE_2015_I1358399Cross section for $B_s^{(*)0}\bar{B}_s^{(*)0}$ at $\sqrt{s}=10.86$ GeVExperiment: BELLE (KEKB) Inspire ID: 1358399 Status: VALIDATED NOHEPDATA Authors:
Beam energies: (5.4, 5.4) GeV
Measurement of the cross section for $B_s^{(*)0}\bar{B}_s^{(*)0}$ at $\sqrt{s}=10.86$ GeV. Source code: BELLE_2015_I1358399.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 e+ e- > B(*)s B(*)s
10 class BELLE_2015_I1358399 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BELLE_2015_I1358399);
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 declare(FinalState(), "FS");
24 declare(UnstableParticles(), "UFS");
25 // histograms
26 book(_h,1,1,1);
27 }
28
29 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
30 for (const Particle &child : p.children()) {
31 if (child.children().empty()) {
32 nRes[child.pid()]-=1;
33 --ncount;
34 }
35 else {
36 findChildren(child,nRes,ncount);
37 }
38 }
39 }
40
41 /// Perform the per-event analysis
42 void analyze(const Event& event) {
43 const FinalState& fs = apply<FinalState>(event, "FS");
44
45 map<long,int> nCount;
46 int ntotal(0);
47 for (const Particle& p : fs.particles()) {
48 nCount[p.pid()] += 1;
49 ++ntotal;
50 }
51 // extract botton hadrons
52 Particles bHadrons=apply<FinalState>(event, "UFS").particles(Cuts::abspid==531 or Cuts::abspid==533);
53 for (unsigned int ix=0;ix<bHadrons.size();++ix) {
54 if (bHadrons[ix].parents()[0].abspid()==531 ||
55 bHadrons[ix].parents()[0].abspid()==533 ) continue;
56 map<long,int> nRes = nCount;
57 int ncount = ntotal;
58 findChildren(bHadrons[ix],nRes,ncount);
59 bool matched=false;
60 for (unsigned int iy=ix+1;iy<bHadrons.size();++iy) {
61 if (bHadrons[iy].parents()[0].abspid()==531 ||
62 bHadrons[iy].parents()[0].abspid()==533 ) continue;
63 map<long,int> nRes2 = nRes;
64 int ncount2 = ncount;
65 findChildren(bHadrons[iy],nRes2,ncount2);
66 if (ncount2!=0) continue;
67 matched=true;
68 for(auto const & val : nRes2) {
69 if(val.second!=0) {
70 matched = false;
71 break;
72 }
73 }
74 if (matched) {
75 _h->fill("10.86"s);
76 break;
77 }
78 }
79 if (matched) break;
80 }
81 }
82
83
84 /// Normalise histograms etc., after the run
85 void finalize() {
86 scale(_h, crossSection()/ sumOfWeights() /picobarn);
87 }
88
89 /// @}
90
91
92 /// @name Histograms
93 /// @{
94 BinnedHistoPtr<string> _h;
95 /// @}
96
97
98 };
99
100
101 RIVET_DECLARE_PLUGIN(BELLE_2015_I1358399);
102
103}
|