Rivet analyses referenceARGUS_1994_I372451$\gamma\gamma\to \phi\rho^0\ \text{and}\ \phi\omega$ between 1.5 and 3.5 GeVExperiment: ARGUS (DORIS) Inspire ID: 372451 Status: VALIDATED Authors:
Beam energies: ANY Run details:
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 gamma gamma -> phi rho or omega
10 class ARGUS_1994_I372451 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(ARGUS_1994_I372451);
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 histos
26 if (inRange(sqrtS()/GeV, 1.5, 3.5)) {
27 book(_nMeson, 1,1,1);
28 book(_avg, 2,1,1);
29 }
30 else {
31 throw Error("Invalid CMS energy for ARGUS_1994_I372451");
32 }
33 }
34
35 void findChildren(const Particle& p, map<long,int>& nRes, int& ncount) {
36 for (const Particle &child : p.children()) {
37 if (child.children().empty()) {
38 nRes[child.pid()]-=1;
39 --ncount;
40 }
41 else {
42 findChildren(child,nRes,ncount);
43 }
44 }
45 }
46
47 /// Perform the per-event analysis
48 void analyze(const Event& event) {
49 const FinalState& fs = apply<FinalState>(event, "FS");
50 // find the final-state particles
51 map<long,int> nCount;
52 int ntotal(0);
53 for (const Particle& p : fs.particles()) {
54 nCount[p.pid()] += 1;
55 ++ntotal;
56 }
57 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
58 Particles phis = ufs.particles(Cuts::pid==333);
59 Particles rhos = ufs.particles(Cuts::pid==113 or Cuts::pid==223);
60 for (const Particle& phi : phis) {
61 bool matched=false;
62 map<long,int> nRes=nCount;
63 int ncount = ntotal;
64 findChildren(phi,nRes,ncount);
65 for (const Particle & rho : rhos) {
66 map<long,int> nRes2=nRes;
67 int ncount2 = ncount;
68 findChildren(rho,nRes2,ncount2);
69 if (ncount2 !=0 ) continue;
70 matched = true;
71 for (auto const & val : nRes2) {
72 if(val.second!=0) {
73 matched = false;
74 break;
75 }
76 }
77 if (matched) {
78 if (rho.pid()==113) {
79 _nMeson->fill(sqrtS()/GeV);
80 }
81 else {
82 _avg->fill("1.9 - 2.3"s);
83 }
84 break;
85 }
86 }
87 if (matched) break;
88 }
89 }
90
91
92 /// Normalise histograms etc., after the run
93 void finalize() {
94 const double sf = crossSection()/nanobarn/sumOfWeights();
95 scale(_nMeson, sf);
96 scale(_avg, sf);
97 }
98
99 /// @}
100
101
102 /// @name Histograms
103 /// @{
104 Histo1DPtr _nMeson;
105 BinnedHistoPtr<string> _avg;
106 /// @}
107
108
109 };
110
111
112 RIVET_DECLARE_PLUGIN(ARGUS_1994_I372451);
113
114}
|