rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2016_I1409292

Mass spectra in $B^+\to K^+\pi^+\pi^-\gamma$ decays
Experiment: BABAR (PEP-II)
Inspire ID: 1409292
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References:
  • Phys.Rev.D 93 (2016) 5, 052013
Beams: * *
Beam energies: ANY
Run details:
  • Any process making $B^+$ mesons, originally $\Upslion(4S)$ decay.

Mass spectra in $B^+\to K^+\pi^+\pi^-\gamma$ decays measured by BABAR. Useful for testing the implementation of these decays

Source code: BABAR_2016_I1409292.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+ pi+ pi- gamma
10  class BABAR_2016_I1409292 : public Analysis {
11  public:
12
13    /// Constructor
14    RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2016_I1409292);
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==521);
24      declare(ufs, "UFS");
25      DecayedParticles BP(ufs);
26      BP.addStable(PID::PI0);
27      declare(BP, "BP");
28      // histograms
29      for(unsigned int ix=0;ix<2;++ix) {
30	book(_h[ix],1+ix,1,1);
31      }
32    }
33
34
35    /// Perform the per-event analysis
36    void analyze(const Event& event) {
37      static const map<PdgId,unsigned int> & mode   = { { 321,1},{ 211,1}, {-211,1}, {22,1}};
38      static const map<PdgId,unsigned int> & modeCC = { {-321,1},{ 211,1}, {-211,1}, {22,1}};
39      DecayedParticles BP = apply<DecayedParticles>(event, "BP");
40      // loop over particles
41      for(unsigned int ix=0;ix<BP.decaying().size();++ix) {
42      	int sign = 1;
43      	if (BP.decaying()[ix].pid()>0 && BP.modeMatches(ix,4,mode)) {
44      	  sign=1;
45      	}
46      	else if  (BP.decaying()[ix].pid()<0 && BP.modeMatches(ix,4,modeCC)) {
47      	  sign=-1;
48      	}
49      	else
50      	  continue;
51	const Particle & Kp  = BP.decayProducts()[ix].at( sign*321)[0];
52	const Particle & pip = BP.decayProducts()[ix].at( sign*211)[0];
53	const Particle & pim = BP.decayProducts()[ix].at(-sign*211)[0];
54	_h[0]->fill((Kp.momentum()+pim.momentum()+pip.momentum()).mass());
55	_h[1]->fill((Kp.momentum()+pim.momentum()).mass());
56      }
57    }
58
59
60    /// Normalise histograms etc., after the run
61    void finalize() {
62      for(unsigned int ix=0;ix<2;++ix) {
63	normalize(_h[ix],1.,false);
64      }
65    }
66
67    /// @}
68
69
70    /// @name Histograms
71    /// @{
72    Histo1DPtr _h[2];
73    /// @}
74
75
76  };
77
78
79  RIVET_DECLARE_PLUGIN(BABAR_2016_I1409292);
80
81}