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: ANY 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 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 book(_nKSKL , "TMP/nKSKL");
28 book(_nKSKLpipi, "TMP/nKSKLpipi");
29 book(_nKSKSpipi, "TMP/nKSKSpipi");
30 book(_nKSKSKpKm, "TMP/nKSKSKpKm");
31 }
32
33
34 /// Perform the per-event analysis
35 void analyze(const Event& event) {
36 const FinalState& fs = apply<FinalState>(event, "FS");
37
38 map<long,int> nCount;
39 int ntotal(0);
40 for (const Particle& p : fs.particles()) {
41 nCount[p.pid()] += 1;
42 ++ntotal;
43 }
44
45 if(ntotal==2 && nCount[130]==1 && nCount[310]==1)
46 _nKSKL->fill();
47 else if( ntotal==4 && nCount[130]==1 && nCount[310]==1 && nCount[211]==1 && nCount[-211]==1)
48 _nKSKLpipi->fill();
49 else if( ntotal==4 && nCount[310]==2 && nCount[211]==1 && nCount[-211]==1 )
50 _nKSKSpipi->fill();
51 else if( ntotal==4 && nCount[310]==2 && nCount[321]==1 && nCount[-321]==1)
52 _nKSKSKpKm->fill();
53
54 }
55
56
57 /// Normalise histograms etc., after the run
58 void finalize() {
59
60 for(unsigned int ix=9;ix<13;++ix) {
61 double sigma = 0., error = 0.;
62 if(ix==9) {
63 sigma = _nKSKL->val();
64 error = _nKSKL->err();
65 }
66 else if(ix==10) {
67 sigma = _nKSKLpipi->val();
68 error = _nKSKLpipi->err();
69 }
70 else if(ix==11) {
71 sigma = _nKSKSpipi->val();
72 error = _nKSKSpipi->err();
73 }
74 else if(ix==12) {
75 sigma = _nKSKSKpKm->val();
76 error = _nKSKSKpKm->err();
77 }
78 sigma *= crossSection()/ sumOfWeights() /nanobarn;
79 error *= crossSection()/ sumOfWeights() /nanobarn;
80 Estimate1DPtr mult;
81 book(mult, ix, 1, 1);
82 for (auto& b : mult->bins()) {
83 if (inRange(sqrtS()/GeV, b.xMin(), b.xMax())) {
84 b.set(sigma, error);
85 }
86 }
87 }
88 }
89
90 /// @}
91
92
93 /// @name Histograms
94 /// @{
95 CounterPtr _nKSKL,_nKSKLpipi,_nKSKSpipi,_nKSKSKpKm;
96 /// @}
97
98
99 };
100
101
102 RIVET_DECLARE_PLUGIN(BABAR_2014_I1287920);
103
104
105}
|