9 #include <analysis/modules/TauDecayMarker/TauDecayMarkerModule.h>
11 #include <framework/logging/Logger.h>
12 #include <framework/gearbox/Const.h>
29 idOfTauMinus(-1), m_pmode(-2), m_mmode(-2), m_pprong(0), m_mprong(0)
32 setDescription(
"Module to identify generated tau pair decays, using MCParticle information. Each tau lepton decay channel "
33 "is numbered following the order in the default KKMC decay table. Using this module, "
34 "the channel number will be stored in the variables `tauPlusMCMode`, and `tauMinusMCMode`. "
35 "Further details and usage can be found at `TauDecayMCModes`. ");
37 addParam(
"printDecayInfo", m_printDecayInfo,
"Print information of the tau pair decay from MC.",
false);
40 void TauDecayMarkerModule::initialize()
42 m_tauDecay.registerInDataStore();
46 void TauDecayMarkerModule::event()
48 if (!m_tauDecay) m_tauDecay.create();
52 m_pmode = getDecayChannelOfTau(+1) % 100;
53 m_mmode = getDecayChannelOfTau(-1) % 100;
55 m_pprong = getProngOfDecay(*m_MCParticles[idOfTauPlus - 1]);
56 m_mprong = getProngOfDecay(*m_MCParticles[idOfTauMinus - 1]);
58 if (m_printDecayInfo) {
59 B2INFO(
"Decay ID: " << m_pmode <<
" (tau+), " << m_mmode <<
" (tau-)." <<
60 " Topology: " << m_pprong <<
"-" << m_mprong <<
" prong");
68 m_tauDecay->addTauPlusIdMode(m_pmode);
69 m_tauDecay->addTauMinusIdMode(m_mmode);
71 m_tauDecay->addTauPlusMcProng(m_pprong);
72 m_tauDecay->addTauMinusMcProng(m_mprong);
76 void TauDecayMarkerModule::IdentifyTauPair()
82 for (
int i = 0; i < m_MCParticles.getEntries(); i++) {
85 if (p.getStatus() == 1 && p.getPDG() == 15) {
87 idOfTauMinus = p.getIndex();
89 if (p.getStatus() == 1 && p.getPDG() == -15) {
91 idOfTauPlus = p.getIndex();
94 if (numOfTauPlus == 1 && numOfTauMinus == 1) {
96 }
else tauPair =
false;
99 int TauDecayMarkerModule::getNumDaughterOfTau(
int s,
int id,
int sign)
101 if (s == 0 || !tauPair)
return -1;
102 int tauid = idOfTauMinus;
103 if (s > 0) tauid = idOfTauPlus;
105 const MCParticle& p = *m_MCParticles[tauid - 1];
108 for (
int i = p.getFirstDaughter(); i <= p.getLastDaughter(); ++i) {
110 if (abs(d.getPDG()) == 24)
111 ret += d.getLastDaughter() - d.getFirstDaughter() + 1;
115 for (
int i = p.getFirstDaughter(); i <= p.getLastDaughter(); ++i) {
117 int pdg = d.getPDG();
118 if (pdg ==
id || (sign == 0 && abs(pdg) == abs(
id))) ret++;
119 if (abs(pdg) == 24) {
120 for (
int j = d.getFirstDaughter(); j <= d.getLastDaughter(); ++j) {
122 int pdg2 = e.getPDG();
132 int TauDecayMarkerModule::getNumDaughterOfTauExceptGamma(
int s,
int id,
int sign)
134 if (s == 0 || !tauPair)
return -1;
135 int tauid = idOfTauMinus;
136 if (s > 0) tauid = idOfTauPlus;
138 const MCParticle& p = *m_MCParticles[tauid - 1];
141 for (
int i = p.getFirstDaughter(); i <= p.getLastDaughter(); ++i) {
143 if (abs(d.getPDG()) == 24) {
144 for (
int j = d.getFirstDaughter(); j <= d.getLastDaughter(); ++j) {
146 if (e.getPDG() != Const::photon.getPDGCode()) ret++;
148 }
else if (d.getPDG() != Const::photon.getPDGCode()) ret++;
151 for (
int i = p.getFirstDaughter(); i <= p.getLastDaughter(); ++i) {
153 int pdg = d.getPDG();
154 if (abs(pdg) == 24) {
155 for (
int j = d.getFirstDaughter(); j <= d.getLastDaughter(); ++j) {
157 int pdg2 = e.getPDG();
159 (sign == 0 && abs(pdg2) == abs(
id))) ret++;
161 }
else if (pdg ==
id || (sign == 0 && abs(pdg) == abs(
id))) ret++;
167 int TauDecayMarkerModule::getDecayChannelOfTau(
int s)
170 if (tauPair && s != 0) {
172 getNumDaughterOfTauExceptGamma(s, -s * (-12), 1) == 1 &&
173 getNumDaughterOfTauExceptGamma(s, -s * (11), 1) == 1 &&
174 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
175 getNumDaughterOfTauExceptGamma(s, 0, 1) == 3
176 ) ret = 1 + (getNumDaughterOfTau(s, 0, 1) - 3) * 1000;
178 getNumDaughterOfTauExceptGamma(s, -s * (-14), 1) == 1 &&
179 getNumDaughterOfTauExceptGamma(s, -s * (13), 1) == 1 &&
180 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
181 getNumDaughterOfTauExceptGamma(s, 0, 1) == 3
182 ) ret = 2 + (getNumDaughterOfTau(s, 0, 1) - 3) * 1000;
184 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
185 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
186 getNumDaughterOfTauExceptGamma(s, 0, 1) == 2
187 ) ret = 3 + (getNumDaughterOfTau(s, 0, 1) - 2) * 1000;
189 getNumDaughterOfTauExceptGamma(s, -s * (-213), 1) == 1 &&
190 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
191 getNumDaughterOfTauExceptGamma(s, 0, 1) == 2
192 ) ret = 4 + (getNumDaughterOfTau(s, 0, 1) - 2) * 1000;
194 getNumDaughterOfTauExceptGamma(s, -s * (-20213), 1) == 1 &&
195 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
196 getNumDaughterOfTauExceptGamma(s, 0, 1) == 2
197 ) ret = 5 + (getNumDaughterOfTau(s, 0, 1) - 2) * 1000;
199 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
200 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
201 getNumDaughterOfTauExceptGamma(s, 0, 1) == 2
202 ) ret = 6 + (getNumDaughterOfTau(s, 0, 1) - 2) * 1000;
204 getNumDaughterOfTauExceptGamma(s, -s * (-323), 1) == 1 &&
205 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
206 getNumDaughterOfTauExceptGamma(s, 0, 1) == 2
207 ) ret = 7 + (getNumDaughterOfTau(s, 0, 1) - 2) * 1000;
209 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 2 &&
210 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
211 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
212 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
213 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
214 ) ret = 8 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
216 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
217 getNumDaughterOfTauExceptGamma(s, 111, 1) == 3 &&
218 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
219 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
220 ) ret = 9 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
222 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 2 &&
223 getNumDaughterOfTauExceptGamma(s, 111, 1) == 2 &&
224 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
225 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
226 getNumDaughterOfTauExceptGamma(s, 0, 1) == 6
227 ) ret = 10 + (getNumDaughterOfTau(s, 0, 1) - 6) * 1000;
229 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 3 &&
230 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
231 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 2 &&
232 getNumDaughterOfTauExceptGamma(s, 0, 1) == 6
233 ) ret = 11 + (getNumDaughterOfTau(s, 0, 1) - 6) * 1000;
235 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 3 &&
236 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
237 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
238 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 2 &&
239 getNumDaughterOfTauExceptGamma(s, 0, 1) == 7
240 ) ret = 12 + (getNumDaughterOfTau(s, 0, 1) - 7) * 1000;
242 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 2 &&
243 getNumDaughterOfTauExceptGamma(s, 111, 1) == 3 &&
244 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
245 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
246 getNumDaughterOfTauExceptGamma(s, 0, 1) == 7
247 ) ret = 13 + (getNumDaughterOfTau(s, 0, 1) - 7) * 1000;
249 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
250 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
251 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
252 getNumDaughterOfTauExceptGamma(s, -s * (321), 1) == 1 &&
253 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
254 ) ret = 14 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000;
256 getNumDaughterOfTauExceptGamma(s, -s * (-10313), 1) == 1 &&
257 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
258 getNumDaughterOfTauExceptGamma(s, -s * (10313), 1) == 1 &&
259 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
260 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
261 ) ret = 15 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000;
263 (getNumDaughterOfTauExceptGamma(s, 130, 0)
264 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 2 ||
265 getNumDaughterOfTauExceptGamma(s, 311, 0) == 2) &&
266 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
267 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
268 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
269 ) ret = 15 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000
270 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
271 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
273 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
274 getNumDaughterOfTauExceptGamma(s, -s * (10313), 1) == 1 &&
275 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
276 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
277 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
278 ) ret = 16 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000;
280 (getNumDaughterOfTauExceptGamma(s, 130, 0)
281 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 1 ||
282 getNumDaughterOfTauExceptGamma(s, 311, 0) == 1) &&
283 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
284 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
285 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
286 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
287 ) ret = 16 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000
288 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
289 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
291 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
292 getNumDaughterOfTauExceptGamma(s, 111, 1) == 2 &&
293 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
294 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
295 ) ret = 17 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000;
297 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
298 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
299 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
300 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
301 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
302 ) ret = 18 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000;
304 getNumDaughterOfTauExceptGamma(s, -s * (-10313), 1) == 1 &&
305 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
306 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
307 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
308 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
309 ) ret = 19 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000;
311 (getNumDaughterOfTauExceptGamma(s, 130, 0)
312 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 1 ||
313 getNumDaughterOfTauExceptGamma(s, 311, 0) == 1) &&
314 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
315 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
316 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
317 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
318 ) ret = 19 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000
319 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
320 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
322 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
323 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
324 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
325 getNumDaughterOfTauExceptGamma(s, 221, 1) == 1 &&
326 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
327 ) ret = 20 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000;
329 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
330 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
331 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
332 getNumDaughterOfTau(s, 22, 1) >= 1 &&
333 getNumDaughterOfTauExceptGamma(s, 0, 1) == 3
334 ) ret = 21 + (getNumDaughterOfTau(s, 0, 1) - 3) * 1000;
336 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
337 getNumDaughterOfTauExceptGamma(s, -s * (10313), 1) == 1 &&
338 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
339 getNumDaughterOfTauExceptGamma(s, 0, 1) == 3
340 ) ret = 22 + (getNumDaughterOfTau(s, 0, 1) - 3) * 1000;
342 (getNumDaughterOfTauExceptGamma(s, 130, 0)
343 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 1 ||
344 getNumDaughterOfTauExceptGamma(s, 311, 0) == 1) &&
345 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
346 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
347 getNumDaughterOfTauExceptGamma(s, 0, 1) == 3
348 ) ret = 22 + (getNumDaughterOfTau(s, 0, 1) - 3) * 1000
349 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
350 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
352 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
353 getNumDaughterOfTauExceptGamma(s, 111, 1) == 4 &&
354 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
355 getNumDaughterOfTauExceptGamma(s, 0, 1) == 6
356 ) ret = 23 + (getNumDaughterOfTau(s, 0, 1) - 6) * 1000;
358 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
359 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
360 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
361 getNumDaughterOfTauExceptGamma(s, 223, 1) == 1 &&
362 getNumDaughterOfTauExceptGamma(s, 0, 1) == 4
363 ) ret = 24 + (getNumDaughterOfTau(s, 0, 1) - 4) * 1000;
365 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 2 &&
366 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
367 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
368 getNumDaughterOfTauExceptGamma(s, 221, 1) == 1 &&
369 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
370 ) ret = 25 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
372 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
373 getNumDaughterOfTauExceptGamma(s, 111, 1) == 2 &&
374 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
375 getNumDaughterOfTauExceptGamma(s, 221, 1) == 1 &&
376 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
377 ) ret = 26 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
379 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
380 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
381 getNumDaughterOfTauExceptGamma(s, 221, 1) == 1 &&
382 getNumDaughterOfTauExceptGamma(s, 0, 1) == 3
383 ) ret = 27 + (getNumDaughterOfTau(s, 0, 1) - 3) * 1000;
385 getNumDaughterOfTauExceptGamma(s, -s * (-323), 1) == 1 &&
386 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
387 getNumDaughterOfTauExceptGamma(s, 221, 1) == 1 &&
388 getNumDaughterOfTauExceptGamma(s, 0, 1) == 3
389 ) ret = 28 + (getNumDaughterOfTau(s, 0, 1) - 3) * 1000;
391 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
392 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
393 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
394 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
395 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
396 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
397 ) ret = 29 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
399 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
400 getNumDaughterOfTauExceptGamma(s, 111, 1) == 3 &&
401 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
402 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
403 ) ret = 30 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
405 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 2 &&
406 getNumDaughterOfTauExceptGamma(s, -s * (10313), 1) == 1 &&
407 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
408 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
409 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
410 ) ret = 31 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
412 (getNumDaughterOfTauExceptGamma(s, 130, 0)
413 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 1 ||
414 getNumDaughterOfTauExceptGamma(s, 311, 0) == 1) &&
415 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 2 &&
416 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
417 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
418 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
419 ) ret = 31 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000
420 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
421 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
423 getNumDaughterOfTauExceptGamma(s, -s * (-10313), 1) == 1 &&
424 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
425 getNumDaughterOfTauExceptGamma(s, 111, 1) == 2 &&
426 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
427 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
428 ) ret = 32 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
430 (getNumDaughterOfTauExceptGamma(s, 130, 0)
431 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 1 ||
432 getNumDaughterOfTauExceptGamma(s, 311, 0) == 1) &&
433 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
434 getNumDaughterOfTauExceptGamma(s, 111, 1) == 2 &&
435 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
436 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
437 ) ret = 32 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000
438 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
439 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
441 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
442 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
443 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
444 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
445 getNumDaughterOfTauExceptGamma(s, -s * (321), 1) == 1 &&
446 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
447 ) ret = 33 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
449 getNumDaughterOfTauExceptGamma(s, -s * (-10313), 1) == 1 &&
450 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
451 getNumDaughterOfTauExceptGamma(s, -s * (10313), 1) == 1 &&
452 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
453 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
454 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
455 ) ret = 34 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
457 (getNumDaughterOfTauExceptGamma(s, 130, 0)
458 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 2 ||
459 getNumDaughterOfTauExceptGamma(s, 311, 0) == 2) &&
460 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
461 getNumDaughterOfTauExceptGamma(s, 111, 1) == 1 &&
462 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
463 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
464 ) ret = 34 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000
465 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
466 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
468 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 2 &&
469 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
470 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
471 getNumDaughterOfTauExceptGamma(s, 223, 1) == 1 &&
472 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
473 ) ret = 35 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
475 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
476 getNumDaughterOfTauExceptGamma(s, 111, 1) == 2 &&
477 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
478 getNumDaughterOfTauExceptGamma(s, 223, 1) == 1 &&
479 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
480 ) ret = 36 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
482 getNumDaughterOfTauExceptGamma(s, -s * (-11), 1) == 1 &&
483 getNumDaughterOfTauExceptGamma(s, -s * (-12), 1) == 1 &&
484 getNumDaughterOfTauExceptGamma(s, -s * (11), 1) == 2 &&
485 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
486 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
487 ) ret = 37 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
489 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
490 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
491 getNumDaughterOfTauExceptGamma(s, 20223, 1) == 1 &&
492 getNumDaughterOfTauExceptGamma(s, 0, 1) == 3
493 ) ret = 38 + (getNumDaughterOfTau(s, 0, 1) - 3) * 1000;
495 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
496 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
497 getNumDaughterOfTauExceptGamma(s, 223, 1) == 1 &&
498 getNumDaughterOfTauExceptGamma(s, 0, 1) == 3
499 ) ret = 39 + (getNumDaughterOfTau(s, 0, 1) - 3) * 1000;
501 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
502 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
503 getNumDaughterOfTauExceptGamma(s, -s * (10313), 1) == 1 &&
504 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
505 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
506 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
507 ) ret = 40 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
509 (getNumDaughterOfTauExceptGamma(s, 130, 0)
510 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 1 ||
511 getNumDaughterOfTauExceptGamma(s, 311, 0) == 1) &&
512 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 1 &&
513 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
514 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
515 getNumDaughterOfTauExceptGamma(s, -s * (211), 1) == 1 &&
516 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
517 ) ret = 40 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000
518 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
519 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
521 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
522 getNumDaughterOfTauExceptGamma(s, -s * (10313), 1) == 1 &&
523 getNumDaughterOfTauExceptGamma(s, 111, 1) == 2 &&
524 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
525 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
526 ) ret = 41 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
528 (getNumDaughterOfTauExceptGamma(s, 130, 0)
529 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 1 ||
530 getNumDaughterOfTauExceptGamma(s, 311, 0) == 1) &&
531 getNumDaughterOfTauExceptGamma(s, -s * (-321), 1) == 1 &&
532 getNumDaughterOfTauExceptGamma(s, 111, 1) == 2 &&
533 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
534 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
535 ) ret = 41 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000
536 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
537 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
539 getNumDaughterOfTauExceptGamma(s, -s * (-10313), 1) == 1 &&
540 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 2 &&
541 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
542 getNumDaughterOfTauExceptGamma(s, -s * (321), 1) == 1 &&
543 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
544 ) ret = 42 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000;
546 (getNumDaughterOfTauExceptGamma(s, 130, 0)
547 + getNumDaughterOfTauExceptGamma(s, 310, 0) == 1 ||
548 getNumDaughterOfTauExceptGamma(s, 311, 0) == 1) &&
549 getNumDaughterOfTauExceptGamma(s, -s * (-211), 1) == 2 &&
550 getNumDaughterOfTauExceptGamma(s, -s * (16), 1) == 1 &&
551 getNumDaughterOfTauExceptGamma(s, -s * (321), 1) == 1 &&
552 getNumDaughterOfTauExceptGamma(s, 0, 1) == 5
553 ) ret = 42 + (getNumDaughterOfTau(s, 0, 1) - 5) * 1000
554 + getNumDaughterOfTauExceptGamma(s, 310, 0) * 10000
555 + getNumDaughterOfTauExceptGamma(s, 130, 0) * 100000;
562 int TauDecayMarkerModule::getProngOfDecay(
const MCParticle& p)
565 const vector<MCParticle*> daughters = p.getDaughters();
566 if (daughters.empty())
return ret;
568 if (!d->hasStatus(MCParticle::c_PrimaryParticle))
continue;
570 bool isChargedFinalState = find(begin(finalStatePDGs),
572 abs(d->getPDG())) != end(finalStatePDGs);
573 if (isChargedFinalState) ret++;
574 else ret += getProngOfDecay(*d);
A Class to store the Monte Carlo particle information.
Module to identify generated tau pair decays, using MCParticle information.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.