rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2017_I1498564

Electron spectrum inclusive semi-leptonic in B decays
Experiment: BABAR (PEP-II)
Inspire ID: 1498564
Status: VALIDATED NOHEPDATA
Authors:
  • Peter Richardson
References:
  • Phys.Rev. D95 (2017) no.7, 072001
Beams: * *
Beam energies: ANY
Run details:
  • bottom mesons produced at the Upsilon(4S)

Measurement of the electron spectrum inclusive semi-leptonic in $B$ decays, including but the total and the charmless. N.B. The spectum is obtained in the rest frame of the decaying $\Upsilon(4S)$ which produces the decaying $B$ mesons

Source code: BABAR_2017_I1498564.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/UnstableParticles.hh"
  4
  5namespace Rivet {
  6
  7
  8  /// @brief Electron spectrum in B decays
  9  class BABAR_2017_I1498564 : public Analysis {
 10  public:
 11
 12    /// Constructor
 13    RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2017_I1498564);
 14
 15
 16    /// @name Analysis methods
 17    //@{
 18
 19    /// Book histograms and initialise projections before the run
 20    void init() {
 21      // projections
 22      declare(UnstableParticles(),"UFS");
 23      // Book histograms
 24      // specify custom binning
 25      book(_h_light, 1,1,1);
 26      book(_h_all  , 1,1,2);
 27      book(_nB,"/TMP/nB");
 28    }
 29
 30
 31    void findDecayProducts(Particle parent, Particles & em, Particles & ep,
 32			   Particles & nue, Particles & nueBar, bool & charm) {
 33      for(const Particle & p : parent.children()) {
 34	if(PID::isCharmHadron(p.pid())) {
 35	  charm=true;
 36	}
 37	else if(p.pid() == PID::EMINUS) {
 38	  em.push_back(p);
 39	}
 40	else if(p.pid() == PID::EPLUS) {
 41	  ep.push_back(p);
 42	}
 43	else if(p.pid() == PID::NU_E) {
 44	  nue.push_back(p);
 45	}
 46	else if(p.pid() == PID::NU_EBAR) {
 47	  nueBar.push_back(p);
 48	}
 49	else if(PID::isBottomHadron(p.pid())) {
 50	  findDecayProducts(p,em,ep,nue,nueBar,charm);
 51	}
 52	else if(!PID::isHadron(p.pid())) {
 53	  findDecayProducts(p,em,ep,nue,nueBar,charm);
 54	}
 55      }
 56    }
 57
 58
 59    /// Perform the per-event analysis
 60    void analyze(const Event& event) {
 61      // find and loop over Upslion(4S)
 62      const UnstableParticles& ufs = apply<UnstableParticles>(event, "UFS");
 63      for (const Particle& p : ufs.particles(Cuts::pid==300553)) {
 64      	// boost to rest frame
 65      	LorentzTransform cms_boost;
 66      	if (p.p3().mod() > 1*MeV)
 67      	  cms_boost = LorentzTransform::mkFrameTransformFromBeta(p.momentum().betaVec());
 68      	// loop over decay products
 69      	for(const Particle & p2 : p.children()) {
 70      	  if(p2.abspid()==511 || p2.abspid()==521) {
 71	    _nB->fill();
 72	    bool charm = false;
 73      	    Particles em,ep,nue,nueBar;
 74	    findDecayProducts(p2,em,ep,nue,nueBar,charm);
 75	    if(em.size()==1 && nueBar.size()==1) {
 76	      double pmod = cms_boost.transform(em[0].momentum()).p3().mod();
 77	      _h_all->fill(pmod);
 78	      if(!charm) _h_light->fill(pmod);
 79	    }
 80	    else if(ep.size()==1 && nue.size()==1) {
 81	      double pmod = cms_boost.transform(ep[0].momentum()).p3().mod();
 82	      _h_all->fill(pmod);
 83	      if(!charm) _h_light->fill(pmod);
 84	    }
 85      	  }
 86      	}
 87      }
 88    }
 89
 90
 91    /// Normalise histograms etc., after the run
 92    void finalize() {
 93
 94      // normalize to number of B decays
 95      scale(_h_all, 1./ *_nB);
 96      scale(_h_light, 1./ *_nB);
 97    }
 98
 99    //@}
100
101
102    /// @name Histograms
103    //@{
104    Histo1DPtr _h_light,_h_all;
105    CounterPtr _nB;
106    //@}
107
108
109  };
110
111
112  RIVET_DECLARE_PLUGIN(BABAR_2017_I1498564);
113
114}