Rivet analyses referenceBABAR_2004_I642355Measurement of the mass $m_X$ produced in $B\to\eta^\prime X_s$Experiment: BABAR (PEP-II) Inspire ID: 642355 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the mass $m_X$ produced in $B\to\eta^\prime X_s$ where the $\eta^\prime$ meson has momentum $2<p<2.7$ GeV in the $\Upsilon(4S)$ rest frame. Source code: BABAR_2004_I642355.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief M_x in B -> eta' Xs
9 class BABAR_2004_I642355 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2004_I642355);
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(),"UFS");
23 // histograms
24 book(_w_ups4,"/TMP/w_ups4");
25 book(_h_X,1,1,1);
26 }
27
28 void findDecay(Particle parent, bool & charm, Particles & etaP, Particles & pi0,
29 Particles & pip, Particles & Kp, Particles & K0) {
30 for(const Particle & p : parent.children()) {
31 if(isCharm(p)) {
32 charm = true;
33 return;
34 }
35 else if(p.pid()==PID::ETAPRIME) {
36 etaP.push_back(p);
37 }
38 else if(p.abspid()==PID::PIPLUS) {
39 pip.push_back(p);
40 }
41 else if(p.abspid()==PID::KPLUS) {
42 Kp.push_back(p);
43 }
44 else if(p.pid()==PID::PI0) {
45 pi0.push_back(p);
46 }
47 else if(p.pid()==PID::K0S) {
48 K0.push_back(p);
49 }
50 else if(!p.children().empty()) {
51 findDecay(p,charm,etaP,pi0,pip,Kp,K0);
52 }
53 }
54 }
55
56 /// Perform the per-event analysis
57 void analyze(const Event& event) {
58 const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
59 for(const Particle & p : ufs.particles(Cuts::pid==300553)) {
60 _w_ups4->fill();
61 const LorentzTransform boost = LorentzTransform::mkFrameTransformFromBeta(p.mom().betaVec());
62 for(const Particle & B:p.children()) {
63 if(B.abspid()!=511 && B.abspid()!=521) continue;
64 // find the decay
65 bool charm=false;
66 Particles etaP, pi0, pip, Kp, K0;
67 findDecay(B,charm,etaP,pi0,pip,Kp,K0);
68 if(charm || etaP.size()!=1 ) continue;
69 if(Kp.empty()&&Kp.empty()) continue;
70 double pEta = boost.transform(etaP[0].momentum()).p3().mod();
71 if(pEta<2. || pEta>2.7) continue;
72 // four momentum of the Xs system
73 FourMomentum pX;
74 if(K0.size()==1)
75 pX+= K0[0].momentum();
76 else if(Kp.size()==1)
77 pX+= Kp[0].momentum();
78 else
79 continue;
80 for(const Particle & pi : pip)
81 pX+=pi.momentum();
82 if(pi0.size()==1)
83 pX+=pi0[0].momentum();
84 _h_X->fill(pX.mass());
85
86 }
87 }
88 }
89
90
91 /// Normalise histograms etc., after the run
92 void finalize() {
93 scale(_h_X, 0.5/ *_w_ups4);
94 }
95
96 ///@}
97
98
99 /// @name Histograms
100 ///@{
101 CounterPtr _w_ups4;
102 Histo1DPtr _h_X;
103 ///@}
104
105
106 };
107
108
109 RIVET_DECLARE_PLUGIN(BABAR_2004_I642355);
110
111}
|