Rivet analyses referenceCLEO_1982_I178490Spectrum of $D^{*+}$ mesons in $e^+e^-$ at $\sqrt{s}=10.4\,$GeVExperiment: CLEO (CESR) Inspire ID: 178490 Status: VALIDATED NOHEPDATA Authors:
Beam energies: (5.2, 5.2) GeV Run details:
Measurement of the scaled momentum spectrum of $D^{*+}$ mesons in $e^+e^-$ at $\sqrt{s}=10.4\,$GeV Source code: CLEO_1982_I178490.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5
6namespace Rivet {
7
8
9 /// @brief e+e- > D*+ + X
10 class CLEO_1982_I178490 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(CLEO_1982_I178490);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 // projections
23 declare(UnstableParticles(Cuts::abspid==413), "UFS");
24 // histos
25 book(_h_sigma,1,1,1);
26 book(_h_spect,2,1,1);
27 }
28
29
30 /// Perform the per-event analysis
31 void analyze(const Event& event) {
32 if(_edges.empty()) _edges = _h_sigma->xEdges();
33 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
34 for (const Particle& p : ufs.particles()) {
35 double xE = 2.*p.E()/sqrtS();
36 _h_spect->fill(xE);
37 for (unsigned int ix=0; ix<2; ++ix) {
38 if (xE>0.5) _h_sigma->fill(_edges[0]);
39 if (xE>0.7) _h_sigma->fill(_edges[1]);
40 }
41 }
42 }
43
44
45 /// Normalise histograms etc., after the run
46 void finalize() {
47 scale(_h_sigma, crossSection()/sumOfWeights()/nanobarn);
48 scale(_h_spect,sqr(sqrtS())*crossSection()/sumOfWeights()/microbarn);
49 }
50
51 /// @}
52
53
54 /// @name Histograms
55 /// @{
56 Histo1DPtr _h_spect;
57 BinnedHistoPtr<string> _h_sigma;
58 vector<string> _edges;
59 /// @}
60
61
62 };
63
64
65 RIVET_DECLARE_PLUGIN(CLEO_1982_I178490);
66
67}
|