Rivet analyses referenceHRS_1987_I215848Hadron Spectra in $e^+e^-$ collisions at 29 GeVExperiment: HRS (PEP) Inspire ID: 215848 Status: VALIDATED Authors:
Beam energies: (14.5, 14.5) GeV Run details:
$K^0$, $K^+$, $p$, $\pi^+$ and $\Lambda^0$ spectra at $\sqrt{s} = 29.$ GeV using the HRS detector at PEP. Source code: HRS_1987_I215848.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief Hadron Spectra in $e^+e^-$ collisions at 29 GeV
9 class HRS_1987_I215848 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(HRS_1987_I215848);
14
15
16 /// @name Analysis methods
17 ///@{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 declare(UnstableParticles(), "UFS");
22 book(_h_pi ,2,1,1);
23 book(_h_Kp ,3,1,1);
24 book(_h_p ,4,1,1);
25 book(_h_K0 ,5,1,1);
26 book(_h_lam,6,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()) {
34 double xE = 2.*p.E()/sqrtS();
35 const double beta = p.p3().mod() / p.E();
36 if(p.pid()==130 || p.pid()==310)
37 _h_K0 ->fill(xE,1./beta);
38 else if(p.abspid()==321)
39 _h_Kp ->fill(xE,1./beta);
40 else if(p.abspid()==211)
41 _h_pi ->fill(xE,1./beta);
42 else if(p.abspid()==2212)
43 _h_p ->fill(xE,1./beta);
44 else if(p.abspid()==3122)
45 _h_lam->fill(xE,1./beta);
46 }
47 }
48
49
50 /// Normalise histograms etc., after the run
51 void finalize() {
52 scale(_h_pi , crossSection()*sqr(sqrtS())/microbarn/sumOfWeights());
53 scale(_h_Kp , crossSection()*sqr(sqrtS())/microbarn/sumOfWeights());
54 scale(_h_p , crossSection()*sqr(sqrtS())/microbarn/sumOfWeights());
55 scale(_h_K0 , crossSection()*sqr(sqrtS())/microbarn/sumOfWeights());
56 scale(_h_lam, crossSection()*sqr(sqrtS())/microbarn/sumOfWeights());
57 }
58
59 ///@}
60
61
62 /// @name Histograms
63 ///@{
64 Histo1DPtr _h_pi,_h_Kp,_h_p,_h_K0,_h_lam;
65 ///@}
66
67
68 };
69
70
71 RIVET_DECLARE_PLUGIN(HRS_1987_I215848);
72
73}
|