Rivet analyses referencePLUTO_1977_I118873$K^0$ spectra at $3.63$, $4.03$ and $4.5$ GeVExperiment: PLUTO (DORIS) Inspire ID: 118873 Status: VALIDATED Authors:
Beam energies: (1.8, 1.8); (2.0, 2.0); (2.2, 2.2) GeV Run details:
The spectra for $K^0$ production at $3.63$, $4.03$ and $4.5$ GeV measured by the PLUTO experiment. The energy dependent cross section is not included as it is implemented in PLUTO_1981_I165122. Beam energy must be specified as analysis option "ENERGY" when rivet-merging samples. Source code: PLUTO_1977_I118873.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/Beam.hh"
4#include "Rivet/Projections/UnstableParticles.hh"
5
6namespace Rivet {
7
8
9 /// @brief Kaon spectra at 3.63, 4.03 and 4.5 GeV
10 class PLUTO_1977_I118873 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(PLUTO_1977_I118873);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 declare(Beam(), "Beams");
23 declare(UnstableParticles(), "UFS");
24
25 if (isCompatibleWithSqrtS(3.63*GeV)) {
26 book(_h_spectrum, 2, 1, 1);
27 }
28 else if (isCompatibleWithSqrtS(4.03*GeV)) {
29 book(_h_spectrum, 3, 1, 1);
30 }
31 else if (isCompatibleWithSqrtS(4.5*GeV)) {
32 book(_h_spectrum, 4, 1, 1);
33 }
34 else
35 MSG_ERROR("Beam energy not supported!");
36 }
37
38
39 /// Perform the per-event analysis
40 void analyze(const Event& event) {
41 // Get beams and average beam momentum
42 const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
43 const double meanBeamMom = ( beams.first.p3().mod() +
44 beams.second.p3().mod() ) / 2.0;
45 MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
46 // unstable particles
47 for (const Particle& p : apply<UnstableParticles>(event, "UFS").
48 particles(Cuts::pid==PID::K0S)) {
49 double xp = p.E()/meanBeamMom;
50 double beta = p.p3().mod()/p.E();
51 _h_spectrum->fill(xp,1./beta);
52 }
53 }
54
55
56 /// Normalise histograms etc., after the run
57 void finalize() {
58 scale(_h_spectrum, sqr(sqrtS())*crossSection()/nanobarn/sumOfWeights());
59 }
60
61 /// @}
62
63
64 /// @name Histograms
65 /// @{
66 Histo1DPtr _h_spectrum;
67 /// @}
68
69
70 };
71
72
73 RIVET_DECLARE_PLUGIN(PLUTO_1977_I118873);
74
75
76}
|