Rivet analyses referenceSND_2016_I1471515Cross section for $e^+e^-\to\eta\omega\pi^0$ for energies below 2 GeVExperiment: SND () Inspire ID: 1471515 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Cross section for $e^+e^-\to\eta\omega\pi^0$ for energies below 2 GeV Source code: SND_2016_I1471515.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 SND_2016_I1471515 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(SND_2016_I1471515);
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 declare(UnstableParticles(), "UFS");
26 book(_nOmegaEtaPi, "/TMP/nOmegaEtaPi");
27 }
28
29 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
30 for (const Particle &child : p.children()) {
31 if(child.children().empty()) {
32 nRes[child.pid()]-=1;
33 --ncount;
34 }
35 else
36 findChildren(child,nRes,ncount);
37 }
38 }
39
40 /// Perform the per-event analysis
41 void analyze(const Event& event) {
42 const FinalState& fs = apply<FinalState>(event, "FS");
43 map<long,int> nCount;
44 int ntotal(0);
45 for (const Particle& p : fs.particles()) {
46 nCount[p.pid()] += 1;
47 ++ntotal;
48 }
49 const FinalState& ufs = apply<FinalState>(event, "UFS");
50 for (const Particle& p : ufs.particles()) {
51 if(p.children().empty()) continue;
52 if(p.pid()!=223) continue;
53 map<long,int> nRes = nCount;
54 int ncount = ntotal;
55 findChildren(p,nRes,ncount);
56 for (const Particle& p2 : ufs.particles()) {
57 if(p2.pid()!=221) continue;
58 map<long,int> nResB = nRes;
59 int ncountB = ncount;
60 findChildren(p2,nResB,ncountB);
61 if(ncountB!=1) continue;
62 bool matched2 = true;
63 for(auto const & val : nResB) {
64 if(val.first==111) {
65 if(val.second!=1) {
66 matched2 = false;
67 break;
68 }
69 }
70 else if(val.second!=0) {
71 matched2 = false;
72 break;
73 }
74 }
75 if(matched2) {
76 _nOmegaEtaPi->fill();
77 break;
78 }
79 }
80 }
81 }
82
83 /// Normalise histograms etc., after the run
84 void finalize() {
85 double sigma = _nOmegaEtaPi->val();
86 double error = _nOmegaEtaPi->err();
87 sigma *= crossSection()/ sumOfWeights() /nanobarn;
88 error *= crossSection()/ sumOfWeights() /nanobarn;
89 Estimate1DPtr mult;
90 book(mult, 1, 1, 6);
91 for (auto& b : mult->bins()) {
92 if (inRange(sqrtS()/MeV, b.xMin(), b.xMax())) {
93 b.set(sigma, error);
94 }
95 }
96 }
97
98 /// @}
99
100
101 /// @name Histograms
102 /// @{
103 CounterPtr _nOmegaEtaPi;
104 /// @}
105
106
107 };
108
109
110 RIVET_DECLARE_PLUGIN(SND_2016_I1471515);
111
112
113}
|