rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2007_S7266081

Measurements of Semi-Leptonic Tau Decays into Three Charged Hadrons
Experiment: BaBar (PEP-II)
Inspire ID: 756323
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev.Lett.100:011801,2008
  • arXiv: 0707.2981
  • SLAC-R-936
Beams: e+ e-
Beam energies: (3.5, 8.0) GeV
Run details:
  • Tau production, can be any process but original data was in $e^+ e^-$ at the $\Upsilon(4S)$ resonance, with CoM boosts of 8.0 GeV ($e^-$) and 3.5 GeV ($e^+$)

Measurement of tau decays to three charged hadrons using a data sample corresponding to an integrated luminosity of 342 fb$^{-1}$ collected with the BABAR detector at the SLAC PEP-II electron-positron storage ring operating at a center-of-mass energy near 10.58 GeV.

Source code: BABAR_2007_S7266081.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/UnstableParticles.hh"
  4
  5namespace Rivet {
  6
  7
  8  /// @brief BABAR tau lepton to three charged hadrons
  9  ///
 10  /// @author Peter Richardson
 11  class BABAR_2007_S7266081 : public Analysis {
 12  public:
 13
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2007_S7266081);
 15
 16
 17    void init() {
 18      declare(UnstableParticles(), "UFS");
 19
 20      book(_hist_pipipi_pipipi , 1, 1, 1);
 21      book(_hist_pipipi_pipi   , 2, 1, 1);
 22      book(_hist_Kpipi_Kpipi   , 3, 1, 1);
 23      book(_hist_Kpipi_Kpi     , 4, 1, 1);
 24      book(_hist_Kpipi_pipi    , 5, 1, 1);
 25      book(_hist_KpiK_KpiK     , 6, 1, 1);
 26      book(_hist_KpiK_KK       , 7, 1, 1);
 27      book(_hist_KpiK_piK      , 8, 1, 1);
 28      book(_hist_KKK_KKK       , 9, 1, 1);
 29      book(_hist_KKK_KK        ,10, 1, 1);
 30
 31      book(_weight_total, "/TMP/weight_total");
 32      book(_weight_pipipi, "/TMP/weight_pipipi");
 33      book(_weight_Kpipi, "/TMP/weight_Kpipi");
 34      book(_weight_KpiK, "/TMP/weight_KpiK");
 35      book(_weight_KKK, "/TMP/weight_KKK");
 36
 37      book(tmp11, 11, 1, 1, true);
 38      book(tmp12, 12, 1, 1, true);
 39      book(tmp13, 13, 1, 1, true);
 40      book(tmp14, 14, 1, 1, true);
 41    }
 42
 43
 44    void analyze(const Event& e) {
 45      // Find the taus
 46      Particles taus;
 47      for(const Particle& p : apply<UnstableParticles>(e, "UFS").particles(Cuts::pid==PID::TAU)) {
 48        _weight_total->fill();
 49        Particles pip, pim, Kp, Km;
 50        unsigned int nstable = 0;
 51        // Find the decay products we want
 52        findDecayProducts(p, nstable, pip, pim, Kp, Km);
 53        if (p.pid() < 0) {
 54          swap(pip, pim);
 55          swap(Kp, Km );
 56        }
 57        if (nstable != 4) continue;
 58        // pipipi
 59        if (pim.size() == 2 && pip.size() == 1) {
 60          _weight_pipipi->fill();
 61          _hist_pipipi_pipipi->
 62            fill((pip[0].momentum()+pim[0].momentum()+pim[1].momentum()).mass());
 63          _hist_pipipi_pipi->
 64            fill((pip[0].momentum()+pim[0].momentum()).mass());
 65          _hist_pipipi_pipi->
 66            fill((pip[0].momentum()+pim[1].momentum()).mass());
 67        }
 68        else if (pim.size() == 1 && pip.size() == 1 && Km.size() == 1) {
 69          _weight_Kpipi->fill();
 70          _hist_Kpipi_Kpipi->
 71            fill((pim[0].momentum()+pip[0].momentum()+Km[0].momentum()).mass());
 72          _hist_Kpipi_Kpi->
 73            fill((pip[0].momentum()+Km[0].momentum()).mass());
 74          _hist_Kpipi_pipi->
 75            fill((pim[0].momentum()+pip[0].momentum()).mass());
 76        }
 77        else if (Kp.size() == 1 && Km.size() == 1 && pim.size() == 1) {
 78          _weight_KpiK->fill();
 79          _hist_KpiK_KpiK->
 80            fill((Kp[0].momentum()+Km[0].momentum()+pim[0].momentum()).mass());
 81          _hist_KpiK_KK->
 82            fill((Kp[0].momentum()+Km[0].momentum()).mass());
 83          _hist_KpiK_piK->
 84            fill((Kp[0].momentum()+pim[0].momentum()).mass());
 85        }
 86        else if (Kp.size() == 1 && Km.size() == 2) {
 87          _weight_KKK->fill();
 88          _hist_KKK_KKK->
 89            fill((Kp[0].momentum()+Km[0].momentum()+Km[1].momentum()).mass());
 90          _hist_KKK_KK->
 91            fill((Kp[0].momentum()+Km[0].momentum()).mass());
 92          _hist_KKK_KK->
 93            fill((Kp[0].momentum()+Km[1].momentum()).mass());
 94        }
 95      }
 96    }
 97
 98
 99    void finalize() {
100      if (_weight_pipipi->val() > 0.) {
101        scale(_hist_pipipi_pipipi, 1.0 / *_weight_pipipi);
102        scale(_hist_pipipi_pipi  , 0.5 / *_weight_pipipi);
103      }
104      if (_weight_Kpipi->val() > 0.) {
105        scale(_hist_Kpipi_Kpipi  , 1.0 / *_weight_Kpipi);
106        scale(_hist_Kpipi_Kpi    , 1.0 / *_weight_Kpipi);
107        scale(_hist_Kpipi_pipi   , 1.0 / *_weight_Kpipi);
108      }
109      if (_weight_KpiK->val() > 0.) {
110        scale(_hist_KpiK_KpiK    , 1.0 / *_weight_KpiK);
111        scale(_hist_KpiK_KK      , 1.0 / *_weight_KpiK);
112        scale(_hist_KpiK_piK     , 1.0 / *_weight_KpiK);
113      }
114      if (_weight_KKK->val() > 0.) {
115        scale(_hist_KKK_KKK      , 1.0 / *_weight_KKK);
116        scale(_hist_KKK_KK       , 0.5 / *_weight_KKK);
117      }
118      tmp11->point(0).setY(100*_weight_pipipi->val()/_weight_total->val(), 100*sqrt(double(_weight_pipipi->val()))/_weight_total->val());
119      tmp12->point(0).setY(100*_weight_Kpipi->val()/_weight_total->val(), 100*sqrt(double(_weight_Kpipi->val()))/_weight_total->val());
120      tmp13->point(0).setY(100*_weight_KpiK->val()/_weight_total->val(), 100*sqrt(double(_weight_KpiK->val()))/_weight_total->val());
121      tmp14->point(0).setY(100*_weight_KKK->val()/_weight_total->val(), 100*sqrt(double(_weight_KKK->val()))/_weight_total->val());
122    }
123
124
125  private:
126
127    Scatter2DPtr tmp11, tmp12, tmp13, tmp14;
128
129    // Histograms
130    Histo1DPtr _hist_pipipi_pipipi, _hist_pipipi_pipi;
131    Histo1DPtr _hist_Kpipi_Kpipi, _hist_Kpipi_Kpi, _hist_Kpipi_pipi;
132    Histo1DPtr _hist_KpiK_KpiK, _hist_KpiK_KK, _hist_KpiK_piK;
133    Histo1DPtr _hist_KKK_KKK, _hist_KKK_KK;
134
135    // Weights counters
136    CounterPtr _weight_total, _weight_pipipi, _weight_Kpipi, _weight_KpiK, _weight_KKK;
137
138
139    void findDecayProducts(const Particle &mother,
140                           unsigned int & nstable,
141                           Particles& pip, Particles& pim,
142                           Particles& Kp, Particles& Km) {
143      for (const Particle &p : mother.children()) {
144        long id = p.pid();
145        if (id == PID::PI0 )
146          ++nstable;
147        else if (id == PID::K0S)
148          ++nstable;
149        else if (id == PID::PIPLUS) {
150          pip.push_back(p);
151          ++nstable;
152        }
153        else if (id == PID::PIMINUS) {
154          pim.push_back(p);
155          ++nstable;
156        }
157        else if (id == PID::KPLUS) {
158          Kp.push_back(p);
159          ++nstable;
160        }
161        else if (id == PID::KMINUS) {
162          Km.push_back(p);
163          ++nstable;
164        }
165        else if (!p.children().empty()) {
166          findDecayProducts(p, nstable, pip, pim, Kp, Km);
167        }
168        else  ++nstable;
169      }
170    }
171
172  };
173
174
175  RIVET_DECLARE_ALIASED_PLUGIN(BABAR_2007_S7266081, BABAR_2007_I756323);
176
177}