rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2012_I1122031

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

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

Source code: BABAR_2012_I1122031.cc
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/UnstableParticles.hh"

namespace Rivet {


  /// @brief B -> Xs gamma
  class BABAR_2012_I1122031 : public Analysis {
  public:

    /// Constructor
    RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2012_I1122031);


    /// @name Analysis methods
    /// @{

    /// Book histograms and initialise projections before the run
    void init() {
      // Initialise and register projections
      declare(UnstableParticles(), "UFS");
      // Book histograms
      book(_h, 1, 1, 1);
      book(_nBottom, "TMP/BottomCounter");
    }

    void findDecayProducts(const Particle& mother,
                           unsigned int& nK0, unsigned int& nKp, unsigned int& nKm,
                           FourMomentum& ptot) {
      for (const Particle & p : mother.children()) {
        int id = p.pid();
        if ( id == PID::KPLUS ) {
          ++nKp;
          ptot += p.momentum();
        }
        else if (id == PID::KMINUS ) {
          ++nKm;
          ptot += p.momentum();
        }
        else if (id == PID::K0S) {
          ++nK0;
          ptot += p.momentum();
        }
        else if (id == PID::PI0 || id == PID::PIPLUS || id == PID::PIMINUS) {
          ptot += p.momentum();
        }
        else if ( !p.children().empty() ) {
          findDecayProducts(p, nK0, nKp, nKm, ptot);
        }
        else
          ptot += p.momentum();
      }
    }

    /// Perform the per-event analysis
    void analyze(const Event& event) {
      // Loop over bottoms
      for (const Particle& bottom : apply<UnstableParticles>(event, "UFS").particles(Cuts::abspid==521 ||
										     Cuts::abspid==511)) {
	// remove mixing entries etc
	for (const Particle & child : bottom.children())
          if (child.abspid() == 511 || child.pid()==bottom.pid() ) continue;
        _nBottom->fill();
	FourMomentum pgamma(0.,0.,0.,0.);
	unsigned int ngamma = 0;
        for (const Particle & child : bottom.children()) {
	  if (child.pid() == PID::PHOTON) {
            ngamma += 1;
            pgamma += child.momentum();
          }
	}
	if (ngamma != 1) continue;
        unsigned int nK0(0),nKp(0),nKm(0);
        FourMomentum p_tot(0,0,0,0);
        findDecayProducts(bottom, nK0, nKp, nKm, p_tot);
        unsigned int nk = nKp-nKm+nK0;
        if (nk % 2 == 1) {
          p_tot -= pgamma;
          _h->fill(p_tot.mass()/GeV);
        }
      }
    }


    /// Normalise histograms etc., after the run
    void finalize() {
      scale(_h, 1e6/_nBottom->sumW());
    }

    /// @}


    /// @name Histograms
    /// @{
    Histo1DPtr _h;
    CounterPtr _nBottom;
    /// @}


  };


  RIVET_DECLARE_PLUGIN(BABAR_2012_I1122031);

}