Belle II Software
development
Toggle main menu visibility
Main Page
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
x
z
Typedefs
a
b
c
d
e
g
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
a
b
c
e
f
g
n
p
s
v
z
Enumerator
c
d
f
p
t
v
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Symbols
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
Typedefs
Macros
TauDecayMarkerModule.cc
1
/**************************************************************************
2
* basf2 (Belle II Analysis Software Framework) *
3
* Author: The Belle II Collaboration *
4
* *
5
* See git log for contributors and copyright holders. *
6
* This file is licensed under LGPL-3.0, see LICENSE.md. *
7
**************************************************************************/
8
9
#include <analysis/modules/TauDecayMarker/TauDecayMarkerModule.h>
10
11
#include <framework/logging/Logger.h>
12
#include <framework/gearbox/Const.h>
13
14
using namespace
std
;
15
using namespace
Belle2
;
16
17
//-----------------------------------------------------------------
18
// Register the Module
19
//-----------------------------------------------------------------
20
REG_MODULE
(TauDecayMarker);
21
22
//-----------------------------------------------------------------
23
// Implementation
24
//-----------------------------------------------------------------
25
26
TauDecayMarkerModule::TauDecayMarkerModule
() :
Module
(),
tauPair
(false),
numOfTauPlus
(0),
numOfTauMinus
(0),
idOfTauPlus
(-1),
27
idOfTauMinus
(-1),
m_pmode
(-2),
m_mmode
(-2),
m_pprong
(0),
m_mprong
(0)
28
{
29
// Set module properties
30
setDescription
(
"Module to identify generated tau pair decays, using MCParticle information. Each tau lepton decay channel "
31
"is numbered following the order in the default KKMC decay table. Using this module, "
32
"the channel number will be stored in the variables `tauPlusMCMode`, and `tauMinusMCMode`. "
33
"Further details and usage can be found at `TauDecayMCModes`. "
);
34
setPropertyFlags
(
c_ParallelProcessingCertified
);
35
//Parameter definition
36
addParam
(
"printDecayInfo"
,
m_printDecayInfo
,
"Print information of the tau pair decay from MC."
,
false
);
37
}
26
TauDecayMarkerModule::TauDecayMarkerModule
() :
Module
(),
tauPair
(false),
numOfTauPlus
(0),
numOfTauMinus
(0),
idOfTauPlus
(-1), {
…
}
38
39
void
TauDecayMarkerModule::initialize
()
40
{
41
m_tauDecay
.registerInDataStore();
42
43
}
39
void
TauDecayMarkerModule::initialize
() {
…
}
44
45
void
TauDecayMarkerModule::event
()
46
{
47
if
(!
m_tauDecay
)
m_tauDecay
.create();
48
49
IdentifyTauPair
();
50
if
(
tauPair
) {
51
m_pmode
=
getDecayChannelOfTau
(+1) % 100;
52
m_mmode
=
getDecayChannelOfTau
(-1) % 100;
53
54
m_pprong
=
getProngOfDecay
(*
m_MCParticles
[
idOfTauPlus
- 1]);
55
m_mprong
=
getProngOfDecay
(*
m_MCParticles
[
idOfTauMinus
- 1]);
56
57
if
(
m_printDecayInfo
) {
58
B2INFO(
"Decay ID: "
<<
m_pmode
<<
" (tau+), "
<<
m_mmode
<<
" (tau-)."
<<
59
" Topology: "
<<
m_pprong
<<
"-"
<<
m_mprong
<<
" prong"
);
60
}
61
62
}
else
{
63
m_pmode
= -1;
64
m_mmode
= -1;
65
}
66
67
m_tauDecay
->addTauPlusIdMode(
m_pmode
);
68
m_tauDecay
->addTauMinusIdMode(
m_mmode
);
69
70
m_tauDecay
->addTauPlusMcProng(
m_pprong
);
71
m_tauDecay
->addTauMinusMcProng(
m_mprong
);
72
73
}
45
void
TauDecayMarkerModule::event
() {
…
}
74
75
void
TauDecayMarkerModule::IdentifyTauPair
()
76
{
77
numOfTauPlus
= 0;
78
numOfTauMinus
= 0;
79
idOfTauPlus
= 0;
80
idOfTauMinus
= 0;
81
for
(
int
i = 0; i <
m_MCParticles
.getEntries(); i++) {
82
MCParticle
& p = *
m_MCParticles
[i];
83
84
if
(p.getStatus() == 1 && p.getPDG() == 15) {
85
numOfTauMinus
++;
86
idOfTauMinus
= p.getIndex();
87
}
88
if
(p.getStatus() == 1 && p.getPDG() == -15) {
89
numOfTauPlus
++;
90
idOfTauPlus
= p.getIndex();
91
}
92
}
93
if
(
numOfTauPlus
== 1 &&
numOfTauMinus
== 1) {
94
tauPair
=
true
;
95
}
else
tauPair
=
false
;
96
}
75
void
TauDecayMarkerModule::IdentifyTauPair
() {
…
}
97
98
int
TauDecayMarkerModule::getNumDaughterOfTau
(
int
s,
int
id
,
int
sign)
99
{
100
if
(s == 0 || !
tauPair
)
return
-1;
101
int
tauid =
idOfTauMinus
;
102
if
(s > 0) tauid =
idOfTauPlus
;
103
int
ret = 0;
104
const
MCParticle
& p = *
m_MCParticles
[tauid - 1];
105
106
if
(
id
== 0) {
107
for
(
int
i = p.getFirstDaughter(); i <= p.getLastDaughter(); ++i) {
108
MCParticle
& d = *
m_MCParticles
[i - 1];
109
if
(abs(d.getPDG()) == 24)
110
ret += d.getLastDaughter() - d.getFirstDaughter() + 1;
111
else
ret++;
112
}
113
}
else
{
114
for
(
int
i = p.getFirstDaughter(); i <= p.getLastDaughter(); ++i) {
115
MCParticle
& d = *
m_MCParticles
[i - 1];
116
int
pdg = d.getPDG();
117
if
(pdg ==
id
|| (sign == 0 && abs(pdg) == abs(
id
))) ret++;
118
if
(abs(pdg) == 24) {
119
for
(
int
j = d.getFirstDaughter(); j <= d.getLastDaughter(); ++j) {
120
MCParticle
& e = *
m_MCParticles
[j - 1];
121
int
pdg2 = e.getPDG();
122
if
(pdg2 ==
id
||
123
(sign == 0)) ret++;
124
}
125
}
126
}
127
}
128
return
ret;
129
}
98
int
TauDecayMarkerModule::getNumDaughterOfTau
(
int
s,
int
id
,
int
sign) {
…
}
130
131
int
TauDecayMarkerModule::getNumDaughterOfTauExceptGamma
(
int
s,
int
id
,
int
sign)
132
{
133
if
(s == 0 || !
tauPair
)
return
-1;
134
int
tauid =
idOfTauMinus
;
135
if
(s > 0) tauid =
idOfTauPlus
;
136
int
ret = 0;
137
const
MCParticle
& p = *
m_MCParticles
[tauid - 1];
138
139
if
(
id
== 0) {
140
for
(
int
i = p.getFirstDaughter(); i <= p.getLastDaughter(); ++i) {
141
MCParticle
& d = *
m_MCParticles
[i - 1];
142
if
(abs(d.getPDG()) == 24) {
143
for
(
int
j = d.getFirstDaughter(); j <= d.getLastDaughter(); ++j) {
144
MCParticle
& e = *
m_MCParticles
[j - 1];
145
if
(e.getPDG() !=
Const::photon
.getPDGCode()) ret++;
146
}
147
}
else
if
(d.getPDG() !=
Const::photon
.getPDGCode()) ret++;
148
}
149
}
else
{
150
for
(
int
i = p.getFirstDaughter(); i <= p.getLastDaughter(); ++i) {
151
MCParticle
& d = *
m_MCParticles
[i - 1];
152
int
pdg = d.getPDG();
153
if
(abs(pdg) == 24) {
154
for
(
int
j = d.getFirstDaughter(); j <= d.getLastDaughter(); ++j) {
155
MCParticle
& e = *
m_MCParticles
[j - 1];
156
int
pdg2 = e.getPDG();
157
if
(pdg2 ==
id
||
158
(sign == 0 && abs(pdg2) == abs(
id
))) ret++;
159
}
160
}
else
if
(pdg ==
id
|| (sign == 0 && abs(pdg) == abs(
id
))) ret++;
161
}
162
}
163
return
ret;
164
}
131
int
TauDecayMarkerModule::getNumDaughterOfTauExceptGamma
(
int
s,
int
id
,
int
sign) {
…
}
165
166
int
TauDecayMarkerModule::getDecayChannelOfTau
(
int
s)
167
{
168
int
ret = 0;
169
if
(
tauPair
&& s != 0) {
170
if
(
171
getNumDaughterOfTauExceptGamma
(s, -s * (-12), 1) == 1 &&
172
getNumDaughterOfTauExceptGamma
(s, -s * (11), 1) == 1 &&
173
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
174
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 3
175
) ret = 1 + (
getNumDaughterOfTau
(s, 0, 1) - 3) * 1000;
176
else
if
(
177
getNumDaughterOfTauExceptGamma
(s, -s * (-14), 1) == 1 &&
178
getNumDaughterOfTauExceptGamma
(s, -s * (13), 1) == 1 &&
179
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
180
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 3
181
) ret = 2 + (
getNumDaughterOfTau
(s, 0, 1) - 3) * 1000;
182
else
if
(
183
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
184
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
185
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 2
186
) ret = 3 + (
getNumDaughterOfTau
(s, 0, 1) - 2) * 1000;
187
else
if
(
188
getNumDaughterOfTauExceptGamma
(s, -s * (-213), 1) == 1 &&
189
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
190
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 2
191
) ret = 4 + (
getNumDaughterOfTau
(s, 0, 1) - 2) * 1000;
192
else
if
(
193
getNumDaughterOfTauExceptGamma
(s, -s * (-20213), 1) == 1 &&
194
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
195
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 2
196
) ret = 5 + (
getNumDaughterOfTau
(s, 0, 1) - 2) * 1000;
197
else
if
(
198
getNumDaughterOfTauExceptGamma
(s, -s * (-321), 1) == 1 &&
199
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
200
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 2
201
) ret = 6 + (
getNumDaughterOfTau
(s, 0, 1) - 2) * 1000;
202
else
if
(
203
getNumDaughterOfTauExceptGamma
(s, -s * (-323), 1) == 1 &&
204
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
205
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 2
206
) ret = 7 + (
getNumDaughterOfTau
(s, 0, 1) - 2) * 1000;
207
else
if
(
208
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 2 &&
209
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 1 &&
210
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
211
getNumDaughterOfTauExceptGamma
(s, -s * (211), 1) == 1 &&
212
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
213
) ret = 8 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000;
214
else
if
(
215
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
216
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 3 &&
217
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
218
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
219
) ret = 9 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000;
220
else
if
(
221
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 2 &&
222
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 2 &&
223
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
224
getNumDaughterOfTauExceptGamma
(s, -s * (211), 1) == 1 &&
225
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 6
226
) ret = 10 + (
getNumDaughterOfTau
(s, 0, 1) - 6) * 1000;
227
else
if
(
228
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 3 &&
229
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
230
getNumDaughterOfTauExceptGamma
(s, -s * (211), 1) == 2 &&
231
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 6
232
) ret = 11 + (
getNumDaughterOfTau
(s, 0, 1) - 6) * 1000;
233
else
if
(
234
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 3 &&
235
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 1 &&
236
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
237
getNumDaughterOfTauExceptGamma
(s, -s * (211), 1) == 2 &&
238
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 7
239
) ret = 12 + (
getNumDaughterOfTau
(s, 0, 1) - 7) * 1000;
240
else
if
(
241
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 2 &&
242
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 3 &&
243
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
244
getNumDaughterOfTauExceptGamma
(s, -s * (211), 1) == 1 &&
245
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 7
246
) ret = 13 + (
getNumDaughterOfTau
(s, 0, 1) - 7) * 1000;
247
else
if
(
248
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
249
getNumDaughterOfTauExceptGamma
(s, -s * (-321), 1) == 1 &&
250
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
251
getNumDaughterOfTauExceptGamma
(s, -s * (321), 1) == 1 &&
252
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 4
253
) ret = 14 + (
getNumDaughterOfTau
(s, 0, 1) - 4) * 1000;
254
else
if
(
255
getNumDaughterOfTauExceptGamma
(s, -s * (-10313), 1) == 1 &&
256
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
257
getNumDaughterOfTauExceptGamma
(s, -s * (10313), 1) == 1 &&
258
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
259
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 4
260
) ret = 15 + (
getNumDaughterOfTau
(s, 0, 1) - 4) * 1000;
261
else
if
(
262
(
getNumDaughterOfTauExceptGamma
(s, 130, 0)
263
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) == 2 ||
264
getNumDaughterOfTauExceptGamma
(s, 311, 0) == 2) &&
265
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
266
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
267
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 4
268
) ret = 15 + (
getNumDaughterOfTau
(s, 0, 1) - 4) * 1000
269
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) * 10000
270
+
getNumDaughterOfTauExceptGamma
(s, 130, 0) * 100000;
271
else
if
(
272
getNumDaughterOfTauExceptGamma
(s, -s * (-321), 1) == 1 &&
273
getNumDaughterOfTauExceptGamma
(s, -s * (10313), 1) == 1 &&
274
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 1 &&
275
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
276
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 4
277
) ret = 16 + (
getNumDaughterOfTau
(s, 0, 1) - 4) * 1000;
278
else
if
(
279
(
getNumDaughterOfTauExceptGamma
(s, 130, 0)
280
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) == 1 ||
281
getNumDaughterOfTauExceptGamma
(s, 311, 0) == 1) &&
282
getNumDaughterOfTauExceptGamma
(s, -s * (-321), 1) == 1 &&
283
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 1 &&
284
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
285
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 4
286
) ret = 16 + (
getNumDaughterOfTau
(s, 0, 1) - 4) * 1000
287
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) * 10000
288
+
getNumDaughterOfTauExceptGamma
(s, 130, 0) * 100000;
289
else
if
(
290
getNumDaughterOfTauExceptGamma
(s, -s * (-321), 1) == 1 &&
291
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 2 &&
292
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
293
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 4
294
) ret = 17 + (
getNumDaughterOfTau
(s, 0, 1) - 4) * 1000;
295
else
if
(
296
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
297
getNumDaughterOfTauExceptGamma
(s, -s * (-321), 1) == 1 &&
298
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
299
getNumDaughterOfTauExceptGamma
(s, -s * (211), 1) == 1 &&
300
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 4
301
) ret = 18 + (
getNumDaughterOfTau
(s, 0, 1) - 4) * 1000;
302
else
if
(
303
getNumDaughterOfTauExceptGamma
(s, -s * (-10313), 1) == 1 &&
304
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
305
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 1 &&
306
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
307
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 4
308
) ret = 19 + (
getNumDaughterOfTau
(s, 0, 1) - 4) * 1000;
309
else
if
(
310
(
getNumDaughterOfTauExceptGamma
(s, 130, 0)
311
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) == 1 ||
312
getNumDaughterOfTauExceptGamma
(s, 311, 0) == 1) &&
313
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
314
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 1 &&
315
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
316
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 4
317
) ret = 19 + (
getNumDaughterOfTau
(s, 0, 1) - 4) * 1000
318
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) * 10000
319
+
getNumDaughterOfTauExceptGamma
(s, 130, 0) * 100000;
320
else
if
(
321
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
322
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 1 &&
323
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
324
getNumDaughterOfTauExceptGamma
(s, 221, 1) == 1 &&
325
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 4
326
) ret = 20 + (
getNumDaughterOfTau
(s, 0, 1) - 4) * 1000;
327
else
if
(
328
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
329
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 1 &&
330
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
331
getNumDaughterOfTau
(s, 22, 1) >= 1 &&
332
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 3
333
) ret = 21 + (
getNumDaughterOfTau
(s, 0, 1) - 3) * 1000;
334
else
if
(
335
getNumDaughterOfTauExceptGamma
(s, -s * (-321), 1) == 1 &&
336
getNumDaughterOfTauExceptGamma
(s, -s * (10313), 1) == 1 &&
337
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
338
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 3
339
) ret = 22 + (
getNumDaughterOfTau
(s, 0, 1) - 3) * 1000;
340
else
if
(
341
(
getNumDaughterOfTauExceptGamma
(s, 130, 0)
342
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) == 1 ||
343
getNumDaughterOfTauExceptGamma
(s, 311, 0) == 1) &&
344
getNumDaughterOfTauExceptGamma
(s, -s * (-321), 1) == 1 &&
345
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
346
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 3
347
) ret = 22 + (
getNumDaughterOfTau
(s, 0, 1) - 3) * 1000
348
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) * 10000
349
+
getNumDaughterOfTauExceptGamma
(s, 130, 0) * 100000;
350
else
if
(
351
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
352
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 4 &&
353
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
354
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 6
355
) ret = 23 + (
getNumDaughterOfTau
(s, 0, 1) - 6) * 1000;
356
else
if
(
357
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
358
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 1 &&
359
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
360
getNumDaughterOfTauExceptGamma
(s, 223, 1) == 1 &&
361
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 4
362
) ret = 24 + (
getNumDaughterOfTau
(s, 0, 1) - 4) * 1000;
363
else
if
(
364
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 2 &&
365
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
366
getNumDaughterOfTauExceptGamma
(s, -s * (211), 1) == 1 &&
367
getNumDaughterOfTauExceptGamma
(s, 221, 1) == 1 &&
368
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
369
) ret = 25 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000;
370
else
if
(
371
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
372
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 2 &&
373
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
374
getNumDaughterOfTauExceptGamma
(s, 221, 1) == 1 &&
375
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
376
) ret = 26 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000;
377
else
if
(
378
getNumDaughterOfTauExceptGamma
(s, -s * (-321), 1) == 1 &&
379
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
380
getNumDaughterOfTauExceptGamma
(s, 221, 1) == 1 &&
381
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 3
382
) ret = 27 + (
getNumDaughterOfTau
(s, 0, 1) - 3) * 1000;
383
else
if
(
384
getNumDaughterOfTauExceptGamma
(s, -s * (-323), 1) == 1 &&
385
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
386
getNumDaughterOfTauExceptGamma
(s, 221, 1) == 1 &&
387
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 3
388
) ret = 28 + (
getNumDaughterOfTau
(s, 0, 1) - 3) * 1000;
389
else
if
(
390
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
391
getNumDaughterOfTauExceptGamma
(s, -s * (-321), 1) == 1 &&
392
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 1 &&
393
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
394
getNumDaughterOfTauExceptGamma
(s, -s * (211), 1) == 1 &&
395
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
396
) ret = 29 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000;
397
else
if
(
398
getNumDaughterOfTauExceptGamma
(s, -s * (-321), 1) == 1 &&
399
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 3 &&
400
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
401
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
402
) ret = 30 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000;
403
else
if
(
404
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 2 &&
405
getNumDaughterOfTauExceptGamma
(s, -s * (10313), 1) == 1 &&
406
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
407
getNumDaughterOfTauExceptGamma
(s, -s * (211), 1) == 1 &&
408
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
409
) ret = 31 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000;
410
else
if
(
411
(
getNumDaughterOfTauExceptGamma
(s, 130, 0)
412
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) == 1 ||
413
getNumDaughterOfTauExceptGamma
(s, 311, 0) == 1) &&
414
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 2 &&
415
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
416
getNumDaughterOfTauExceptGamma
(s, -s * (211), 1) == 1 &&
417
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
418
) ret = 31 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000
419
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) * 10000
420
+
getNumDaughterOfTauExceptGamma
(s, 130, 0) * 100000;
421
else
if
(
422
getNumDaughterOfTauExceptGamma
(s, -s * (-10313), 1) == 1 &&
423
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
424
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 2 &&
425
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
426
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
427
) ret = 32 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000;
428
else
if
(
429
(
getNumDaughterOfTauExceptGamma
(s, 130, 0)
430
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) == 1 ||
431
getNumDaughterOfTauExceptGamma
(s, 311, 0) == 1) &&
432
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
433
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 2 &&
434
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
435
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
436
) ret = 32 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000
437
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) * 10000
438
+
getNumDaughterOfTauExceptGamma
(s, 130, 0) * 100000;
439
else
if
(
440
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
441
getNumDaughterOfTauExceptGamma
(s, -s * (-321), 1) == 1 &&
442
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 1 &&
443
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
444
getNumDaughterOfTauExceptGamma
(s, -s * (321), 1) == 1 &&
445
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
446
) ret = 33 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000;
447
else
if
(
448
getNumDaughterOfTauExceptGamma
(s, -s * (-10313), 1) == 1 &&
449
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
450
getNumDaughterOfTauExceptGamma
(s, -s * (10313), 1) == 1 &&
451
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 1 &&
452
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
453
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
454
) ret = 34 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000;
455
else
if
(
456
(
getNumDaughterOfTauExceptGamma
(s, 130, 0)
457
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) == 2 ||
458
getNumDaughterOfTauExceptGamma
(s, 311, 0) == 2) &&
459
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
460
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 1 &&
461
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
462
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
463
) ret = 34 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000
464
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) * 10000
465
+
getNumDaughterOfTauExceptGamma
(s, 130, 0) * 100000;
466
else
if
(
467
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 2 &&
468
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
469
getNumDaughterOfTauExceptGamma
(s, -s * (211), 1) == 1 &&
470
getNumDaughterOfTauExceptGamma
(s, 223, 1) == 1 &&
471
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
472
) ret = 35 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000;
473
else
if
(
474
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
475
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 2 &&
476
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
477
getNumDaughterOfTauExceptGamma
(s, 223, 1) == 1 &&
478
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
479
) ret = 36 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000;
480
else
if
(
481
getNumDaughterOfTauExceptGamma
(s, -s * (-11), 1) == 1 &&
482
getNumDaughterOfTauExceptGamma
(s, -s * (-12), 1) == 1 &&
483
getNumDaughterOfTauExceptGamma
(s, -s * (11), 1) == 2 &&
484
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
485
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
486
) ret = 37 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000;
487
else
if
(
488
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
489
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
490
getNumDaughterOfTauExceptGamma
(s, 20223, 1) == 1 &&
491
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 3
492
) ret = 38 + (
getNumDaughterOfTau
(s, 0, 1) - 3) * 1000;
493
else
if
(
494
getNumDaughterOfTauExceptGamma
(s, -s * (-321), 1) == 1 &&
495
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
496
getNumDaughterOfTauExceptGamma
(s, 223, 1) == 1 &&
497
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 3
498
) ret = 39 + (
getNumDaughterOfTau
(s, 0, 1) - 3) * 1000;
499
else
if
(
500
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
501
getNumDaughterOfTauExceptGamma
(s, -s * (-321), 1) == 1 &&
502
getNumDaughterOfTauExceptGamma
(s, -s * (10313), 1) == 1 &&
503
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
504
getNumDaughterOfTauExceptGamma
(s, -s * (211), 1) == 1 &&
505
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
506
) ret = 40 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000;
507
else
if
(
508
(
getNumDaughterOfTauExceptGamma
(s, 130, 0)
509
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) == 1 ||
510
getNumDaughterOfTauExceptGamma
(s, 311, 0) == 1) &&
511
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 1 &&
512
getNumDaughterOfTauExceptGamma
(s, -s * (-321), 1) == 1 &&
513
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
514
getNumDaughterOfTauExceptGamma
(s, -s * (211), 1) == 1 &&
515
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
516
) ret = 40 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000
517
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) * 10000
518
+
getNumDaughterOfTauExceptGamma
(s, 130, 0) * 100000;
519
else
if
(
520
getNumDaughterOfTauExceptGamma
(s, -s * (-321), 1) == 1 &&
521
getNumDaughterOfTauExceptGamma
(s, -s * (10313), 1) == 1 &&
522
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 2 &&
523
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
524
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
525
) ret = 41 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000;
526
else
if
(
527
(
getNumDaughterOfTauExceptGamma
(s, 130, 0)
528
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) == 1 ||
529
getNumDaughterOfTauExceptGamma
(s, 311, 0) == 1) &&
530
getNumDaughterOfTauExceptGamma
(s, -s * (-321), 1) == 1 &&
531
getNumDaughterOfTauExceptGamma
(s, 111, 1) == 2 &&
532
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
533
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
534
) ret = 41 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000
535
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) * 10000
536
+
getNumDaughterOfTauExceptGamma
(s, 130, 0) * 100000;
537
else
if
(
538
getNumDaughterOfTauExceptGamma
(s, -s * (-10313), 1) == 1 &&
539
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 2 &&
540
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
541
getNumDaughterOfTauExceptGamma
(s, -s * (321), 1) == 1 &&
542
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
543
) ret = 42 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000;
544
else
if
(
545
(
getNumDaughterOfTauExceptGamma
(s, 130, 0)
546
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) == 1 ||
547
getNumDaughterOfTauExceptGamma
(s, 311, 0) == 1) &&
548
getNumDaughterOfTauExceptGamma
(s, -s * (-211), 1) == 2 &&
549
getNumDaughterOfTauExceptGamma
(s, -s * (16), 1) == 1 &&
550
getNumDaughterOfTauExceptGamma
(s, -s * (321), 1) == 1 &&
551
getNumDaughterOfTauExceptGamma
(s, 0, 1) == 5
552
) ret = 42 + (
getNumDaughterOfTau
(s, 0, 1) - 5) * 1000
553
+
getNumDaughterOfTauExceptGamma
(s, 310, 0) * 10000
554
+
getNumDaughterOfTauExceptGamma
(s, 130, 0) * 100000;
555
556
}
557
return
ret;
558
}
166
int
TauDecayMarkerModule::getDecayChannelOfTau
(
int
s) {
…
}
559
560
561
int
TauDecayMarkerModule::getProngOfDecay
(
const
MCParticle
& p)
562
{
563
int
ret = 0;
564
const
vector<MCParticle*> daughters = p.getDaughters();
565
if
(daughters.empty())
return
ret;
566
for
(
MCParticle
* d : daughters) {
567
if
(!d->hasStatus(
MCParticle::c_PrimaryParticle
))
continue
;
568
// TODO: Improve how to identify a final state particle.
569
bool
isChargedFinalState = find(begin(
finalStatePDGs
),
570
end(
finalStatePDGs
),
571
abs(d->getPDG())) != end(
finalStatePDGs
);
572
if
(isChargedFinalState) ret++;
573
else
ret +=
getProngOfDecay
(*d);
574
}
575
return
ret;
576
}
561
int
TauDecayMarkerModule::getProngOfDecay
(
const
MCParticle
& p) {
…
}
577
Belle2::Const::photon
static const ParticleType photon
photon particle
Definition
Const.h:673
Belle2::MCParticle
A Class to store the Monte Carlo particle information.
Definition
MCParticle.h:32
Belle2::MCParticle::c_PrimaryParticle
@ c_PrimaryParticle
bit 0: Particle is primary particle.
Definition
MCParticle.h:47
Belle2::Module::setDescription
void setDescription(const std::string &description)
Sets the description of the module.
Definition
Module.cc:214
Belle2::Module::setPropertyFlags
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition
Module.cc:208
Belle2::Module::Module
Module()
Constructor.
Definition
Module.cc:30
Belle2::Module::c_ParallelProcessingCertified
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition
Module.h:80
Belle2::TauDecayMarkerModule::m_mprong
Int_t m_mprong
Prong of the decay channel of negative tau.
Definition
TauDecayMarkerModule.h:69
Belle2::TauDecayMarkerModule::finalStatePDGs
const int finalStatePDGs[5]
PDG codes accepted as charged final state particles in generation: {e, mu, pi, K, p}...
Definition
TauDecayMarkerModule.h:61
Belle2::TauDecayMarkerModule::numOfTauPlus
int numOfTauPlus
Number of positive tau leptons in the event.
Definition
TauDecayMarkerModule.h:53
Belle2::TauDecayMarkerModule::m_pprong
Int_t m_pprong
Prong of the decay channel of positive tau.
Definition
TauDecayMarkerModule.h:67
Belle2::TauDecayMarkerModule::IdentifyTauPair
void IdentifyTauPair()
Identifies if the event is a generated tau pair.
Definition
TauDecayMarkerModule.cc:75
Belle2::TauDecayMarkerModule::initialize
virtual void initialize() override
Initializes the module.
Definition
TauDecayMarkerModule.cc:39
Belle2::TauDecayMarkerModule::event
virtual void event() override
Method is called for each event.
Definition
TauDecayMarkerModule.cc:45
Belle2::TauDecayMarkerModule::getNumDaughterOfTau
int getNumDaughterOfTau(int s=0, int id=0, int sign=0)
Count the number of daughers of the generated tau.
Definition
TauDecayMarkerModule.cc:98
Belle2::TauDecayMarkerModule::m_mmode
Int_t m_mmode
ID of the decay channel of negative tau.
Definition
TauDecayMarkerModule.h:65
Belle2::TauDecayMarkerModule::getNumDaughterOfTauExceptGamma
int getNumDaughterOfTauExceptGamma(int s=0, int id=0, int sign=0)
Count the number of daughers of the generated tau except gammas.
Definition
TauDecayMarkerModule.cc:131
Belle2::TauDecayMarkerModule::tauPair
bool tauPair
True if the generated event is a tau pair event.
Definition
TauDecayMarkerModule.h:51
Belle2::TauDecayMarkerModule::idOfTauMinus
int idOfTauMinus
Index of the generated negative tau.
Definition
TauDecayMarkerModule.h:59
Belle2::TauDecayMarkerModule::m_pmode
Int_t m_pmode
ID of the decay channel of positive tau.
Definition
TauDecayMarkerModule.h:63
Belle2::TauDecayMarkerModule::numOfTauMinus
int numOfTauMinus
Number of negative tau leptons in the event.
Definition
TauDecayMarkerModule.h:55
Belle2::TauDecayMarkerModule::getProngOfDecay
int getProngOfDecay(const MCParticle &mc)
Get the prong of the generated tau decay.
Definition
TauDecayMarkerModule.cc:561
Belle2::TauDecayMarkerModule::idOfTauPlus
int idOfTauPlus
Index of the generated positive tau.
Definition
TauDecayMarkerModule.h:57
Belle2::TauDecayMarkerModule::m_tauDecay
StoreObjPtr< TauPairDecay > m_tauDecay
pointer to tau pair decay objects
Definition
TauDecayMarkerModule.h:47
Belle2::TauDecayMarkerModule::getDecayChannelOfTau
int getDecayChannelOfTau(int s=0)
Gets the id of the decay channel.
Definition
TauDecayMarkerModule.cc:166
Belle2::TauDecayMarkerModule::m_printDecayInfo
bool m_printDecayInfo
If true, prints ID and prong of each tau lepton in the event.
Definition
TauDecayMarkerModule.h:84
Belle2::TauDecayMarkerModule::m_MCParticles
StoreArray< MCParticle > m_MCParticles
StoreArray of MCParticles.
Definition
TauDecayMarkerModule.h:49
Belle2::TauDecayMarkerModule::TauDecayMarkerModule
TauDecayMarkerModule()
Constructor: Sets the description, the properties and the parameters of the module.
Definition
TauDecayMarkerModule.cc:26
Belle2::Module::addParam
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition
Module.h:559
REG_MODULE
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition
Module.h:649
Belle2
Abstract base class for different kinds of events.
Definition
MillepedeAlgorithm.h:17
std
STL namespace.
analysis
modules
TauDecayMarker
src
TauDecayMarkerModule.cc
Generated on Sat May 17 2025 02:53:04 for Belle II Software by
1.13.2