Rivet analyses referenceBELLE_2007_I756012Cross section for $e^+e^-\to J\psi\pi^+\pi^-$ at energies between 3.8 and 5.5 GeVExperiment: BELLE (KEKB) Inspire ID: 756012 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the cross section for $e^+e^-\to J\psi\pi^+\pi^-$ at energies between 3.8 and 5.5 GeV using radiative return by BELLE. Source code: BELLE_2007_I756012.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_2007_I756012 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BELLE_2007_I756012);
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(_nJPsi, "TMP/jpsi");
25 }
26
27 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
28 for (const Particle &child : p.children()) {
29 if(child.children().empty()) {
30 --nRes[child.pid()];
31 --ncount;
32 }
33 else
34 findChildren(child,nRes,ncount);
35 }
36 }
37
38 /// Perform the per-event analysis
39 void analyze(const Event& event) {
40 const FinalState& fs = apply<FinalState>(event, "FS");
41 map<long,int> nCount;
42 int ntotal(0);
43 for (const Particle& p : fs.particles()) {
44 nCount[p.pid()] += 1;
45 ++ntotal;
46 }
47 const FinalState& ufs = apply<FinalState>(event, "UFS");
48 for (const Particle& p : ufs.particles()) {
49 if(p.children().empty()) continue;
50 if(p.pid()!=443) continue;
51 // find the J/psi
52 map<long,int> nRes = nCount;
53 int ncount = ntotal;
54 findChildren(p,nRes,ncount);
55 // J/psi pi+pi-
56 if(ncount!=2) continue;
57 bool matched = true;
58 for(auto const & val : nRes) {
59 if(abs(val.first)==211) {
60 if(val.second !=1) {
61 matched = false;
62 break;
63 }
64 }
65 else if(val.second!=0) {
66 matched = false;
67 break;
68 }
69 }
70 if(matched) {
71 _nJPsi->fill();
72 break;
73 }
74 }
75 }
76
77
78 /// Normalise histograms etc., after the run
79 void finalize() {
80 double sigma = _nJPsi->val();
81 double error = _nJPsi->err();
82 sigma *= crossSection()/ sumOfWeights() /picobarn;
83 error *= crossSection()/ sumOfWeights() /picobarn;
84 Scatter2D temphisto(refData(1, 1, 1));
85 Scatter2DPtr mult;
86 book(mult, 1, 1, 1);
87 for (size_t b = 0; b < temphisto.numPoints(); b++) {
88 const double x = temphisto.point(b).x();
89 pair<double,double> ex = temphisto.point(b).xErrs();
90 pair<double,double> ex2 = ex;
91 if(ex2.first ==0.) ex2. first=0.0001;
92 if(ex2.second==0.) ex2.second=0.0001;
93 if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
94 mult->addPoint(x, sigma, ex, make_pair(error,error));
95 }
96 else {
97 mult->addPoint(x, 0., ex, make_pair(0.,.0));
98 }
99 }
100 }
101
102 //@}
103
104
105 /// @name Histograms
106 //@{
107 CounterPtr _nJPsi;
108 //@}
109
110
111 };
112
113
114 // The hook for the plugin system
115 RIVET_DECLARE_PLUGIN(BELLE_2007_I756012);
116
117
118}
|