Rivet analyses referenceBELLE_2007_I753243$K_S^0\pi^-$ spectrum in $\tau$ decaysExperiment: BELLE (KEKB) Inspire ID: 753243 Status: VALIDATED Authors:
Beam energies: ANY Run details:
Measurement of the spectrum of $K_S^0\pi^-$ spectrum in $\tau$ decays by BELLE. Useful for testing models of the hadronic current in $\tau$ decays. Source code: BELLE_2007_I753243.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_2007_I753243 : public Analysis {
10 public:
11
12 /// Constructor
13 RIVET_DEFAULT_ANALYSIS_CTOR(BELLE_2007_I753243);
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(_hist_Kpi, 1, 1, 1);
24
25 }
26
27 void findDecayProducts(const Particle & mother, unsigned int & nstable,
28 unsigned int & npip, unsigned int & npim,
29 unsigned int & nK, FourMomentum & ptot) {
30 for(const Particle & p : mother.children()) {
31 int id = p.pid();
32 if (id == PID::K0S ) {
33 ++nK;
34 ++nstable;
35 ptot += p.momentum();
36 }
37 else if (id == PID::PIPLUS) {
38 ++npip;
39 ++nstable;
40 ptot += p.momentum();
41 }
42 else if (id == PID::PIMINUS) {
43 ++npim;
44 ++nstable;
45 ptot += p.momentum();
46 }
47 else if (id == PID::PI0 || id == PID::KPLUS ||
48 id == PID::KMINUS) {
49 ++nstable;
50 }
51 else if ( !p.children().empty() ) {
52 findDecayProducts(p, nstable, npip, npim, nK,ptot);
53 }
54 else
55 ++nstable;
56 }
57 }
58
59 /// Perform the per-event analysis
60 void analyze(const Event& event) {
61
62 // Loop over taus
63 for(const Particle& tau : apply<UnstableParticles>(event, "UFS").particles(Cuts::abspid==PID::TAU)) {
64 unsigned int nstable(0),npip(0),npim(0),nK(0);
65 FourMomentum p_tot(0,0,0,0);
66 findDecayProducts(tau, nstable, npip, npim, nK, p_tot);
67 if (tau.pid() < 0) swap(npip, npim);
68 if(nstable==3 && npim==1 && nK==1)
69 _hist_Kpi->fill(p_tot.mass());
70 }
71 }
72
73
74 /// Normalise histograms etc., after the run
75 void finalize() {
76
77 normalize(_hist_Kpi);
78 }
79
80 /// @}
81
82
83 /// @name Histograms
84 /// @{
85 Histo1DPtr _hist_Kpi;
86 /// @}
87
88
89 };
90
91
92 RIVET_DECLARE_PLUGIN(BELLE_2007_I753243);
93
94
95}
|