Rivet analyses referenceBABAR_2021_I1937349Cross section for $e^+e^-\to$ $\pi^+\pi^-\pi^0$ between 0.62 and 3.5 GeVExperiment: BABAR (PEP-II) Inspire ID: 1937349 Status: VALIDATED Authors:
Beam energies: ANY
Measurement of the cross section for $e^+e^-\to \pi^+\pi^-\pi^0$ by BaBar using radiative return for energies between 0.62 and 3.5 GeV. The contribution of the $J/\psi$ has been subtracted. Source code: BABAR_2021_I1937349.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5namespace Rivet {
6
7
8 /// @brief e+e- -> pi+pi-pi0
9 class BABAR_2021_I1937349 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2021_I1937349);
14
15
16 /// @name Analysis methods
17 ///@{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21
22 // Initialise and register projections
23 declare(FinalState(), "FS");
24
25 book(_num3pi, "TMP/num3");
26 }
27
28
29 /// Perform the per-event analysis
30 void analyze(const Event& event) {
31 const FinalState& fs = apply<FinalState>(event, "FS");
32
33 map<long,int> nCount;
34 int ntotal(0);
35 for (const Particle& p : fs.particles()) {
36 nCount[p.pid()] += 1;
37 ++ntotal;
38 }
39 if(ntotal!=3) vetoEvent;
40 if(nCount[-211]==1&&nCount[211]==1&&nCount[111]==1)
41 _num3pi->fill();
42 }
43
44
45 /// Normalise histograms etc., after the run
46 void finalize() {
47 double sigma = _num3pi->val();
48 double error = _num3pi->err();
49 sigma *= crossSection()/ sumOfWeights() /nanobarn;
50 error *= crossSection()/ sumOfWeights() /nanobarn;
51 Scatter2D temphisto(refData(1, 1, 1));
52 Scatter2DPtr mult;
53 book(mult, 1, 1, 1);
54 for (size_t b = 0; b < temphisto.numPoints(); b++) {
55 const double x = temphisto.point(b).x();
56 pair<double,double> ex = temphisto.point(b).xErrs();
57 pair<double,double> ex2 = ex;
58 if(ex2.first ==0.) ex2. first=0.0001;
59 if(ex2.second==0.) ex2.second=0.0001;
60 if (inRange(sqrtS()/GeV, x-ex2.first, x+ex2.second)) {
61 mult->addPoint(x, sigma, ex, make_pair(error,error));
62 }
63 else {
64 mult->addPoint(x, 0., ex, make_pair(0.,.0));
65 }
66 }
67 }
68
69 ///@}
70
71
72 /// @name Histograms
73 ///@{
74 CounterPtr _num3pi;
75 ///@}
76
77
78 };
79
80
81 RIVET_DECLARE_PLUGIN(BABAR_2021_I1937349);
82
83}
|