Rivet analyses referenceBABAR_2004_I632399$\phi$ momentum spectra in $\Upsilon(4S)$ decaysExperiment: BABAR (PEP-II) Inspire ID: 632399 Status: VALIDATED Authors:
Beams: * * Beam energies: ANY Run details:
Measurement of the momentum spectrum of $\phi$ mesons produced in $B$ decays at the $\Upsilon(4S)$ resonance. Source code: BABAR_2004_I632399.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief phi spectrum at 4S
9 class BABAR_2004_I632399 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2004_I632399);
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(_b_phi, 1, 1, 1);
27 book(_h_phi, 2, 1, 1);
28 book(_c_4S, "/TMP/N4S");
29 }
30
31 void findDecayProducts(const Particle & p, Particles & phi) {
32 for(const Particle & child : p.children()) {
33 if(child.pid()==333)
34 phi.push_back(child);
35 else if(!child.children().empty())
36 findDecayProducts(child,phi);
37 }
38 }
39
40 /// Perform the per-event analysis
41 void analyze(const Event& event) {
42 // Find the Upsilons among the unstables
43 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
44 Particles upsilons = ufs.particles(Cuts::pid==300553);
45 for (const Particle& ups : upsilons) {
46 LorentzTransform cms_boost;
47 if (ups.p3().mod() > 1*MeV)
48 cms_boost = LorentzTransform::mkFrameTransformFromBeta(ups.momentum().betaVec());
49 Particles phis;
50 findDecayProducts(ups, phis);
51 _c_4S->fill();
52
53 for(const Particle & phi : phis) {
54 FourMomentum p2 = cms_boost.transform(phi.momentum());
55 _h_phi->fill(p2.p3().mod());
56 _b_phi->fill();
57 }
58 }
59 }
60
61
62 /// Normalise histograms etc., after the run
63 void finalize() {
64 if(_c_4S->effNumEntries()!=0) {
65 scale(_h_phi , 0.5/ *_c_4S);
66 scale(_b_phi , 50./ *_c_4S );
67 }
68 }
69
70 /// @}
71
72
73 /// @name Histograms
74 /// @{
75 Histo1DPtr _h_phi;
76 CounterPtr _b_phi,_c_4S;
77 /// @}
78
79
80 };
81
82
83 RIVET_DECLARE_PLUGIN(BABAR_2004_I632399);
84
85}
|