Rivet analyses referenceBABAR_2008_I755245$D_s^{(*)+}K^-$ mass distribution in $B^-\to D_s^{(*)+}K^-\pi^-$Experiment: BABAR (PEP-II) Inspire ID: 755245 Status: VALIDATED NOHEPDATA Authors:
Beam energies: ANY Run details:
Measurement of the $D_s^{(*)+}K^-$ mass distribution in $B^-\to D_s^{(*)+}K^-\pi^-$ by BaBar. The background subtracted data was read from Figure 3 in the paper. Source code: BABAR_2008_I755245.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4#include "Rivet/Projections/DecayedParticles.hh"
5
6namespace Rivet {
7
8
9 /// @brief B- -> D_s(*) K- pi-
10 class BABAR_2008_I755245 : public Analysis {
11 public:
12
13 /// Constructor
14 RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2008_I755245);
15
16
17 /// @name Analysis methods
18 /// @{
19
20 /// Book histograms and initialise projections before the run
21 void init() {
22 // projections
23 UnstableParticles ufs = UnstableParticles(Cuts::abspid==521);
24 declare(ufs, "UFS");
25 DecayedParticles BB(ufs);
26 BB.addStable( 431);
27 BB.addStable(-431);
28 BB.addStable( 433);
29 BB.addStable(-433);
30 BB.addStable( 310);
31 declare(BB, "BB");
32 // histos
33 for(unsigned int ix=0;ix<2;++ix)
34 book(_h[ix],1,1,1+ix);
35 }
36
37
38 /// Perform the per-event analysis
39 void analyze(const Event& event) {
40 static const map<PdgId,unsigned int> & mode1 = { {-431,1},{ 321,1}, { 211,1}};
41 static const map<PdgId,unsigned int> & mode1CC = { { 431,1},{-321,1}, {-211,1}};
42 static const map<PdgId,unsigned int> & mode2 = { {-433,1},{ 321,1}, { 211,1}};
43 static const map<PdgId,unsigned int> & mode2CC = { { 433,1},{-321,1}, {-211,1}};
44 DecayedParticles BB = apply<DecayedParticles>(event, "BB");
45 for(unsigned int ix=0;ix<BB.decaying().size();++ix) {
46 int sign = 1, imode = 0;
47 if (BB.decaying()[ix].pid()>0 && BB.modeMatches(ix,3,mode1)) {
48 imode=0;
49 sign=1;
50 }
51 else if (BB.decaying()[ix].pid()<0 && BB.modeMatches(ix,3,mode1CC)) {
52 imode=0;
53 sign=-1;
54 }
55 else if (BB.decaying()[ix].pid()>0 && BB.modeMatches(ix,3,mode2)) {
56 imode=1;
57 sign=1;
58 }
59 else if (BB.decaying()[ix].pid()<0 && BB.modeMatches(ix,3,mode2CC)) {
60 imode=1;
61 sign=-1;
62 }
63 else
64 continue;
65 const Particle & Kp = BB.decayProducts()[ix].at( sign*321)[0];
66 const Particle & Ds = BB.decayProducts()[ix].at(-sign*(431+2*imode))[0];
67 _h[imode]->fill((Kp.momentum()+Ds.momentum()).mass());
68 }
69 }
70
71
72 /// Normalise histograms etc., after the run
73 void finalize() {
74 for(unsigned int ix=0;ix<2;++ix)
75 normalize(_h[ix],1.,false);
76 }
77
78 /// @}
79
80
81 /// @name Histograms
82 /// @{
83 Histo1DPtr _h[2];
84 /// @}
85
86
87 };
88
89
90 RIVET_DECLARE_PLUGIN(BABAR_2008_I755245);
91
92}
|