rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2009_I785439

Mass distributions in $B\to\eta K\gamma$ decays
Experiment: BABAR (PEP-II)
Inspire ID: 785439
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References:
  • Phys.Rev.D 79 (2009) 011102
Beams: * *
Beam energies: ANY
Run details:
  • Any process producing B mesons, originally Upsilon(4S) decays

Mass distributions in $B\to\eta K\gamma$ decays

Source code: BABAR_2009_I785439.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 -> eta K gamma
10  class BABAR_2009_I785439 : public Analysis {
11  public:
12
13    /// Constructor
14    RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2009_I785439);
15
16
17    /// @name Analysis methods
18    /// @{
19
20    /// Book histograms and initialise projections before the run
21    void init() {
22      // Initialise and register projections
23      UnstableParticles ufs = UnstableParticles(Cuts::abspid==511||
24						Cuts::abspid==521);
25      declare(ufs, "UFS");
26      DecayedParticles BB(ufs);
27      BB.addStable(PID::ETA);
28      BB.addStable(PID::K0S);
29      declare(BB, "BB");
30      // histos
31      for(unsigned int ix=0;ix<2;++ix)
32	book(_h[ix],1,1,1+ix);
33    }
34
35
36    /// Perform the per-event analysis
37    void analyze(const Event& event) {
38      static const map<PdgId,unsigned int> & mode1   = { { 221,1},{ 310,1}, {22,1}};
39      static const map<PdgId,unsigned int> & mode2   = { { 221,1},{ 321,1}, {22,1}};
40      static const map<PdgId,unsigned int> & mode2CC = { { 221,1},{-321,1}, {22,1}};
41      DecayedParticles BB = apply<DecayedParticles>(event, "BB");
42      // loop over particles
43      for(unsigned int ix=0;ix<BB.decaying().size();++ix) {
44       	int imode=0,sign = 1;
45	if(BB.decaying()[ix].abspid()==511) {
46	  imode=1;
47	  if (!BB.modeMatches(ix,3,mode1)) continue;
48	}
49	else {
50	  imode=0;
51	  if (BB.decaying()[ix].pid()>0 && BB.modeMatches(ix,3,mode2)) {
52	    sign=1;
53	  }
54	  else if  (BB.decaying()[ix].pid()<0 && BB.modeMatches(ix,3,mode2CC)) {
55	    sign=-1;
56	  }
57	  else
58	    continue;
59	}
60	const Particle & KK    = BB.decayProducts()[ix].at(imode==0 ?  sign*321 : 310)[0];
61      	const Particle & eta   = BB.decayProducts()[ix].at(      221)[0];
62	_h[imode]->fill((KK.momentum()+eta.momentum()).mass());
63      }
64    }
65
66
67    /// Normalise histograms etc., after the run
68    void finalize() {
69      for(unsigned int ix=0;ix<2;++ix)
70	normalize(_h[ix],1.,false);
71    }
72
73    /// @}
74
75
76    /// @name Histograms
77    /// @{
78    Histo1DPtr _h[2];
79    /// @}
80
81
82  };
83
84
85  RIVET_DECLARE_PLUGIN(BABAR_2009_I785439);
86
87}