11 #include <analysis/modules/TauDecayMarker/TauDecayMarkerModule.h>
12 #include <analysis/dataobjects/TauPairDecay.h>
14 #include <framework/datastore/StoreArray.h>
15 #include <framework/datastore/StoreObjPtr.h>
17 #include <framework/logging/Logger.h>
34 idOfTauMinus(-1), m_pmode(-2), m_mmode(-2), m_pprong(0), m_mprong(0)
37 setDescription(
"Module to identify generated tau pair decays, using MCParticle information. Each tau lepton decay channel "
38 "is numbered following the order in the default KKMC decay table. Using this module, "
39 "the channel number will be stored in the variables ``tauPlusMcMode``, and ``tauMinusMcMode``. "
40 "Further details and usage can be found at `TauDecayMCModes`. ");
42 addParam(
"printDecayInfo", m_printDecayInfo,
"Print information of the tau pair decay from MC.",
false);
45 void TauDecayMarkerModule::initialize()
48 tauDecay.registerInDataStore();
52 void TauDecayMarkerModule::event()
57 if (!tauDecay) tauDecay.create();
61 m_pmode = getDecayChannelOfTau(+1) % 100;
62 m_mmode = getDecayChannelOfTau(-1) % 100;
64 m_pprong = getProngOfDecay(*MCParticles[idOfTauPlus - 1]);
65 m_mprong = getProngOfDecay(*MCParticles[idOfTauMinus - 1]);
67 if (m_printDecayInfo) {
68 B2INFO(
"Decay ID: " << m_pmode <<
" (tau+), " << m_mmode <<
" (tau-)." <<
69 " Topology: " << m_pprong <<
"-" << m_mprong <<
" prong");
77 tauDecay->addTauPlusIdMode(m_pmode);
78 tauDecay->addTauMinusIdMode(m_mmode);
80 tauDecay->addTauPlusMcProng(m_pprong);
81 tauDecay->addTauMinusMcProng(m_mprong);
85 void TauDecayMarkerModule::IdentifyTauPair()
92 for (
int i = 0; i < MCParticles.
getEntries(); i++) {
95 if (p.getStatus() == 1 && p.getPDG() == 15) {
97 idOfTauMinus = p.getIndex();
99 if (p.getStatus() == 1 && p.getPDG() == -15) {
101 idOfTauPlus = p.getIndex();
104 if (numOfTauPlus == 1 && numOfTauMinus == 1) {
106 }
else tauPair =
false;
109 int TauDecayMarkerModule::getNumDaughterOfTau(
int s,
int id,
int sign)
111 if (s == 0 || !tauPair)
return -1;
112 int tauid = idOfTauMinus;
113 if (s > 0) tauid = idOfTauPlus;
116 const MCParticle& p = *MCParticles[tauid - 1];
119 for (
int i = p.getFirstDaughter(); i <= p.getLastDaughter(); ++i) {
121 if (abs(d.getPDG()) == 24)
122 ret += d.getLastDaughter() - d.getFirstDaughter() + 1;
126 for (
int i = p.getFirstDaughter(); i <= p.getLastDaughter(); ++i) {
128 int pdg = d.getPDG();
129 if (pdg ==
id || (sign == 0 && abs(pdg) == abs(
id))) ret++;
130 if (abs(pdg) == 24) {
131 for (
int j = d.getFirstDaughter(); j <= d.getLastDaughter(); ++j) {
133 int pdg2 = e.getPDG();
143 int TauDecayMarkerModule::getNumDaughterOfTauExceptGamma(
int s,
int id,
int sign)
145 if (s == 0 || !tauPair)
return -1;
146 int tauid = idOfTauMinus;
147 if (s > 0) tauid = idOfTauPlus;
150 const MCParticle& p = *MCParticles[tauid - 1];
153 for (
int i = p.getFirstDaughter(); i <= p.getLastDaughter(); ++i) {
155 if (abs(d.getPDG()) == 24) {
156 for (
int j = d.getFirstDaughter(); j <= d.getLastDaughter(); ++j) {
158 if (e.getPDG() != 22) ret++;
160 }
else if (d.getPDG() != 22) ret++;
163 for (
int i = p.getFirstDaughter(); i <= p.getLastDaughter(); ++i) {
165 int pdg = d.getPDG();
166 if (abs(pdg) == 24) {
167 for (
int j = d.getFirstDaughter(); j <= d.getLastDaughter(); ++j) {
169 int pdg2 = e.getPDG();
171 (sign == 0 && abs(pdg2) == abs(
id))) ret++;
173 }
else if (pdg ==
id || (sign == 0 && abs(pdg) == abs(
id))) ret++;
179 int TauDecayMarkerModule::getDecayChannelOfTau(
int s)
182 if (tauPair && s != 0) {
184 getNumDaughterOfTauExceptGamma(s, -s * (-12), 1) == 1 &&
185 getNumDaughterOfTauExceptGamma(s, -s * (11), 1) == 1 &&
186 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
187 getNumDaughterOfTauExceptGamma(s, 0, 1) == 3
188 ) ret = 1 + (getNumDaughterOfTau(s, 0, 1) - 3) * 1000;
190 getNumDaughterOfTauExceptGamma(s, -s * (-14), 1) == 1 &&
191 getNumDaughterOfTauExceptGamma(s, -s * (13), 1) == 1 &&
192 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
193 getNumDaughterOfTauExceptGamma(s, 0, 1) == 3
194 ) ret = 2 + (getNumDaughterOfTau(s, 0, 1) - 3) * 1000;
196 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
197 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
198 getNumDaughterOfTauExceptGamma(s, 0, 1) == 2
199 ) ret = 3 + (getNumDaughterOfTau(s, 0, 1) - 2) * 1000;
201 getNumDaughterOfTauExceptGamma(s, -s * (-213), 1) == 1 &&
202 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
203 getNumDaughterOfTauExceptGamma(s, 0, 1) == 2
204 ) ret = 4 + (getNumDaughterOfTau(s, 0, 1) - 2) * 1000;
206 getNumDaughterOfTauExceptGamma(s, -s * (-20213), 1) == 1 &&
207 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
208 getNumDaughterOfTauExceptGamma(s, 0, 1) == 2
209 ) ret = 5 + (getNumDaughterOfTau(s, 0, 1) - 2) * 1000;
211 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
212 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
213 getNumDaughterOfTauExceptGamma(s, 0, 1) == 2
214 ) ret = 6 + (getNumDaughterOfTau(s, 0, 1) - 2) * 1000;
216 getNumDaughterOfTauExceptGamma(s, -s * (-323), 1) == 1 &&
217 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
218 getNumDaughterOfTauExceptGamma(s, 0, 1) == 2
219 ) ret = 7 + (getNumDaughterOfTau(s, 0, 1) - 2) * 1000;
221 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 2 &&
222 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
223 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
224 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
225 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
226 ) ret = 8 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
228 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
229 getNumDaughterOfTauExceptGamma(s, 111, 1) == 3 &&
230 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
231 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
232 ) ret = 9 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
234 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 2 &&
235 getNumDaughterOfTauExceptGamma(s, 111, 1) == 2 &&
236 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
237 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
238 getNumDaughterOfTauExceptGamma(s, 0, 1) == 6
239 ) ret = 10 + (getNumDaughterOfTau(s, 0, 1) - 6) * 1000;
241 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 3 &&
242 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
243 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 2 &&
244 getNumDaughterOfTauExceptGamma(s, 0, 1) == 6
245 ) ret = 11 + (getNumDaughterOfTau(s, 0, 1) - 6) * 1000;
247 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 3 &&
248 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
249 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
250 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 2 &&
251 getNumDaughterOfTauExceptGamma(s, 0, 1) == 7
252 ) ret = 12 + (getNumDaughterOfTau(s, 0, 1) - 7) * 1000;
254 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 2 &&
255 getNumDaughterOfTauExceptGamma(s, 111, 1) == 3 &&
256 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
257 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
258 getNumDaughterOfTauExceptGamma(s, 0, 1) == 7
259 ) ret = 13 + (getNumDaughterOfTau(s, 0, 1) - 7) * 1000;
261 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
262 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
263 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
264 getNumDaughterOfTauExceptGamma(s, -s * (321), 1) == 1 &&
265 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
266 ) ret = 14 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000;
268 getNumDaughterOfTauExceptGamma(s, -s * (-10313), 1) == 1 &&
269 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
270 getNumDaughterOfTauExceptGamma(s, -s * (10313), 1) == 1 &&
271 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
272 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
273 ) ret = 15 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000;
275 (getNumDaughterOfTauExceptGamma(s, 130, 0)
276 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 2 ||
277 getNumDaughterOfTauExceptGamma(s, 311, 0) == 2) &&
278 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
279 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
280 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
281 ) ret = 15 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000
282 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
283 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
285 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
286 getNumDaughterOfTauExceptGamma(s, -s * (10313), 1) == 1 &&
287 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
288 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
289 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
290 ) ret = 16 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000;
292 (getNumDaughterOfTauExceptGamma(s, 130, 0)
293 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 1 ||
294 getNumDaughterOfTauExceptGamma(s, 311, 0) == 1) &&
295 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
296 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
297 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
298 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
299 ) ret = 16 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000
300 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
301 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
303 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
304 getNumDaughterOfTauExceptGamma(s, 111, 1) == 2 &&
305 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
306 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
307 ) ret = 17 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000;
309 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
310 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
311 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
312 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
313 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
314 ) ret = 18 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000;
316 getNumDaughterOfTauExceptGamma(s, -s * (-10313), 1) == 1 &&
317 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
318 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
319 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
320 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
321 ) ret = 19 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000;
323 (getNumDaughterOfTauExceptGamma(s, 130, 0)
324 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 1 ||
325 getNumDaughterOfTauExceptGamma(s, 311, 0) == 1) &&
326 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
327 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
328 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
329 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
330 ) ret = 19 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000
331 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
332 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
334 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
335 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
336 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
337 getNumDaughterOfTauExceptGamma(s, 221, 1) == 1 &&
338 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
339 ) ret = 20 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000;
341 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
342 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
343 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
344 getNumDaughterOfTau(s, 22, 1) >= 1 &&
345 getNumDaughterOfTauExceptGamma(s, 0, 1) == 3
346 ) ret = 21 + (getNumDaughterOfTau(s, 0, 1) - 3) * 1000;
348 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
349 getNumDaughterOfTauExceptGamma(s, -s * (10313), 1) == 1 &&
350 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
351 getNumDaughterOfTauExceptGamma(s, 0, 1) == 3
352 ) ret = 22 + (getNumDaughterOfTau(s, 0, 1) - 3) * 1000;
354 (getNumDaughterOfTauExceptGamma(s, 130, 0)
355 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 1 ||
356 getNumDaughterOfTauExceptGamma(s, 311, 0) == 1) &&
357 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
358 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
359 getNumDaughterOfTauExceptGamma(s, 0, 1) == 3
360 ) ret = 22 + (getNumDaughterOfTau(s, 0, 1) - 3) * 1000
361 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
362 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
364 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
365 getNumDaughterOfTauExceptGamma(s, 111, 1) == 4 &&
366 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
367 getNumDaughterOfTauExceptGamma(s, 0, 1) == 6
368 ) ret = 23 + (getNumDaughterOfTau(s, 0, 1) - 6) * 1000;
370 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
371 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
372 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
373 getNumDaughterOfTauExceptGamma(s, 223, 1) == 1 &&
374 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
375 ) ret = 24 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000;
377 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 2 &&
378 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
379 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
380 getNumDaughterOfTauExceptGamma(s, 221, 1) == 1 &&
381 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
382 ) ret = 25 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
384 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
385 getNumDaughterOfTauExceptGamma(s, 111, 1) == 2 &&
386 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
387 getNumDaughterOfTauExceptGamma(s, 221, 1) == 1 &&
388 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
389 ) ret = 26 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
391 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
392 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
393 getNumDaughterOfTauExceptGamma(s, 221, 1) == 1 &&
394 getNumDaughterOfTauExceptGamma(s, 0, 1) == 3
395 ) ret = 27 + (getNumDaughterOfTau(s, 0, 1) - 3) * 1000;
397 getNumDaughterOfTauExceptGamma(s, -s * (-323), 1) == 1 &&
398 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
399 getNumDaughterOfTauExceptGamma(s, 221, 1) == 1 &&
400 getNumDaughterOfTauExceptGamma(s, 0, 1) == 3
401 ) ret = 28 + (getNumDaughterOfTau(s, 0, 1) - 3) * 1000;
403 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
404 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
405 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
406 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
407 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
408 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
409 ) ret = 29 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
411 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
412 getNumDaughterOfTauExceptGamma(s, 111, 1) == 3 &&
413 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
414 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
415 ) ret = 30 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
417 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 2 &&
418 getNumDaughterOfTauExceptGamma(s, -s * (10313), 1) == 1 &&
419 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
420 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
421 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
422 ) ret = 31 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
424 (getNumDaughterOfTauExceptGamma(s, 130, 0)
425 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 1 ||
426 getNumDaughterOfTauExceptGamma(s, 311, 0) == 1) &&
427 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 2 &&
428 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
429 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
430 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
431 ) ret = 31 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000
432 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
433 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
435 getNumDaughterOfTauExceptGamma(s, -s * (-10313), 1) == 1 &&
436 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
437 getNumDaughterOfTauExceptGamma(s, 111, 1) == 2 &&
438 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
439 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
440 ) ret = 32 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
442 (getNumDaughterOfTauExceptGamma(s, 130, 0)
443 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 1 ||
444 getNumDaughterOfTauExceptGamma(s, 311, 0) == 1) &&
445 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
446 getNumDaughterOfTauExceptGamma(s, 111, 1) == 2 &&
447 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
448 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
449 ) ret = 32 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000
450 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
451 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
453 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
454 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
455 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
456 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
457 getNumDaughterOfTauExceptGamma(s, -s * (321), 1) == 1 &&
458 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
459 ) ret = 33 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
461 getNumDaughterOfTauExceptGamma(s, -s * (-10313), 1) == 1 &&
462 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
463 getNumDaughterOfTauExceptGamma(s, -s * (10313), 1) == 1 &&
464 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
465 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
466 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
467 ) ret = 34 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
469 (getNumDaughterOfTauExceptGamma(s, 130, 0)
470 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 2 ||
471 getNumDaughterOfTauExceptGamma(s, 311, 0) == 2) &&
472 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
473 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
474 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
475 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
476 ) ret = 34 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000
477 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
478 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
480 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 2 &&
481 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
482 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
483 getNumDaughterOfTauExceptGamma(s, 223, 1) == 1 &&
484 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
485 ) ret = 35 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
487 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
488 getNumDaughterOfTauExceptGamma(s, 111, 1) == 2 &&
489 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
490 getNumDaughterOfTauExceptGamma(s, 223, 1) == 1 &&
491 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
492 ) ret = 36 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
494 getNumDaughterOfTauExceptGamma(s, -s * (-11), 1) == 1 &&
495 getNumDaughterOfTauExceptGamma(s, -s * (-12), 1) == 1 &&
496 getNumDaughterOfTauExceptGamma(s, -s * (11), 1) == 2 &&
497 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
498 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
499 ) ret = 37 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
501 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
502 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
503 getNumDaughterOfTauExceptGamma(s, 20223, 1) == 1 &&
504 getNumDaughterOfTauExceptGamma(s, 0, 1) == 3
505 ) ret = 38 + (getNumDaughterOfTau(s, 0, 1) - 3) * 1000;
507 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
508 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
509 getNumDaughterOfTauExceptGamma(s, 223, 1) == 1 &&
510 getNumDaughterOfTauExceptGamma(s, 0, 1) == 3
511 ) ret = 39 + (getNumDaughterOfTau(s, 0, 1) - 3) * 1000;
513 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
514 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
515 getNumDaughterOfTauExceptGamma(s, -s * (10313), 1) == 1 &&
516 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
517 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
518 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
519 ) ret = 40 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
521 (getNumDaughterOfTauExceptGamma(s, 130, 0)
522 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 1 ||
523 getNumDaughterOfTauExceptGamma(s, 311, 0) == 1) &&
524 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
525 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
526 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
527 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
528 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
529 ) ret = 40 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000
530 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
531 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
533 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
534 getNumDaughterOfTauExceptGamma(s, -s * (10313), 1) == 1 &&
535 getNumDaughterOfTauExceptGamma(s, 111, 1) == 2 &&
536 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
537 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
538 ) ret = 41 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
540 (getNumDaughterOfTauExceptGamma(s, 130, 0)
541 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 1 ||
542 getNumDaughterOfTauExceptGamma(s, 311, 0) == 1) &&
543 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
544 getNumDaughterOfTauExceptGamma(s, 111, 1) == 2 &&
545 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
546 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
547 ) ret = 41 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000
548 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
549 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
551 getNumDaughterOfTauExceptGamma(s, -s * (-10313), 1) == 1 &&
552 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 2 &&
553 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
554 getNumDaughterOfTauExceptGamma(s, -s * (321), 1) == 1 &&
555 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
556 ) ret = 42 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
558 (getNumDaughterOfTauExceptGamma(s, 130, 0)
559 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 1 ||
560 getNumDaughterOfTauExceptGamma(s, 311, 0) == 1) &&
561 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 2 &&
562 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
563 getNumDaughterOfTauExceptGamma(s, -s * (321), 1) == 1 &&
564 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
565 ) ret = 42 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000
566 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
567 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
574 int TauDecayMarkerModule::getProngOfDecay(
const MCParticle& p)
577 const vector<MCParticle*> daughters = p.getDaughters();
578 if (daughters.empty())
return ret;
580 if (!d->hasStatus(MCParticle::c_PrimaryParticle))
continue;
582 bool isChargedFinalState = find(begin(finalStatePDGs),
584 abs(d->getPDG())) != end(finalStatePDGs);
585 if (isChargedFinalState) ret++;
586 else ret += getProngOfDecay(*d);