Rivet analyses referenceBABAR_2007_I756323Measurements of Semi-Leptonic Tau Decays into Three Charged HadronsExperiment: BaBar (PEP-II) Inspire ID: 756323 Status: VALIDATED Authors:
Beam energies: ANY Run details:
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. Can be run with any process producing tau leptons.' 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
38
39 void analyze(const Event& e) {
40 // Find the taus
41 Particles taus;
42 for(const Particle& p : apply<UnstableParticles>(e, "UFS").particles(Cuts::pid==PID::TAU)) {
43 _weight_total->fill();
44 Particles pip, pim, Kp, Km;
45 unsigned int nstable = 0;
46 // Find the decay products we want
47 findDecayProducts(p, nstable, pip, pim, Kp, Km);
48 if (p.pid() < 0) {
49 swap(pip, pim);
50 swap(Kp, Km );
51 }
52 if (nstable != 4) continue;
53 // pipipi
54 if (pim.size() == 2 && pip.size() == 1) {
55 _weight_pipipi->fill();
56 _hist_pipipi_pipipi->
57 fill((pip[0].momentum()+pim[0].momentum()+pim[1].momentum()).mass());
58 _hist_pipipi_pipi->
59 fill((pip[0].momentum()+pim[0].momentum()).mass());
60 _hist_pipipi_pipi->
61 fill((pip[0].momentum()+pim[1].momentum()).mass());
62 }
63 else if (pim.size() == 1 && pip.size() == 1 && Km.size() == 1) {
64 _weight_Kpipi->fill();
65 _hist_Kpipi_Kpipi->
66 fill((pim[0].momentum()+pip[0].momentum()+Km[0].momentum()).mass());
67 _hist_Kpipi_Kpi->
68 fill((pip[0].momentum()+Km[0].momentum()).mass());
69 _hist_Kpipi_pipi->
70 fill((pim[0].momentum()+pip[0].momentum()).mass());
71 }
72 else if (Kp.size() == 1 && Km.size() == 1 && pim.size() == 1) {
73 _weight_KpiK->fill();
74 _hist_KpiK_KpiK->
75 fill((Kp[0].momentum()+Km[0].momentum()+pim[0].momentum()).mass());
76 _hist_KpiK_KK->
77 fill((Kp[0].momentum()+Km[0].momentum()).mass());
78 _hist_KpiK_piK->
79 fill((Kp[0].momentum()+pim[0].momentum()).mass());
80 }
81 else if (Kp.size() == 1 && Km.size() == 2) {
82 _weight_KKK->fill();
83 _hist_KKK_KKK->
84 fill((Kp[0].momentum()+Km[0].momentum()+Km[1].momentum()).mass());
85 _hist_KKK_KK->
86 fill((Kp[0].momentum()+Km[0].momentum()).mass());
87 _hist_KKK_KK->
88 fill((Kp[0].momentum()+Km[1].momentum()).mass());
89 }
90 }
91 }
92
93
94 void finalize() {
95 normalize(_hist_pipipi_pipipi);
96 normalize(_hist_pipipi_pipi);
97 normalize(_hist_Kpipi_Kpipi);
98 normalize(_hist_Kpipi_Kpi );
99 normalize(_hist_Kpipi_pipi );
100 normalize(_hist_KpiK_KpiK );
101 normalize(_hist_KpiK_KK );
102 normalize(_hist_KpiK_piK );
103 normalize(_hist_KKK_KKK );
104 normalize(_hist_KKK_KK );
105 Estimate0DPtr tmp;
106 book(tmp,11,1,1);
107 divide(*_weight_pipipi, *_weight_total, tmp);
108 scale(tmp,100.);
109 book(tmp,12,1,1);
110 divide(*_weight_Kpipi, *_weight_total, tmp);
111 scale(tmp,100.);
112 book(tmp,13,1,1);
113 divide(*_weight_KpiK, *_weight_total, tmp);
114 scale(tmp,100.);
115 book(tmp,14,1,1);
116 divide(*_weight_KKK, *_weight_total, tmp);
117 scale(tmp,100.);
118 }
119
120
121 private:
122
123 // Histograms
124 Histo1DPtr _hist_pipipi_pipipi, _hist_pipipi_pipi;
125 Histo1DPtr _hist_Kpipi_Kpipi, _hist_Kpipi_Kpi, _hist_Kpipi_pipi;
126 Histo1DPtr _hist_KpiK_KpiK, _hist_KpiK_KK, _hist_KpiK_piK;
127 Histo1DPtr _hist_KKK_KKK, _hist_KKK_KK;
128
129 // Weights counters
130 CounterPtr _weight_total, _weight_pipipi, _weight_Kpipi, _weight_KpiK, _weight_KKK;
131
132
133 void findDecayProducts(const Particle &mother,
134 unsigned int & nstable,
135 Particles& pip, Particles& pim,
136 Particles& Kp, Particles& Km) {
137 for (const Particle &p : mother.children()) {
138 long id = p.pid();
139 if (id == PID::PI0 )
140 ++nstable;
141 else if (id == PID::K0S)
142 ++nstable;
143 else if (id == PID::PIPLUS) {
144 pip.push_back(p);
145 ++nstable;
146 }
147 else if (id == PID::PIMINUS) {
148 pim.push_back(p);
149 ++nstable;
150 }
151 else if (id == PID::KPLUS) {
152 Kp.push_back(p);
153 ++nstable;
154 }
155 else if (id == PID::KMINUS) {
156 Km.push_back(p);
157 ++nstable;
158 }
159 else if (!p.children().empty()) {
160 findDecayProducts(p, nstable, pip, pim, Kp, Km);
161 }
162 else ++nstable;
163 }
164 }
165
166 };
167
168
169 RIVET_DECLARE_ALIASED_PLUGIN(BABAR_2007_I756323, BABAR_2007_S7266081);
170
171}
|