Rivet analyses referenceL3_1994_I374698$\pi^0$ and $\eta$ spectra at 91 GeVExperiment: L3 () Inspire ID: 374698 Status: VALIDATED Authors:
Beam energies: (45.6, 45.6) GeV Run details:
Measurement of the momentum distribution of the $\pi^0$ and $\eta$ mesons at 91.2 GeV in $e^+e^-$ collisions by the L3 collaboration. Source code: L3_1994_I374698.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief pi0 and eta spectra at 91 GeV
9 class L3_1994_I374698 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(L3_1994_I374698);
14
15
16 /// @name Analysis methods
17 ///@{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 // projections
22 declare(UnstableParticles(), "UFS");
23 // book histos
24 book(_h_pi0_x_P , 5,1,1);
25 book(_h_pi0_x_H , 6,1,1);
26 book(_h_pi0_xi , 7,1,1);
27 book(_h_eta_x_P , 8,1,1);
28 book(_h_eta_x_H , 9,1,1);
29 book(_h_eta_xi ,10,1,1);
30 }
31
32
33 /// Perform the per-event analysis
34 void analyze(const Event& event) {
35 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
36 for (const Particle & p : ufs.particles(Cuts::pid==PID::PI0 ||
37 Cuts::pid==PID::ETA)) {
38 const double x = 2.*p.momentum().p3().mod()/sqrtS();
39 if(p.pid()==PID::PI0) {
40 _h_pi0_x_P->fill(x);
41 _h_pi0_x_H->fill(x);
42 _h_pi0_xi->fill(-log(x));
43 }
44 else {
45 _h_eta_x_P->fill(x);
46 _h_eta_x_H->fill(x);
47 _h_eta_xi->fill(-log(x));
48 }
49 }
50 }
51
52
53 /// Normalise histograms etc., after the run
54 void finalize() {
55 scale(_h_pi0_x_P , 1./sumOfWeights());
56 scale(_h_pi0_x_H , 1./sumOfWeights());
57 scale(_h_pi0_xi , 1./sumOfWeights());
58 scale(_h_eta_x_P , 1./sumOfWeights());
59 scale(_h_eta_x_H , 1./sumOfWeights());
60 scale(_h_eta_xi , 1./sumOfWeights());
61 }
62
63 ///@}
64
65
66 /// @name Histograms
67 ///@{
68 Histo1DPtr _h_pi0_x_P,_h_pi0_x_H,_h_pi0_xi;
69 Histo1DPtr _h_eta_x_P,_h_eta_x_H,_h_eta_xi;
70 ///@}
71
72
73 };
74
75
76 RIVET_DECLARE_PLUGIN(L3_1994_I374698);
77
78}
|