Rivet analyses referenceSND_2006_I717778Cross section for $e^+e^-\to\eta\gamma$ for energies between 600 MeV and 1380 MeVExperiment: SND (VEPP-2M) Inspire ID: 717778 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Cross section for $e^+e^-\to\eta\gamma$ for energies between 600 MeV and 1380 MeV Source code: SND_2006_I717778.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_2006_I717778 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(SND_2006_I717778);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 // Initialise and register projections
23 declare(FinalState(), "FS");
24 declare(UnstableParticles(), "UFS");
25 book(_numEtaGamma, "TMP/EtaGamma");
26 }
27
28 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
29 for (const Particle &child : p.children()) {
30 if(child.children().empty()) {
31 --nRes[child.pid()];
32 --ncount;
33 }
34 else
35 findChildren(child,nRes,ncount);
36 }
37 }
38
39 /// Perform the per-event analysis
40 void analyze(const Event& event) {
41
42 const FinalState& fs = apply<FinalState>(event, "FS");
43
44 map<long,int> nCount;
45 int ntotal(0);
46 for (const Particle& p : fs.particles()) {
47 nCount[p.pid()] += 1;
48 ++ntotal;
49 }
50
51 const FinalState& ufs = apply<FinalState>(event, "UFS");
52 for (const Particle& p : ufs.particles()) {
53 if(p.children().empty()) continue;
54 // find the omega
55 if(p.pid()==221) {
56 map<long,int> nRes = nCount;
57 int ncount = ntotal;
58 findChildren(p,nRes,ncount);
59 // eta pi+pi-
60 if(ncount!=1) continue;
61 bool matched = true;
62 for(auto const & val : nRes) {
63 if(val.first==22) {
64 if(val.second !=1) {
65 matched = false;
66 break;
67 }
68 }
69 else if(val.second!=0) {
70 matched = false;
71 break;
72 }
73 }
74 if(matched)
75 _numEtaGamma->fill();
76 }
77 }
78 }
79
80
81 /// Normalise histograms etc., after the run
82 void finalize() {
83
84 double sigma = _numEtaGamma->val();
85 double error = _numEtaGamma->err();
86 sigma *= crossSection()/ sumOfWeights() /nanobarn;
87 error *= crossSection()/ sumOfWeights() /nanobarn;
88 for (unsigned int ix=1;ix<3;++ix) {
89 Estimate1DPtr mult;
90 book(mult, ix, 1, 1);
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 _numEtaGamma;
104 /// @}
105
106
107 };
108
109
110 RIVET_DECLARE_PLUGIN(SND_2006_I717778);
111
112
113}
|