Rivet analyses referenceJADE_1984_I202785Spectrum for $D^{*+}$ production in $e^+e^-$ collisions at $E_{\text{CMS}}=34.4$Experiment: JADE (Petra) Inspire ID: 202785 Status: VALIDATED Authors:
Beam energies: (17.2, 17.2) GeV Run details:
Measurement of the $D^{*+}$ momentum spectrum in $e^+e^-$ collisions for a centre-of-mass energy of 34.4 GeV by the JADE experiment at Petra. The angular distribution is also measured. Source code: JADE_1984_I202785.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4#include "Rivet/Projections/Beam.hh"
5
6namespace Rivet {
7
8
9 /// @brief D*+ production at 34.4 GeV
10 class JADE_1984_I202785 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(JADE_1984_I202785);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 declare(Beam(), "Beams");
23 declare(UnstableParticles(), "UFS");
24
25 // Book histograms
26 book(_h_x, 1, 1, 1);
27 book(_h_theta, 3, 1, 1);
28 _axis = YODA::Axis<double>(6, -0.9, 0.9);
29 }
30
31
32 /// Perform the per-event analysis
33 void analyze(const Event& event) {
34
35 if (_edges.empty()) _edges = _h_theta->xEdges();
36 // Get beams and average beam momentum
37 const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
38 const double meanBeamMom = ( beams.first.p3().mod() +
39 beams.second.p3().mod() ) / 2.0;
40 MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
41 Vector3 axis = beams.first.pid() == PID::EMINUS ? beams.first.p3().unit() : beams.second.p3().unit();
42 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
43 for (const Particle& p : ufs.particles(Cuts::abspid==413)) {
44 double modp = p.p3().mod();
45 double xE =p.E()/meanBeamMom;
46 _h_x->fill(xE);
47 if(xE>0.4 && p.pid()>0) {
48 _h_theta->fill(map2string(p.p3().dot(axis)/modp));
49 }
50 }
51 }
52
53
54 /// Normalise histograms etc., after the run
55 void finalize() {
56
57 normalize(_h_theta,33.6,false); // normalize to data
58 scale(_h_x, crossSection()/microbarn/sumOfWeights()*sqr(sqrtS()));
59 for(auto & b: _h_theta->bins()) {
60 const size_t idx = b.index();
61 b.scaleW(1./_axis.width(idx));
62 }
63
64 }
65
66 /// @}
67
68 string map2string(const double value) const {
69 const size_t idx = _axis.index(value);
70 if (idx && idx <= _edges.size()) return _edges[idx-1];
71 return "OTHER";
72 }
73
74
75 /// @name Histograms
76 /// @{
77 Histo1DPtr _h_x;
78 BinnedHistoPtr<string> _h_theta;
79 YODA::Axis<double> _axis;
80 vector<string> _edges;
81 /// @}
82
83
84 };
85
86
87 RIVET_DECLARE_PLUGIN(JADE_1984_I202785);
88
89
90}
|