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