rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2012_I1086537

Mass distributions in $B^0\to K^+K^-K^0_S$, $B^+\to K^+K^-K^+$ and $B^+\to K^0_SK^0_SK^+$
Experiment: BABAR (PEP-II)
Inspire ID: 1086537
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References:
  • Phys.Rev.D 85 (2012) 112010
Beams: * *
Beam energies: ANY
Run details:
  • Any process producing B0 and B+, originally Upsilon(4S) decays

Mass distributions in $B^0\to K^+K^-K^0_S$, $B^+\to K^+K^-K^+$ and $B^+\to K^0_SK^0_SK^+$. The data were read from the plots in the paper.

Source code: BABAR_2012_I1086537.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 -> K K K decays
 10  class BABAR_2012_I1086537 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2012_I1086537);
 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==511 or Cuts::abspid==521);
 24      declare(ufs, "UFS");
 25      DecayedParticles BB(ufs);
 26      BB.addStable(310);
 27      declare(BB, "BB");
 28      // histograms
 29      for(unsigned int ix=0;ix<3;++ix)
 30	for(unsigned int iy=0;iy<3;++iy)
 31	  book(_h_aver[ix][iy],1+2*ix,1,1+iy);
 32      for(unsigned int ix=0;ix<2;++ix) {
 33	book(_h_charge2[ix],4,1,1+ix);
 34	for(unsigned int iy=0;iy<2;++iy)
 35	  book(_h_charge1[ix][iy],2,1+iy,1+ix);
 36      }
 37    }
 38
 39
 40    /// Perform the per-event analysis
 41    void analyze(const Event& event) {
 42      static const map<PdgId,unsigned int> & mode1   = { { 321,2},{-321,1}};
 43      static const map<PdgId,unsigned int> & mode1CC = { { 321,1},{-321,2}};
 44      static const map<PdgId,unsigned int> & mode2   = { { 310,2},{ 321,1}};
 45      static const map<PdgId,unsigned int> & mode2CC = { { 310,2},{-321,1}};
 46      static const map<PdgId,unsigned int> & mode3   = { { 310,1},{ 321,1} ,{-321,1}};
 47      DecayedParticles BB = apply<DecayedParticles>(event, "BB");
 48      for(unsigned int ix=0;ix<BB.decaying().size();++ix) {
 49      	int sign = 1, imode = 0;
 50      	if (BB.decaying()[ix].pid()>0 && BB.modeMatches(ix,3,mode1)) {
 51	  imode=0;
 52      	  sign=1;
 53      	}
 54      	else if  (BB.decaying()[ix].pid()<0 && BB.modeMatches(ix,3,mode1CC)) {
 55	  imode=0;
 56      	  sign=-1;
 57      	}
 58	else if (BB.decaying()[ix].pid()>0 && BB.modeMatches(ix,3,mode2)) {
 59	  imode=1;
 60      	  sign=1;
 61      	}
 62      	else if  (BB.decaying()[ix].pid()<0 && BB.modeMatches(ix,3,mode2CC)) {
 63	  imode=1;
 64      	  sign=-1;
 65      	}
 66	else if (BB.modeMatches(ix,3,mode3)) {
 67	  imode=2;
 68	  if(BB.decaying()[ix].pid()<0) sign=-1;
 69	}
 70      	else
 71      	  continue;
 72	// B+ -> K+ K+ K-
 73	if(imode==0) {
 74	  const Particles & Kp = BB.decayProducts()[ix].at( sign*321);
 75	  const Particle  & Km = BB.decayProducts()[ix].at(-sign*321)[0];
 76	  double mKpKm[2];
 77	  for(unsigned int ix=0;ix<2;++ix)
 78	    mKpKm[ix] = (Kp[ix].momentum()+Km.momentum()).mass();
 79	  if(mKpKm[0]>mKpKm[1]) swap(mKpKm[0],mKpKm[1]);
 80	  _h_aver[0][0]->fill(mKpKm[0]);
 81	  _h_aver[0][1]->fill(mKpKm[1]);
 82	  _h_aver[0][2]->fill((Kp[0].momentum()+Kp[1].momentum()).mass());
 83	  if(BB.decaying()[ix].pid()>0) {
 84	    for(unsigned int ix=0;ix<2;++ix) _h_charge1[0][ix]->fill(mKpKm[0]);
 85	  }
 86	  else {
 87	    for(unsigned int ix=0;ix<2;++ix) _h_charge1[1][ix]->fill(mKpKm[0]);
 88	  }
 89	}
 90	// B+ -> KS0 KS0 K+
 91	else if(imode==1) {
 92	  const Particles & K0 = BB.decayProducts()[ix].at( 310);
 93	  const Particle  & Kp = BB.decayProducts()[ix].at( sign*321)[0];
 94	  double mK0K0 = (K0[0].momentum()+K0[1].momentum()).mass();
 95	  _h_aver[1][0]->fill(mK0K0);
 96	  double mKpK0[2];
 97	  for(unsigned int ix=0;ix<2;++ix)
 98	    mKpK0[ix] = (K0[ix].momentum()+Kp.momentum()).mass();
 99	  if(mKpK0[0]>mKpK0[1]) swap(mKpK0[0],mKpK0[1]);
100	  _h_aver[1][1]->fill(mKpK0[1]);
101	  _h_aver[1][2]->fill(mKpK0[0]);
102	  if(BB.decaying()[ix].pid()>0) {
103	    _h_charge2[0]->fill(mK0K0);
104	  }
105	  else {
106	    _h_charge2[1]->fill(mK0K0);
107	  }
108	}
109	// B0 -> KS0 K+ K-
110	else if(imode==2) {
111	  const Particle & K0 = BB.decayProducts()[ix].at(      310)[0];
112	  const Particle & Kp = BB.decayProducts()[ix].at( sign*321)[0];
113	  const Particle & Km = BB.decayProducts()[ix].at(-sign*321)[0];
114	  _h_aver[2][0]->fill((Kp.momentum()+Km.momentum()).mass());
115	  _h_aver[2][1]->fill((K0.momentum()+Km.momentum()).mass());
116	  _h_aver[2][2]->fill((K0.momentum()+Kp.momentum()).mass());
117	}
118      }
119    }
120
121
122    /// Normalise histograms etc., after the run
123    void finalize() {
124      for(unsigned int ix=0;ix<3;++ix)
125	for(unsigned int iy=0;iy<3;++iy)
126	  normalize(_h_aver[ix][iy],1.,false);
127      for(unsigned int ix=0;ix<2;++ix) {
128	normalize(_h_charge2[ix],1.,false);
129	for(unsigned int iy=0;iy<2;++iy)
130	  normalize(_h_charge1[ix][iy],1.,false);
131      }
132    }
133
134    /// @}
135
136
137    /// @name Histograms
138    /// @{
139    Histo1DPtr _h_aver[3][3];
140    Histo1DPtr _h_charge1[2][2];
141    Histo1DPtr _h_charge2[2];
142    /// @}
143
144
145  };
146
147
148  RIVET_DECLARE_PLUGIN(BABAR_2012_I1086537);
149
150}