Rivet analyses referenceCLEOII_1999_I478217Spectra for $\Xi_c^{\prime}$ at 10.58 GeVExperiment: CLEOII (CESR) Inspire ID: 478217 Status: VALIDATED Authors:
Beam energies: (5.3, 5.3) GeV Run details:
Spectrum for the average of $\Xi_c^{\prime0}$ and $\Xi_c^{\prime+}$ produced at 10.58 GeV measured by CLEOII. Source code: CLEOII_1999_I478217.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/Beam.hh"
4#include "Rivet/Projections/UnstableParticles.hh"
5
6namespace Rivet {
7
8
9 /// @brief Xi_c' spectrum
10 class CLEOII_1999_I478217 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(CLEOII_1999_I478217);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 // projections
23 declare(Beam(), "Beams");
24 declare(UnstableParticles(), "UFS");
25 // book histos
26 book(_h_Xi_c,1,1,1);
27 _axis = YODA::Axis<double>(5, 0.5, 1.0);
28 }
29
30
31 /// Perform the per-event analysis
32 void analyze(const Event& event) {
33 if (_edges.empty()) _edges = _h_Xi_c->xEdges();
34 // Get beams and average beam momentum
35 const ParticlePair& beams = apply<Beam>(event, "Beams").beams();
36 const double Emax = ( beams.first.p3().mod() + beams.second.p3().mod() ) / 2.0;
37 const double Pmax = sqrt(sqr(Emax)-sqr(2.578));
38 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
39 for (const Particle& p : ufs.particles(Cuts::abspid==4312 or Cuts::abspid==4322)) {
40 double xp = p.momentum().p3().mod()/Pmax;
41 _h_Xi_c->fill(map2string(xp));
42 }
43 }
44
45 string map2string(const double value) const {
46 const size_t idx = _axis.index(value);
47 if (idx && idx <= _edges.size()) return _edges[idx-1];
48 return "OTHER";
49 }
50
51
52 /// Normalise histograms etc., after the run
53 void finalize() {
54 normalize(_h_Xi_c);
55 // bin width (0.1)
56 scale(_h_Xi_c,10.);
57 }
58
59 /// @}
60
61
62 /// @name Histograms
63 /// @{
64 BinnedHistoPtr<string> _h_Xi_c;
65 YODA::Axis<double> _axis;
66 vector<string> _edges;
67 /// @}
68
69
70 };
71
72
73 RIVET_DECLARE_PLUGIN(CLEOII_1999_I478217);
74
75}
|