Rivet analyses referenceSND_2001_I533574Cross section for $e^+e^-\to$ $K^+K^-$, $K_S^0K_L^0$ and $\pi^+\pi^-\pi^0$ near the $\phi$ resonanceExperiment: SND (VEPP-2M) Inspire ID: 533574 Status: VALIDATED Authors:
Beam energies: ANY Run details:
1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4
5
6namespace Rivet {
7
8
9 /// @brief Add a short analysis description here
10 class SND_2001_I533574 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(SND_2001_I533574);
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 book(_nKpKm, "TMP/KpKm");
26 book(_nK0K0, "TMP/K0K0");
27 book(_n3pi, "TMP/3pi");
28 }
29
30
31 /// Perform the per-event analysis
32 void analyze(const Event& event) {
33 const FinalState& fs = apply<FinalState>(event, "FS");
34
35 map<long,int> nCount;
36 int ntotal(0);
37 for (const Particle& p : fs.particles()) {
38 nCount[p.pid()] += 1;
39 ++ntotal;
40 }
41 if(ntotal==2) {
42 if(nCount[321]==1 && nCount[-321]==1)
43 _nKpKm->fill();
44 else if(nCount[130]==1 && nCount[310]==1)
45 _nK0K0->fill();
46 }
47 else if(ntotal==3 && nCount[211] == 1 && nCount[-211] == 1 && nCount[111] == 1)
48 _n3pi->fill();
49
50 }
51
52
53 /// Normalise histograms etc., after the run
54 void finalize() {
55 for (unsigned int iy=1;iy<3;++iy) {
56 for (unsigned int ix=1;ix<5;++ix) {
57 double sigma = 0., error = 0.;
58 if(ix==1) {
59 sigma = _nKpKm->val();
60 error = _nKpKm->err();
61 }
62 else if(ix==2) {
63 sigma = _nK0K0->val();
64 error = _nK0K0->err();
65 }
66 else if(ix==3) {
67 sigma = _nK0K0->val();
68 error = _nK0K0->err();
69 }
70 else if(ix==4) {
71 sigma = _n3pi->val();
72 error = _n3pi->err();
73 }
74 sigma *= crossSection()/ sumOfWeights() /nanobarn;
75 error *= crossSection()/ sumOfWeights() /nanobarn;
76 Estimate1DPtr mult;
77 book(mult, iy, 1, ix);
78 for (auto& b : mult->bins()) {
79 if (inRange(sqrtS()/MeV, b.xMin(), b.xMax())) {
80 b.set(sigma, error);
81 }
82 }
83 }
84 }
85 }
86
87 /// @}
88
89
90 /// @name Histograms
91 /// @{
92 CounterPtr _nKpKm,_nK0K0,_n3pi;
93 /// @}
94
95
96 };
97
98
99 RIVET_DECLARE_PLUGIN(SND_2001_I533574);
100
101
102}
|