Rivet analyses referenceCLEO_1985_I218314Momentum spectrum of $\phi$ mesons in $B$ decaysExperiment: CLEO (CESR) Inspire ID: 218314 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY Run details:
Momentum spectrum of $\phi$ mesons in $B$ meson decays, where the $B$ mesons are produced at the $\Upsilon(4S)$ Source code: CLEO_1985_I218314.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief B -> phi X
9 class CLEO_1985_I218314 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(CLEO_1985_I218314);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21 // projections
22 declare(UnstableParticles(Cuts::pid==300553),"UFS");
23 // histograms
24 book(_h,4,1,1);
25 book(_c,"TMP/nB");
26 }
27
28 void findDecay(const Particle& parent, Particles& phi) {
29 for (const Particle& p : parent.children()) {
30 if (p.abspid()==333) {
31 phi.push_back(p);
32 }
33 else if (p.abspid()==PID::PIPLUS ||
34 p.abspid()==PID::KPLUS ||
35 p.pid()==PID::PI0 ||
36 p.pid()==PID::K0S)
37 continue;
38 else if (!p.children().empty()) {
39 findDecay(p,phi);
40 }
41 }
42 }
43
44
45 /// Perform the per-event analysis
46 void analyze(const Event& event) {
47 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
48 for (const Particle& p : ufs.particles()) {
49 const LorentzTransform boost = LorentzTransform::mkFrameTransformFromBeta(p.mom().betaVec());
50 for (const Particle& B:p.children()) {
51 if (B.abspid()!=511 && B.abspid()!=521) continue;
52 _c->fill();
53 Particles phi;
54 findDecay(B,phi);
55 for (const Particle & p2 : phi) {
56 const double pmod = boost.transform(p2.mom()).p3().mod();
57 _h->fill(pmod);
58 }
59 }
60 }
61 }
62
63
64 /// Normalise histograms etc., after the run
65 void finalize() {
66 scale(_h,1./ *_c);
67 }
68
69 /// @}
70
71
72 /// @name Histograms
73 /// @{
74 Histo1DPtr _h;
75 CounterPtr _c;
76 /// @}
77
78
79 };
80
81
82 RIVET_DECLARE_PLUGIN(CLEO_1985_I218314);
83
84}
|