rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

MARKII_1985_I207785

$K^0$ and $K^+$ production at 29 GeV
Experiment: MARKII (PEP)
Inspire ID: 207785
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev.Lett. 59 (1987) 2412, 1987.
Beams: e+ e-
Beam energies: (14.5, 14.5) GeV
Run details:
  • e+ e- to hadrons at 29 GeV

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 = 2.*p.p3().mod()/sqrtS();
35	const double beta = p.p3().mod() / p.E();
36	if(p.abspid()==321)
37	  _h_Kp->fill(xp,1./beta);
38	else
39	  _h_K0->fill(xp,1./beta);
40      }
41    }
42    
43
44    /// Normalise histograms etc., after the run
45    void finalize() {
46      scale(_h_K0, 1./sumOfWeights());
47      scale(_h_Kp, 1./sumOfWeights());
48    }
49
50    ///@}
51
52
53    /// @name Histograms
54    ///@{
55    Histo1DPtr _h_K0,_h_Kp;
56    ///@}
57
58
59  };
60
61
62  RIVET_DECLARE_PLUGIN(MARKII_1985_I207785);
63
64}