rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2012_I1123662

Measurement of the energy spectrum for $\bar{B}\to X_s \gamma$
Experiment: BABAR (PEP-II)
Inspire ID: 1123662
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References:
  • Phys.Rev.D 86 (2012) 112008
Beams: * *
Beam energies: ANY
Run details:
  • any process making $B^-$ and $\bar{B}^0$ mesons, eg. particle gun or $\Upslion(4S)$ decay.

Photon energy spectrum in $B\to s\gamma$ decays measured by BELLE. Useful for testing the implementation of these decays

Source code: BABAR_2012_I1123662.cc
 1// -*- C++ -*-
 2#include "Rivet/Analysis.hh"
 3#include "Rivet/Projections/UnstableParticles.hh"
 4
 5namespace Rivet {
 6
 7
 8  /// @brief B -> X_s gamma spectrum
 9  class BABAR_2012_I1123662 : public Analysis {
10  public:
11
12    /// Constructor
13    RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2012_I1123662);
14
15
16    /// @name Analysis methods
17    /// @{
18
19    /// Book histograms and initialise projections before the run
20    void init() {
21      // Initialise and register projections
22      declare(UnstableParticles(), "UFS");
23
24      // Book histograms
25      book(_h_spectrum, 1, 1, 1);
26      book(_nBottom, "TMP/BottomCounter");
27    }
28
29    void findDecayProducts(const Particle& mother,
30                           unsigned int& nK0, unsigned int& nKp,
31			   unsigned int& nKm) {
32      for (const Particle & p : mother.children()) {
33        int id = p.pid();
34        if ( id == PID::KPLUS )      ++nKp;
35        else if (id == PID::KMINUS ) ++nKm;
36        else if (id == PID::K0S)     ++nK0;
37        else if (id == PID::PI0 || id == PID::PIPLUS || id == PID::PIMINUS) {
38	  continue;
39        }
40        else if ( !p.children().empty() ) {
41          findDecayProducts(p, nK0, nKp, nKm);
42        }
43      }
44    }
45
46    /// Perform the per-event analysis
47    void analyze(const Event& event) {
48      // Loop over bottoms
49      for (const Particle& bottom : apply<UnstableParticles>(event, "UFS").particles(Cuts::abspid==521 ||
50										     Cuts::abspid==511)) {
51	// remove mixing entries etc
52	for (const Particle & child : bottom.children())
53          if (child.abspid() == 511 || child.pid()==bottom.pid() ) continue;
54        _nBottom->fill();
55	FourMomentum pgamma(0.,0.,0.,0.);
56	unsigned int ngamma = 0;
57        for (const Particle & child : bottom.children()) {
58	  if (child.pid() == PID::PHOTON) {
59            ngamma += 1;
60            pgamma += child.momentum();
61          }
62	}
63	if (ngamma != 1) continue;
64        unsigned int nK0(0),nKp(0),nKm(0);
65        FourMomentum p_tot(0,0,0,0);
66        findDecayProducts(bottom, nK0, nKp, nKm);
67        unsigned int nk = nKp-nKm+nK0;
68        if (nk % 2 == 1) {
69	  const LorentzTransform boost = LorentzTransform::mkFrameTransformFromBeta(bottom.momentum().betaVec());
70	  double eGamma = boost.transform(pgamma).E();
71	  _h_spectrum->fill(eGamma);
72	}
73      }
74    }
75
76
77    /// Normalise histograms etc., after the run
78    void finalize() {
79      scale(_h_spectrum, 1e5/_nBottom->sumW());
80    }    
81
82    /// @}
83
84
85    /// @name Histograms
86    /// @{
87    Histo1DPtr _h_spectrum;
88    CounterPtr _nBottom;
89    /// @}
90
91
92  };
93
94
95  RIVET_DECLARE_PLUGIN(BABAR_2012_I1123662);
96
97}