Rivet analyses referenceTPC_1986_I217503$e^+e^-\to e^+e^-\eta$ at 29 GeVExperiment: TPC (PEP) Inspire ID: 217503 Status: VALIDATED Authors:
Beam energies: (14.5, 14.5) GeV Run details:
Measurement of the cross sections for the production of $\eta$ in photon-photon collisions, i.e. $e^+e^-\to \gamma\gamma e^+e^-$ followed by $\gamma\gamma\to\eta$, by the JADE experiment at 34.3 GeV Source code: TPC_1986_I217503.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4#include "Rivet/Projections/UnstableParticles.hh"
5#include "Rivet/Projections/Beam.hh"
6
7namespace Rivet {
8
9
10 /// @brief e+e- -> e+e- eta
11 class TPC_1986_I217503 : public Analysis {
12 public:
13
14 /// Constructor
15 RIVET_DEFAULT_ANALYSIS_CTOR(TPC_1986_I217503);
16
17
18 /// @name Analysis methods
19 /// @{
20
21 /// Book histograms and initialise projections before the run
22 void init() {
23 // Initialise and register projections
24 declare(Beam(), "Beams");
25 declare(FinalState(),"FS");
26 declare(UnstableParticles(Cuts::pid==221), "UFS");
27 // book the histograms
28 book(_h_eta,1,1,1);
29 }
30
31 void findChildren(const Particle & p,map<long,int> & nRes, int &ncount) {
32 for (const Particle &child : p.children()) {
33 if (child.children().empty()) {
34 --nRes[child.pid()];
35 --ncount;
36 } else {
37 findChildren(child,nRes,ncount);
38 }
39 }
40 }
41
42 bool findScattered(Particle beam, double& q2) {
43 bool found = false;
44 Particle scat = beam;
45 while (!scat.children().empty()) {
46 found = false;
47 for (const Particle & p : scat.children()) {
48 if (p.pid()==scat.pid()) {
49 scat=p;
50 found=true;
51 break;
52 }
53 }
54 if (!found) break;
55 }
56 if (!found) return false;
57 q2 = -(beam.momentum() - scat.momentum()).mass2();
58 return true;
59 }
60
61
62 /// Perform the per-event analysis
63 void analyze(const Event& event) {
64 // find scattered leptons and calc Q2
65 const Beam& beams = apply<Beam>(event, "Beams");
66 double q12 = -1, q22 = -1;
67 if (!findScattered(beams.beams().first, q12)) vetoEvent;
68 if (!findScattered(beams.beams().second, q22)) vetoEvent;
69 // check the final state
70 const FinalState & fs = apply<FinalState>(event, "FS");
71 map<long,int> nCount;
72 int ntotal(0);
73 for (const Particle& p : fs.particles()) {
74 nCount[p.pid()] += 1;
75 ++ntotal;
76 }
77 // find the meson
78 const FinalState& ufs = apply<FinalState>(event, "UFS");
79 for (const Particle& p : ufs.particles()) {
80 if(p.children().empty()) continue;
81 map<long,int> nRes = nCount;
82 int ncount = ntotal;
83 findChildren(p,nRes,ncount);
84 bool matched = true;
85 for (const auto& val : nRes) {
86 if (abs(val.first)==11) {
87 if(val.second!=1) {
88 matched = false;
89 break;
90 }
91 }
92 else if (val.second!=0) {
93 matched = false;
94 break;
95 }
96 }
97 if (matched) {
98 _h_eta->fill(29);
99 break;
100 }
101 }
102 }
103
104
105 /// Normalise histograms etc., after the run
106 void finalize() {
107 scale(_h_eta, crossSection()/nanobarn/sumW());
108 }
109
110 /// @}
111
112
113 /// @name Histograms
114 /// @{
115 BinnedHistoPtr<int> _h_eta;
116 /// @}
117
118
119 };
120
121
122 RIVET_DECLARE_PLUGIN(TPC_1986_I217503);
123
124}
|