Rivet analyses referenceCLEO_2005_I1649168Spectrum of $D^\pm_s$ mesons in $\Upsilon(4S)$ and $\Upsilon(5S)$ decaysExperiment: CLEO (CESR) Inspire ID: 1649168 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the $D^\pm_s$ meson spectrum in $\Upsilon(4S)$ and $\Upsilon(5S)$ decays by CLEO, only the spectra are included not the conclusions on $B_s$ production drawn from them. Source code: CLEO_2005_I1649168.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief Add a short analysis description here
9 class CLEO_2005_I1649168 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(CLEO_2005_I1649168);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21
22 // Initialise and register projections
23 declare(UnstableParticles(), "UFS");
24
25 // Book histograms
26 book(_h_4S, 1, 1, 7);
27 book(_h_5S, 1, 1, 8);
28 book(_c_4S, "/TMP/N4S");
29 book(_c_5S, "/TMP/N5S");
30 }
31
32
33 void findDecayProducts(const Particle & p, Particles & ds) {
34 for(const Particle & child : p.children()) {
35 if(child.abspid()==431)
36 ds.push_back(child);
37 else if(!child.children().empty())
38 findDecayProducts(child,ds);
39 }
40 }
41
42 /// Perform the per-event analysis
43 void analyze(const Event& event) {
44 // Find the Upsilons among the unstables
45 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
46 Particles upsilons = ufs.particles(Cuts::pid==300553 || Cuts::pid==400553 || Cuts::pid==9000553);
47 for (const Particle& ups : upsilons) {
48 LorentzTransform cms_boost;
49 if (ups.p3().mod() > 1*MeV)
50 cms_boost = LorentzTransform::mkFrameTransformFromBeta(ups.momentum().betaVec());
51 Particles ds;
52 findDecayProducts(ups, ds);
53
54 if(ups.pid()==300553)
55 _c_4S->fill();
56 else
57 _c_5S->fill();
58
59 for(const Particle & p : ds) {
60 FourMomentum p2 = cms_boost.transform(p.momentum());
61 double x = 2.*p2.p3().mod()/ups.mass();
62 if(ups.pid()==300553)
63 _h_4S->fill(x);
64 else
65 _h_5S->fill(x);
66 }
67 }
68 }
69
70
71 /// Normalise histograms etc., after the run
72 void finalize() {
73 if(_h_4S->effNumEntries()!=0)
74 scale(_h_4S ,100./ *_c_4S);
75 if(_h_5S->effNumEntries()!=0)
76 scale(_h_5S ,100./ *_c_5S);
77 }
78
79 /// @}
80
81
82 /// @name Histograms
83 /// @{
84 Histo1DPtr _h_4S,_h_5S;
85 CounterPtr _c_4S,_c_5S;
86 /// @}
87
88
89 };
90
91
92 RIVET_DECLARE_PLUGIN(CLEO_2005_I1649168);
93
94
95}
|