Rivet analyses referenceBELLE_2016_I1389855Cross section for $e^+e^-\to h_b(n=1,2)\pi^+\pi^-$ at energies between 10.77 and 11.02 GeVExperiment: BELLE (KEKB) Inspire ID: 1389855 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to h_b(n=1,2)\pi^+\pi^-$ at energies between 10.77 and 11.02 GeV by BELLE. Source code: BELLE_2016_I1389855.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 Add a short analysis description here
10 class BELLE_2016_I1389855 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BELLE_2016_I1389855);
15
16
17 /// @name Analysis methods
18 //@{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 declare(FinalState(), "FS");
23 declare(UnstableParticles(), "UFS");
24 book(_nhb1, "TMP/hb1");
25 book(_nhb2, "TMP/hb2");
26 }
27
28 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
29 for (const Particle &child : p.children()) {
30 if(child.children().empty()) {
31 --nRes[child.pid()];
32 --ncount;
33 }
34 else
35 findChildren(child,nRes,ncount);
36 }
37 }
38
39 /// Perform the per-event analysis
40 void analyze(const Event& event) {
41
42 const FinalState& fs = apply<FinalState>(event, "FS");
43 map<long,int> nCount;
44 int ntotal(0);
45 for (const Particle& p : fs.particles()) {
46 nCount[p.pid()] += 1;
47 ++ntotal;
48 }
49 const FinalState& ufs = apply<FinalState>(event, "UFS");
50 for (const Particle& p : ufs.particles()) {
51 if(p.children().empty()) continue;
52 // find the omega
53 if(p.pid()== 10553|| p.pid()==110553) {
54 map<long,int> nRes = nCount;
55 int ncount = ntotal;
56 findChildren(p,nRes,ncount);
57 // omega pi+pi-
58 if(ncount!=2) continue;
59 bool matched = true;
60 for(auto const & val : nRes) {
61 if(abs(val.first)==211) {
62 if(val.second !=1) {
63 matched = false;
64 break;
65 }
66 }
67 else if(val.second!=0) {
68 matched = false;
69 break;
70 }
71 }
72 if(matched) {
73 if(p.pid()== 10553)
74 _nhb1->fill();
75 else
76 _nhb2->fill();
77 break;
78 }
79 }
80 }
81 }
82
83
84 /// Normalise histograms etc., after the run
85 void finalize() {
86 for(unsigned int ix=3;ix<5;++ix) {
87 double sigma,error;
88 if(ix==3) {
89 sigma = _nhb1->val();
90 error = _nhb1->err();
91 }
92 else {
93 sigma = _nhb2->val();
94 error = _nhb2->err();
95 }
96 sigma *= crossSection()/ sumOfWeights() /picobarn;
97 error *= crossSection()/ sumOfWeights() /picobarn;
98 Scatter2D temphisto(refData(1, 1, ix));
99 Scatter2DPtr mult;
100 book(mult, 1, 1, ix);
101 for (size_t b = 0; b < temphisto.numPoints(); b++) {
102 const double x = temphisto.point(b).x();
103 pair<double,double> ex = temphisto.point(b).xErrs();
104 pair<double,double> ex2 = ex;
105 if(ex2.first ==0.) ex2. first=0.0001;
106 if(ex2.second==0.) ex2.second=0.0001;
107 if (inRange(sqrtS()/MeV, x-ex2.first, x+ex2.second)) {
108 mult->addPoint(x, sigma, ex, make_pair(error,error));
109 }
110 else {
111 mult->addPoint(x, 0., ex, make_pair(0.,.0));
112 }
113 }
114 }
115 }
116 //@}
117
118
119 /// @name Histograms
120 //@{
121 CounterPtr _nhb1,_nhb2;
122 //@}
123
124
125 };
126
127
128 // The hook for the plugin system
129 RIVET_DECLARE_PLUGIN(BELLE_2016_I1389855);
130
131
132}
|