Rivet analyses referenceBABAR_2014_I1287920Cross section for $e^+e^-\to$ $K_S^0K_L^0$, $K_S^0K_L^0\pi^+\pi^-$, $K_S^0K_S^0\pi^+\pi^-$, $K_S^0K_S^0K^+K^-$ between 1.06 and 2.2 GeVExperiment: BABAR (PEP-II) Inspire ID: 1287920 Status: VALIDATED Authors:
Beam energies: (0.5, 0.5); (0.6, 0.6); (0.6, 0.6); (0.6, 0.6); (0.6, 0.6); (0.6, 0.6); (0.7, 0.7); (0.7, 0.7); (0.7, 0.7); (0.7, 0.7); (0.7, 0.7); (0.7, 0.7); (0.7, 0.7); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.8, 0.8); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (0.9, 0.9); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (1.0, 1.0); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.1, 1.1); (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.2, 1.2); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.3, 1.3); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.4, 1.4); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.5, 1.5); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.6, 1.6); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.7, 1.7); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.8, 1.8); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (1.9, 1.9); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.0, 2.0); (2.1, 2.1); (2.1, 2.1); (2.2, 2.2); (2.2, 2.2) GeV Run details:
Measurement of the cross section for $e^+e^-\to$ $K_S^0K_L^0$, $K_S^0K_L^0\pi^+\pi^-$, $K_S^0K_S^0\pi^+\pi^-$, $K_S^0K_S^0K^+K^-$ via radiative return, including for energies between 1.06 and 2.2 GeV. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: BABAR_2014_I1287920.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5
6namespace Rivet {
7
8
9 /// @brief e+e- > K0K0 (+pions)
10 class BABAR_2014_I1287920 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2014_I1287920);
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
26 // Book histograms
27 for(unsigned int ix=0;ix<4;++ix) {
28 book(_sigma[ix], 9+ix, 1, 1);
29 for (const string& en : _sigma[ix].binning().edges<0>()) {
30 const double end = std::stod(en)*GeV;
31 if (isCompatibleWithSqrtS(end)) {
32 _ecms[ix] = en;
33 break;
34 }
35 }
36 }
37 if (_ecms[0].empty() && _ecms[1].empty() && _ecms[2].empty() && _ecms[3].empty())
38 MSG_ERROR("Beam energy incompatible with analysis.");
39 }
40
41
42 /// Perform the per-event analysis
43 void analyze(const Event& event) {
44 const FinalState& fs = apply<FinalState>(event, "FS");
45
46 map<long,int> nCount;
47 int ntotal(0);
48 for (const Particle& p : fs.particles()) {
49 nCount[p.pid()] += 1;
50 ++ntotal;
51 }
52
53 if(ntotal==2 && nCount[130]==1 && nCount[310]==1) {
54 if(!_ecms[0].empty()) _sigma[0]->fill(_ecms[0]);
55 }
56 else if( ntotal==4 && nCount[130]==1 && nCount[310]==1 && nCount[211]==1 && nCount[-211]==1) {
57 if(!_ecms[1].empty()) _sigma[1]->fill(_ecms[1]);
58 }
59 else if( ntotal==4 && nCount[310]==2 && nCount[211]==1 && nCount[-211]==1 ) {
60 if(!_ecms[2].empty()) _sigma[2]->fill(_ecms[2]);
61 }
62 else if( ntotal==4 && nCount[310]==2 && nCount[321]==1 && nCount[-321]==1) {
63 if(!_ecms[3].empty()) _sigma[3]->fill(_ecms[3]);
64 }
65 }
66
67
68 /// Normalise histograms etc., after the run
69 void finalize() {
70 double fact = crossSection()/ sumOfWeights() /nanobarn;
71 for(unsigned int ix=0;ix<4;++ix)
72 scale(_sigma[ix],fact);
73 }
74
75 /// @}
76
77
78 /// @name Histograms
79 /// @{
80 BinnedHistoPtr<string> _sigma[4];
81 string _ecms[4];
82 /// @}
83
84
85 };
86
87
88 RIVET_DECLARE_PLUGIN(BABAR_2014_I1287920);
89
90
91}
|