Rivet analyses referenceBELLE_2010_I841618Mass spectra for $h^-h^-h^+$ decays of the $\tau^-$ leptonExperiment: BELLE (KEKB) Inspire ID: 841618 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Mass spectra for $\pi^+\pi^-\pi^+$, $K^-\pi^+\pi^-$, $K^+K^-\pi^-$ and $K^-K^-K^+$ in tau decays measured by BELLE. Useful for testing models of the hadronic current in $\tau$ decays. Source code: BELLE_2010_I841618.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/UnstableParticles.hh"
4
5namespace Rivet {
6
7
8 /// @brief Add a short analysis description here
9 class BELLE_2010_I841618 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BELLE_2010_I841618);
14
15
16 /// @name Analysis methods
17 /// @{
18
19 /// Book histograms and initialise projections before the run
20 void init() {
21
22 declare(UnstableParticles(), "UFS");
23 book(_h_3pi, 1, 1, 1);
24 book(_h_Kpipi, 2, 1, 1);
25 book(_h_KKpi, 3, 1, 1);
26 book(_h_3K, 4, 1, 1);
27
28 }
29
30 void findDecayProducts(const Particle & mother, unsigned int & nstable,
31 unsigned int & npip, unsigned int & npim,
32 unsigned int & nKp, unsigned int & nKm, FourMomentum & ptot) {
33 for(const Particle & p : mother.children()) {
34 int id = p.pid();
35 if ( id == PID::KPLUS ) {
36 ++nKp;
37 ++nstable;
38 ptot += p.momentum();
39 }
40 else if (id == PID::KMINUS ) {
41 ++nKm;
42 ++nstable;
43 ptot += p.momentum();
44 }
45 else if (id == PID::PIPLUS) {
46 ++npip;
47 ++nstable;
48 ptot += p.momentum();
49 }
50 else if (id == PID::PIMINUS) {
51 ++npim;
52 ++nstable;
53 ptot += p.momentum();
54 }
55 else if (id == PID::PI0 || id == PID::K0S) {
56 ++nstable;
57 }
58 else if ( !p.children().empty() ) {
59 findDecayProducts(p, nstable, npip, npim, nKp, nKm,ptot);
60 }
61 else
62 ++nstable;
63 }
64 }
65
66 /// Perform the per-event analysis
67 void analyze(const Event& event) {
68
69 // Loop over taus
70 for(const Particle& tau : apply<UnstableParticles>(event, "UFS").particles(Cuts::abspid==PID::TAU)) {
71 unsigned int nstable(0),npip(0),npim(0),nKp(0),nKm(0);
72 FourMomentum p_tot(0,0,0,0);
73 findDecayProducts(tau, nstable, npip, npim, nKp, nKm, p_tot);
74 if (tau.pid() < 0) {
75 swap(npip, npim);
76 swap(nKp,nKm);
77 }
78 if(nstable!=4) continue;
79 if(npim==2 && npip==1 )
80 _h_3pi->fill(p_tot.mass());
81 else if(npim==1 && npip==1 && nKm==1)
82 _h_Kpipi->fill(p_tot.mass());
83 else if(nKm==1 && nKp==1 && npim==1)
84 _h_KKpi->fill(p_tot.mass());
85 else if(nKm==2 && nKp==1 )
86 _h_3K->fill(p_tot.mass());
87 }
88 }
89
90
91 /// Normalise histograms etc., after the run
92 void finalize() {
93
94 normalize(_h_3pi);
95 normalize(_h_Kpipi);
96 normalize(_h_KKpi);
97 normalize(_h_3K);
98
99 }
100
101 /// @}
102
103
104 /// @name Histograms
105 /// @{
106 Histo1DPtr _h_3pi, _h_Kpipi, _h_KKpi, _h_3K;
107 /// @}
108
109
110 };
111
112
113 RIVET_DECLARE_PLUGIN(BELLE_2010_I841618);
114
115
116}
|