rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

HRS_1984_I202899

Cross section and spectra for $D^0$ and $D^+$ spectra at $\sqrt{s}=29$ GeV
Experiment: HRS (PEP)
Inspire ID: 202899
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev.Lett. 53 (1984) 1971
Beams: e+ e-
Beam energies: (14.5, 14.5) GeV
Run details:
  • e+ e- > hadrons

Cross section and spectra for $D^0$ and $D^+$ spectra at $\sqrt{s}=29$ GeV

Source code: HRS_1984_I202899.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/UnstableParticles.hh"
 4
 5namespace Rivet {
 6
 7
 8  /// @brief D0 and D+ at 29 GeV
 9  class HRS_1984_I202899 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(HRS_1984_I202899);
14
15
16    /// @name Analysis methods
17    /// @{
18
19    /// Book histograms and initialise projections before the run
20    void init() {
21      // Initialise and register projections
22      declare(UnstableParticles(Cuts::abspid==411 or Cuts::abspid==421), "UFS");
23      //Histograms
24      for (unsigned int ix=0; ix<2; ++ix) {
25        book(_h_sigma[ix],1,1,1+ix);
26        for(unsigned int iy=0; iy<2; ++iy) {
27          if(ix==1&&iy==1) continue;
28          book(_h_spect[ix][iy],3+iy,1,1+ix);
29        }
30      }
31    }
32
33
34    /// Perform the per-event analysis
35    void analyze(const Event& event) {
36      const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
37      for (const Particle& p : ufs.particles()) {
38       	const double xE = 2.*p.E()/sqrtS();
39       	const double beta = p.p3().mod() / p.E();
40      	unsigned int iloc = p.abspid()==421 ? 0 : 1;
41       	if (xE>0.5) _h_sigma[iloc]->fill(29);
42        _h_spect[iloc][0]->fill(xE,1./beta);
43        if(iloc==0) _h_spect[0][1]->fill(xE);
44      }
45    }
46
47
48    /// Normalise histograms etc., after the run
49    void finalize() {
50      for (unsigned int ix=0;ix<2;++ix) {
51        scale(_h_sigma[ix],crossSection()/nanobarn/sumOfWeights());
52        scale(_h_spect[ix][0],sqr(sqrtS())*crossSection()/microbarn/sumOfWeights());
53      }
54      normalize(_h_spect[0][1]);
55    }
56
57    /// @}
58
59
60    /// @name Histograms
61    /// @{
62    BinnedHistoPtr<int> _h_sigma[2];
63    Histo1DPtr _h_spect[2][2];
64    /// @}
65
66
67  };
68
69
70  RIVET_DECLARE_PLUGIN(HRS_1984_I202899);
71
72}