rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

BABAR_2007_I756323

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_I756323.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_I756323 : public Analysis {
 12  public:
 13
 14    RIVET_DEFAULT_ANALYSIS_CTOR(BABAR_2007_I756323);
 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);
 38      book(tmp12, 12, 1, 1);
 39      book(tmp13, 13, 1, 1);
 40      book(tmp14, 14, 1, 1);
 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->bin(1).set(100*_weight_pipipi->val()/_weight_total->val(),
119                        100*sqrt(double(_weight_pipipi->val()))/_weight_total->val());
120      tmp12->bin(1).set(100*_weight_Kpipi->val()/_weight_total->val(),
121                        100*sqrt(double(_weight_Kpipi->val()))/_weight_total->val());
122      tmp13->bin(1).set(100*_weight_KpiK->val()/_weight_total->val(),
123                        100*sqrt(double(_weight_KpiK->val()))/_weight_total->val());
124      tmp14->bin(1).set(100*_weight_KKK->val()/_weight_total->val(),
125                        100*sqrt(double(_weight_KKK->val()))/_weight_total->val());
126    }
127
128
129  private:
130
131    Estimate1DPtr tmp11, tmp12, tmp13, tmp14;
132
133    // Histograms
134    Histo1DPtr _hist_pipipi_pipipi, _hist_pipipi_pipi;
135    Histo1DPtr _hist_Kpipi_Kpipi, _hist_Kpipi_Kpi, _hist_Kpipi_pipi;
136    Histo1DPtr _hist_KpiK_KpiK, _hist_KpiK_KK, _hist_KpiK_piK;
137    Histo1DPtr _hist_KKK_KKK, _hist_KKK_KK;
138
139    // Weights counters
140    CounterPtr _weight_total, _weight_pipipi, _weight_Kpipi, _weight_KpiK, _weight_KKK;
141
142
143    void findDecayProducts(const Particle &mother,
144                           unsigned int & nstable,
145                           Particles& pip, Particles& pim,
146                           Particles& Kp, Particles& Km) {
147      for (const Particle &p : mother.children()) {
148        long id = p.pid();
149        if (id == PID::PI0 )
150          ++nstable;
151        else if (id == PID::K0S)
152          ++nstable;
153        else if (id == PID::PIPLUS) {
154          pip.push_back(p);
155          ++nstable;
156        }
157        else if (id == PID::PIMINUS) {
158          pim.push_back(p);
159          ++nstable;
160        }
161        else if (id == PID::KPLUS) {
162          Kp.push_back(p);
163          ++nstable;
164        }
165        else if (id == PID::KMINUS) {
166          Km.push_back(p);
167          ++nstable;
168        }
169        else if (!p.children().empty()) {
170          findDecayProducts(p, nstable, pip, pim, Kp, Km);
171        }
172        else  ++nstable;
173      }
174    }
175
176  };
177
178
179  RIVET_DECLARE_ALIASED_PLUGIN(BABAR_2007_I756323, BABAR_2007_S7266081);
180
181}