Rivet analyses referenceMARKII_1985_I207785$K^0$ and $K^+$ production at 29 GeVExperiment: MARKII (PEP) Inspire ID: 207785 Status: VALIDATED Authors:
Beam energies: (14.5, 14.5) GeV Run details:
Rate and spectrum for $K^0$ and $K^+$ production at 29 GeV measured by the MARKII collaboration. Source code: MARKII_1985_I207785.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 K+/K0 specta at 29 GeV
10 class MARKII_1985_I207785 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(MARKII_1985_I207785);
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(UnstableParticles(), "UFS");
24 //Histograms
25 book(_h["K0"], 2, 1, 1);
26 book(_h["Kp"], 4, 1, 1);
27 }
28
29
30 /// Perform the per-event analysis
31 void analyze(const Event& event) {
32 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
33 for (const Particle& p : ufs.particles(Cuts::abspid==321 or Cuts::abspid==310 or Cuts::abspid==130)) {
34 const double xp = p.p3().mod();
35 const double beta = p.p3().mod() / p.E();
36 if (p.abspid()==321) _h["Kp"]->fill(xp,1./beta);
37 else _h["K0"]->fill(xp,1./beta);
38 }
39 }
40
41
42 /// Normalise histograms etc., after the run
43 void finalize() {
44 // cross section differential in xp, now plotting p so need to convert
45 scale(_h, 1./sumOfWeights()*sqrtS()/2);
46 }
47
48 ///@}
49
50
51 /// @name Histograms
52 ///@{
53 map<string,Histo1DPtr> _h;
54 ///@}
55
56
57 };
58
59
60 RIVET_DECLARE_PLUGIN(MARKII_1985_I207785);
61
62}
|