]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PYTHIA8/AliDecayerPythia8.cxx
- removed TObjArray for the storing of clusters
[u/mrichter/AliRoot.git] / PYTHIA8 / AliDecayerPythia8.cxx
CommitLineData
948d10f4 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/* $Id$ */
17
18// Implementation of AliDecayer using Pythia8
19// Author: andreas.morsch@cern.ch
20#include <TMath.h>
21#include <TPDGCode.h>
22#include <TPythia8.h>
23#include "AliDecayerPythia8.h"
24#include "ParticleData.h"
25
26ClassImp(AliDecayerPythia8)
27
ad720100 28Bool_t AliDecayerPythia8::fgInit = kFALSE;
29
948d10f4 30AliDecayerPythia8::AliDecayerPythia8():
31 TPythia8Decayer(),
32 fDecay(kAll),
33 fHeavyFlavour(kTRUE)
34{
35 // Constructor
36}
37
ad720100 38void AliDecayerPythia8::Init()
39{
40// Initialisation
41//
42 if (!fgInit) {
43 fgInit = kTRUE;
44 // fPythia->SetDecayTable();
45 }
46
47// Switch on heavy flavor decays
48
49 Int_t j;
50 Int_t heavy[14] = {411, 421, 431, 4122, 4132, 4232, 4332, 511, 521, 531, 5122, 5132, 5232, 5332};
51// fPythia->ResetDecayTable();
52 for (j=0; j < 14; j++) {
53 if (fDecay == kNoDecayHeavy) {
54 TPythia8::Instance()->ReadString(Form("%d:onMode = off", heavy[j]));
55 } else {
56 TPythia8::Instance()->ReadString(Form("%d:onMode = on", heavy[j]));
57 }
58 }
59
60
61//...Switch off decay of pi0, K0S, Lambda, Sigma+-, Xi0-, Omega-.
62
63 if (fDecay != kNeutralPion) {
64 TPythia8::Instance()->ReadString("111:onMode = off");
65 } else {
66 TPythia8::Instance()->ReadString("111:onMode = on");
67 }
68
69 TPythia8::Instance()->ReadString("310:onMode = off");
ad720100 70 TPythia8::Instance()->ReadString("3112:onMode = off");
71 TPythia8::Instance()->ReadString("3212:onMode = off");
72 TPythia8::Instance()->ReadString("3222:onMode = off");
73 TPythia8::Instance()->ReadString("3312:onMode = off");
74 TPythia8::Instance()->ReadString("3322:onMode = off");
75 TPythia8::Instance()->ReadString("3334:onMode = off");
76// .. Force decay channels
77 ForceDecay();
78}
79
948d10f4 80void AliDecayerPythia8::ForceDecay()
81{
b7227478 82//
948d10f4 83// Force a particle decay mode
84// Switch heavy flavour production off if requested
85 if (!fHeavyFlavour) SwitchOffHeavyFlavour();
86//
87 Decay_t decay = fDecay;
88 TPythia8::Instance()->ReadString("HadronLevel:Decay = on");
89
90 if (decay == kNoDecayHeavy) return;
91
92//
93// select mode
948d10f4 94 switch (decay)
95 {
96 case kHardMuons:
ad720100 97// B0 -> mu X
b7227478 98 TPythia8::Instance()->ReadString("511:onMode = off");
99 TPythia8::Instance()->ReadString("511:onIfAny = 13 443 100443");
ad720100 100// B+/- -> mu X
b7227478 101 TPythia8::Instance()->ReadString("521:onMode = off");
102 TPythia8::Instance()->ReadString("521:onIfAny = 13 443 100443");
ad720100 103// Bs -> mu X
b7227478 104 TPythia8::Instance()->ReadString("531:onMode = off");
105 TPythia8::Instance()->ReadString("531:onIfAny = 13 443 100443");
ad720100 106// Lambda_b -> mu X
b7227478 107 TPythia8::Instance()->ReadString("5122:onMode = off");
108 TPythia8::Instance()->ReadString("5122:onIfAny = 13 443 100443");
ad720100 109// Sigma_b- -> mu X
b7227478 110 TPythia8::Instance()->ReadString("5132:onMode = off");
111 TPythia8::Instance()->ReadString("5132:onIfAny = 13 443 100443");
ad720100 112// Sigma_b0 -> mu X
b7227478 113 TPythia8::Instance()->ReadString("5232:onMode = off");
114 TPythia8::Instance()->ReadString("5232:onIfAny = 13 443 100443");
ad720100 115// Omega_b -> mu X
b7227478 116 TPythia8::Instance()->ReadString("5332:onMode = off");
117 TPythia8::Instance()->ReadString("5332:onIfAny = 13 443 100443");
ad720100 118// Psi' -> mu+ mu-
b7227478 119 TPythia8::Instance()->ReadString("100443:onMode = off");
120 TPythia8::Instance()->ReadString("100443:onIfAny = 443");
ad720100 121// Psi -> mu+ mu-
b7227478 122 TPythia8::Instance()->ReadString("443:onMode = off");
123 TPythia8::Instance()->ReadString("443:onIfAll = 13 13");
ad720100 124// D+/- -> mu X
b7227478 125 TPythia8::Instance()->ReadString("411:onMode = off");
126 TPythia8::Instance()->ReadString("411:onIfAll = 13");
ad720100 127// D0 -> mu X
b7227478 128 TPythia8::Instance()->ReadString("421:onMode = off");
129 TPythia8::Instance()->ReadString("421:onIfAll = 13");
ad720100 130// D_s -> mu X
b7227478 131 TPythia8::Instance()->ReadString("431:onMode = off");
132 TPythia8::Instance()->ReadString("431:onIfAll = 13");
ad720100 133// Lambda_c -> mu X
b7227478 134 TPythia8::Instance()->ReadString("4122:onMode = off");
135 TPythia8::Instance()->ReadString("4122:onIfAll = 13");
ad720100 136// Sigma_c -> mu X
b7227478 137 TPythia8::Instance()->ReadString("4132:onMode = off");
138 TPythia8::Instance()->ReadString("4132:onIfAll = 13");
ad720100 139// Sigma_c+ -> mu X
b7227478 140 TPythia8::Instance()->ReadString("4232:onMode = off");
141 TPythia8::Instance()->ReadString("4232:onIfAll = 13");
ad720100 142// Omega_c -> mu X
b7227478 143 TPythia8::Instance()->ReadString("4332:onMode = off");
144 TPythia8::Instance()->ReadString("4332:onIfAll = 13");
145
948d10f4 146 break;
147 case kChiToJpsiGammaToMuonMuon:
b7227478 148// Chi_1c -> J/Psi Gamma
149 TPythia8::Instance()->ReadString("20443:onMode = off");
150 TPythia8::Instance()->ReadString("20443:onIfAll = 443 22");
151// Chi_2c -> J/Psi Gamma
152 TPythia8::Instance()->ReadString("445:onMode = off");
153 TPythia8::Instance()->ReadString("445:onIfAll = 443 22");
154// J/Psi -> mu+ mu-
155 TPythia8::Instance()->ReadString("443:onMode = off");
156 TPythia8::Instance()->ReadString("443:onIfAll = 13 13");
948d10f4 157 break;
158 case kChiToJpsiGammaToElectronElectron:
b7227478 159// Chi_1c -> J/Psi Gamma
160 TPythia8::Instance()->ReadString("20443:onMode = off");
161 TPythia8::Instance()->ReadString("20443:onIfAll = 443 22");
162// Chi_2c -> J/Psi Gamma
163 TPythia8::Instance()->ReadString("445:onMode = off");
164 TPythia8::Instance()->ReadString("445:onIfAll = 443 22");
165// J/Psi -> e+ e-
166 TPythia8::Instance()->ReadString("443:onMode = off");
167 TPythia8::Instance()->ReadString("443:onIfAll = 11 11");
948d10f4 168 break;
169
170 case kBSemiMuonic:
ad720100 171// B0 -> mu X
b7227478 172 TPythia8::Instance()->ReadString("511:onMode = off");
173 TPythia8::Instance()->ReadString("511:onIfAny = 13");
ad720100 174// B+/- -> mu X
b7227478 175 TPythia8::Instance()->ReadString("521:onMode = off");
176 TPythia8::Instance()->ReadString("521:onIfAny = 13");
ad720100 177// B_s -> mu X
b7227478 178 TPythia8::Instance()->ReadString("531:onMode = off");
179 TPythia8::Instance()->ReadString("531:onIfAny = 13");
ad720100 180// Lambda_b -> mu X
b7227478 181 TPythia8::Instance()->ReadString("5122:onMode = off");
182 TPythia8::Instance()->ReadString("5122:onIfAny = 13");
ad720100 183// Sigma_b -> mu X
b7227478 184 TPythia8::Instance()->ReadString("5132:onMode = off");
185 TPythia8::Instance()->ReadString("5132:onIfAny = 13");
ad720100 186// Sigma_b0 -> mu X
b7227478 187 TPythia8::Instance()->ReadString("5232:onMode = off");
188 TPythia8::Instance()->ReadString("5232:onIfAny = 13");
ad720100 189// Omega_b -> mu X
b7227478 190 TPythia8::Instance()->ReadString("5332:onMode = off");
191 TPythia8::Instance()->ReadString("5332:onIfAny = 13");
948d10f4 192 break;
193 case kSemiMuonic:
ad720100 194// D+- -> mu X
b7227478 195 TPythia8::Instance()->ReadString("411:onMode = off");
196 TPythia8::Instance()->ReadString("411:onIfAll = 13");
ad720100 197// D0 -> mu X
b7227478 198 TPythia8::Instance()->ReadString("421:onMode = off");
199 TPythia8::Instance()->ReadString("421:onIfAll = 13");
ad720100 200// D_s -> mu X
b7227478 201 TPythia8::Instance()->ReadString("431:onMode = off");
202 TPythia8::Instance()->ReadString("431:onIfAll = 13");
ad720100 203// Lambda_c -> mu X
b7227478 204 TPythia8::Instance()->ReadString("4122:onMode = off");
205 TPythia8::Instance()->ReadString("4122:onIfAll = 13");
ad720100 206// Sigma_c -> mu X
b7227478 207 TPythia8::Instance()->ReadString("4132:onMode = off");
208 TPythia8::Instance()->ReadString("4132:onIfAll = 13");
ad720100 209// Sigma -> mu X
b7227478 210 TPythia8::Instance()->ReadString("4232:onMode = off");
211 TPythia8::Instance()->ReadString("4232:onIfAll = 13");
ad720100 212// Omega_c -> mu X
b7227478 213 TPythia8::Instance()->ReadString("4332:onMode = off");
214 TPythia8::Instance()->ReadString("4332:onIfAll = 13");
ad720100 215// B0 -> mu X
b7227478 216 TPythia8::Instance()->ReadString("511:onMode = off");
217 TPythia8::Instance()->ReadString("511:onIfAny = 13");
ad720100 218// B+/- -> mu X
b7227478 219 TPythia8::Instance()->ReadString("521:onMode = off");
220 TPythia8::Instance()->ReadString("521:onIfAny = 13");
ad720100 221// B_s -> mu X
b7227478 222 TPythia8::Instance()->ReadString("531:onMode = off");
223 TPythia8::Instance()->ReadString("531:onIfAny = 13");
ad720100 224// Lambda_c -> mu X
b7227478 225 TPythia8::Instance()->ReadString("5122:onMode = off");
226 TPythia8::Instance()->ReadString("5122:onIfAny = 13");
ad720100 227// Sigma_c -> mu X
b7227478 228 TPythia8::Instance()->ReadString("5132:onMode = off");
229 TPythia8::Instance()->ReadString("5132:onIfAny = 13");
ad720100 230// Sigma_c -> mu X
b7227478 231 TPythia8::Instance()->ReadString("5232:onMode = off");
232 TPythia8::Instance()->ReadString("5232:onIfAny = 13");
ad720100 233// Omega_c -> mu X
b7227478 234 TPythia8::Instance()->ReadString("5332:onMode = off");
235 TPythia8::Instance()->ReadString("5332:onIfAny = 13");
236
948d10f4 237 break;
238 case kDiMuon:
ad720100 239// Rho -> mu+ mu-
b7227478 240 TPythia8::Instance()->ReadString("113:onMode = off");
241 TPythia8::Instance()->ReadString("113:onIfAll = 13 13");
ad720100 242// Eta-> mu+ mu-
b7227478 243 TPythia8::Instance()->ReadString("221:onMode = off");
244 TPythia8::Instance()->ReadString("221:onIfAll = 13 13");
ad720100 245// omega-> mu+ mu-
b7227478 246 TPythia8::Instance()->ReadString("223:onMode = off");
247 TPythia8::Instance()->ReadString("223:onIfAll = 13 13");
ad720100 248// phi-> mu+ mu-
b7227478 249 TPythia8::Instance()->ReadString("333:onMode = off");
250 TPythia8::Instance()->ReadString("333:onIfAll = 13 13");
ad720100 251// J/Psi-> mu+ mu-
b7227478 252 TPythia8::Instance()->ReadString("443:onMode = off");
253 TPythia8::Instance()->ReadString("443:onIfAll = 13 13");
ad720100 254// Psi'-> mu+ mu-
b7227478 255 TPythia8::Instance()->ReadString("100443:onMode = off");
256 TPythia8::Instance()->ReadString("100443:onIfAll = 13 13");
ad720100 257// Ups-> mu+ mu-
b7227478 258 TPythia8::Instance()->ReadString("553:onMode = off");
259 TPythia8::Instance()->ReadString("553:onIfAll = 13 13");
ad720100 260// Ups'-> mu+ mu-
b7227478 261 TPythia8::Instance()->ReadString("100553:onMode = off");
ad720100 262 TPythia8::Instance()->ReadString("100553:onIfAll = 13 13");
263// Ups''-> mu+ mu-
b7227478 264 TPythia8::Instance()->ReadString("200553:onMode = off");
265 TPythia8::Instance()->ReadString("200553:onIfAll = 13 13");
948d10f4 266 break;
267 case kBSemiElectronic:
ad720100 268// B0 - > e+ e-
b7227478 269 TPythia8::Instance()->ReadString("511:onMode = off");
270 TPythia8::Instance()->ReadString("511:onIfAny = 11");
ad720100 271// B+- -> e+ e-
b7227478 272 TPythia8::Instance()->ReadString("521:onMode = off");
273 TPythia8::Instance()->ReadString("521:onIfAny = 11");
ad720100 274// B_s -> e+ e-
b7227478 275 TPythia8::Instance()->ReadString("531:onMode = off");
276 TPythia8::Instance()->ReadString("531:onIfAny = 11");
ad720100 277// Lambda_b -> e+ e-
b7227478 278 TPythia8::Instance()->ReadString("5122:onMode = off");
279 TPythia8::Instance()->ReadString("5122:onIfAny = 11");
ad720100 280// Sigma_b -> e+ e-
b7227478 281 TPythia8::Instance()->ReadString("5132:onMode = off");
282 TPythia8::Instance()->ReadString("5132:onIfAny = 11");
ad720100 283// Sigma_b -> e+ e-
b7227478 284 TPythia8::Instance()->ReadString("5232:onMode = off");
285 TPythia8::Instance()->ReadString("5232:onIfAny = 11");
ad720100 286// Omega_b ->e+ e-
b7227478 287 TPythia8::Instance()->ReadString("5332:onMode = off");
288 TPythia8::Instance()->ReadString("5332:onIfAny = 11");
948d10f4 289 break;
290 case kSemiElectronic:
ad720100 291// D+/- -> e X
b7227478 292 TPythia8::Instance()->ReadString("411:onMode = off");
293 TPythia8::Instance()->ReadString("411:onIfAll = 11");
ad720100 294// D0 -> e X
b7227478 295 TPythia8::Instance()->ReadString("421:onMode = off");
296 TPythia8::Instance()->ReadString("421:onIfAll = 11");
ad720100 297// D_s ->e X
b7227478 298 TPythia8::Instance()->ReadString("431:onMode = off");
299 TPythia8::Instance()->ReadString("431:onIfAll = 11");
ad720100 300// Lambda_c -> e X
b7227478 301 TPythia8::Instance()->ReadString("4122:onMode = off");
302 TPythia8::Instance()->ReadString("4122:onIfAll = 11");
ad720100 303// Sigma_c -> e X
b7227478 304 TPythia8::Instance()->ReadString("4132:onMode = off");
305 TPythia8::Instance()->ReadString("4132:onIfAll = 11");
ad720100 306// Sigma_c -> e X
b7227478 307 TPythia8::Instance()->ReadString("4232:onMode = off");
308 TPythia8::Instance()->ReadString("4232:onIfAll = 11");
ad720100 309// Omega_c -> e X
b7227478 310 TPythia8::Instance()->ReadString("4332:onMode = off");
311 TPythia8::Instance()->ReadString("4332:onIfAll = 11");
ad720100 312// B0 -> e X
b7227478 313 TPythia8::Instance()->ReadString("511:onMode = off");
314 TPythia8::Instance()->ReadString("511:onIfAny = 11");
ad720100 315// B+/- -> e X
b7227478 316 TPythia8::Instance()->ReadString("521:onMode = off");
317 TPythia8::Instance()->ReadString("521:onIfAny = 11");
ad720100 318// B_s -> e X
b7227478 319 TPythia8::Instance()->ReadString("531:onMode = off");
320 TPythia8::Instance()->ReadString("531:onIfAny = 11");
ad720100 321// Lambda_b -> e X
b7227478 322 TPythia8::Instance()->ReadString("5122:onMode = off");
323 TPythia8::Instance()->ReadString("5122:onIfAny = 11");
ad720100 324// Sigma_b -> e X
b7227478 325 TPythia8::Instance()->ReadString("5132:onMode = off");
326 TPythia8::Instance()->ReadString("5132:onIfAny = 11");
ad720100 327// Sigma_b -> e X
b7227478 328 TPythia8::Instance()->ReadString("5232:onMode = off");
329 TPythia8::Instance()->ReadString("5232:onIfAny = 11");
ad720100 330// Omega_b -> e X
b7227478 331 TPythia8::Instance()->ReadString("5332:onMode = off");
332 TPythia8::Instance()->ReadString("5332:onIfAny = 11");
948d10f4 333 break;
334 case kDiElectron:
ad720100 335// Rho -> e+e-
b7227478 336 TPythia8::Instance()->ReadString("113:onMode = off");
337 TPythia8::Instance()->ReadString("113:onIfAll = 11 11");
ad720100 338// Eta -> e+e-
b7227478 339 TPythia8::Instance()->ReadString("221:onMode = off");
340 TPythia8::Instance()->ReadString("221:onIfAll = 11 11");
ad720100 341// omega -> e+e-
b7227478 342 TPythia8::Instance()->ReadString("223:onMode = off");
343 TPythia8::Instance()->ReadString("223:onIfAll = 11 11");
ad720100 344// phi -> e+e-
b7227478 345 TPythia8::Instance()->ReadString("333:onMode = off");
346 TPythia8::Instance()->ReadString("333:onIfAll = 11 11");
ad720100 347// J/Psi -> e+e-
b7227478 348 TPythia8::Instance()->ReadString("443:onMode = off");
349 TPythia8::Instance()->ReadString("443:onIfAll = 11 11");
ad720100 350// Psi' -> e+e-
b7227478 351 TPythia8::Instance()->ReadString("100443:onMode = off");
352 TPythia8::Instance()->ReadString("100443:onIfAll = 11 11");
ad720100 353// Ups -> e+e-
b7227478 354 TPythia8::Instance()->ReadString("553:onMode = off");
355 TPythia8::Instance()->ReadString("553:onIfAll = 11 11");
ad720100 356// Ups' -> e+e-
b7227478 357 TPythia8::Instance()->ReadString("100553:onMode = off");
358 TPythia8::Instance()->ReadString("100553:onIfAll = 11 11");
ad720100 359// Ups'' -> e+e-
b7227478 360 TPythia8::Instance()->ReadString("200553:onMode = off");
361 TPythia8::Instance()->ReadString("200553:onIfAll = 11 11");
948d10f4 362 break;
363 case kBJpsiDiMuon:
ad720100 364// B0 -> J/Psi (Psi') X
b7227478 365 TPythia8::Instance()->ReadString("511:onMode = off");
366 TPythia8::Instance()->ReadString("511:onIfAny = 443 100443");
ad720100 367// B+/- -> J/Psi (Psi') X
b7227478 368 TPythia8::Instance()->ReadString("521:onMode = off");
369 TPythia8::Instance()->ReadString("521:onIfAny = 443 100443");
ad720100 370// B_s -> J/Psi (Psi') X
b7227478 371 TPythia8::Instance()->ReadString("531:onMode = off");
372 TPythia8::Instance()->ReadString("531:onIfAny = 443 100443");
ad720100 373// Lambda_b -> J/Psi (Psi') X
b7227478 374 TPythia8::Instance()->ReadString("5122:onMode = off");
375 TPythia8::Instance()->ReadString("5122:onIfAny = 443 100443");
376//
ad720100 377// J/Psi -> mu+ mu-
b7227478 378 TPythia8::Instance()->ReadString("443:onMode = off");
379 TPythia8::Instance()->ReadString("443:onIfAll = 13 13");
ad720100 380// Psi' -> mu+ mu-
b7227478 381 TPythia8::Instance()->ReadString("100443:onMode = off");
382 TPythia8::Instance()->ReadString("100443:onIfAll = 13 13");
948d10f4 383 break;
384 case kBPsiPrimeDiMuon:
ad720100 385// B0 -> Psi' X
b7227478 386 TPythia8::Instance()->ReadString("511:onMode = off");
387 TPythia8::Instance()->ReadString("511:onIfAny = 100443");
ad720100 388// B+/- -> Psi' X
b7227478 389 TPythia8::Instance()->ReadString("521:onMode = off");
390 TPythia8::Instance()->ReadString("521:onIfAny = 100443");
ad720100 391// B_s -> Psi' X
b7227478 392 TPythia8::Instance()->ReadString("531:onMode = off");
393 TPythia8::Instance()->ReadString("531:onIfAny = 100443");
ad720100 394// Lambda_b -> Psi' X
b7227478 395 TPythia8::Instance()->ReadString("5122:onMode = off");
396 TPythia8::Instance()->ReadString("5122:onIfAny = 100443");
397//
ad720100 398// Psi' -> mu+ mu-
b7227478 399 TPythia8::Instance()->ReadString("100443:onMode = off");
400 TPythia8::Instance()->ReadString("100443:onIfAll = 13 13");
948d10f4 401 break;
402 case kBJpsiDiElectron:
ad720100 403// B0 -> Psi X
b7227478 404 TPythia8::Instance()->ReadString("511:onMode = off");
405 TPythia8::Instance()->ReadString("511:onIfAny = 443");
ad720100 406// B+/- -> Psi X
b7227478 407 TPythia8::Instance()->ReadString("521:onMode = off");
408 TPythia8::Instance()->ReadString("521:onIfAny = 443");
ad720100 409// B_s -> Psi X
b7227478 410 TPythia8::Instance()->ReadString("531:onMode = off");
411 TPythia8::Instance()->ReadString("531:onIfAny = 443");
ad720100 412// Lambda_b -> Psi X
b7227478 413 TPythia8::Instance()->ReadString("5122:onMode = off");
414 TPythia8::Instance()->ReadString("5122:onIfAny = 443");
415//
ad720100 416// Psi -> mu+ mu-
b7227478 417 TPythia8::Instance()->ReadString("443:onMode = off");
418 TPythia8::Instance()->ReadString("443:onIfAll = 11 11");
419
948d10f4 420 break;
421 case kBJpsi:
ad720100 422// B0 -> Psi X
b7227478 423 TPythia8::Instance()->ReadString("511:onMode = off");
424 TPythia8::Instance()->ReadString("511:onIfAny = 443");
ad720100 425// B+/- -> Psi X
b7227478 426 TPythia8::Instance()->ReadString("521:onMode = off");
427 TPythia8::Instance()->ReadString("521:onIfAny = 443");
ad720100 428// B_s -> Psi X
b7227478 429 TPythia8::Instance()->ReadString("531:onMode = off");
430 TPythia8::Instance()->ReadString("531:onIfAny = 443");
ad720100 431// Lambda_b -> Psi X
b7227478 432 TPythia8::Instance()->ReadString("5122:onMode = off");
433 TPythia8::Instance()->ReadString("5122:onIfAny = 443");
948d10f4 434 break;
435 case kBPsiPrimeDiElectron:
ad720100 436// B0 -> Psi' X
b7227478 437 TPythia8::Instance()->ReadString("511:onMode = off");
438 TPythia8::Instance()->ReadString("511:onIfAny = 100443");
ad720100 439// B+/- -> Psi' X
b7227478 440 TPythia8::Instance()->ReadString("521:onMode = off");
441 TPythia8::Instance()->ReadString("521:onIfAny = 100443");
ad720100 442// B_s -> Psi' X
b7227478 443 TPythia8::Instance()->ReadString("531:onMode = off");
444 TPythia8::Instance()->ReadString("531:onIfAny = 100443");
ad720100 445// Lambda_b -> Psi' X
b7227478 446 TPythia8::Instance()->ReadString("5122:onMode = off");
447 TPythia8::Instance()->ReadString("5122:onIfAny = 100443");
448//
ad720100 449// Psi' -> mu+ mu-
b7227478 450 TPythia8::Instance()->ReadString("100443:onMode = off");
451 TPythia8::Instance()->ReadString("100443:onIfAll = 11 11");
948d10f4 452 break;
453 case kPiToMu:
ad720100 454// pi -> mu nu
b7227478 455 TPythia8::Instance()->ReadString("211:onMode = off");
456 TPythia8::Instance()->ReadString("211:onIfAny = 13");
948d10f4 457 break;
458 case kKaToMu:
ad720100 459// K -> mu nu
b7227478 460 TPythia8::Instance()->ReadString("321:onMode = off");
461 TPythia8::Instance()->ReadString("321:onIfAny = 13");
948d10f4 462 break;
463 case kAllMuonic:
ad720100 464// pi/K -> mu
b7227478 465 TPythia8::Instance()->ReadString("211:onMode = off");
466 TPythia8::Instance()->ReadString("211:onIfAny = 13");
467 TPythia8::Instance()->ReadString("321:onMode = off");
468 TPythia8::Instance()->ReadString("321:onIfAny = 13");
948d10f4 469 break;
470 case kWToMuon:
ad720100 471// W -> mu X
b7227478 472 TPythia8::Instance()->ReadString("24:onMode = off");
473 TPythia8::Instance()->ReadString("24:onIfAny = 13");
948d10f4 474 break;
475 case kWToCharm:
ad720100 476// W -> c X
b7227478 477 TPythia8::Instance()->ReadString("24:onMode = off");
478 TPythia8::Instance()->ReadString("24:onIfAny = 4");
948d10f4 479 break;
480 case kWToCharmToMuon:
ad720100 481// W -> c X
b7227478 482 TPythia8::Instance()->ReadString("24:onMode = off");
483 TPythia8::Instance()->ReadString("24:onIfAny = 4");
ad720100 484// D+- -> mu X
b7227478 485 TPythia8::Instance()->ReadString("411:onMode = off");
486 TPythia8::Instance()->ReadString("411:onIfAll = 13");
ad720100 487// D0 -> mu X
b7227478 488 TPythia8::Instance()->ReadString("421:onMode = off");
489 TPythia8::Instance()->ReadString("421:onIfAll = 13");
ad720100 490// D_s -> mu X
b7227478 491 TPythia8::Instance()->ReadString("431:onMode = off");
492 TPythia8::Instance()->ReadString("431:onIfAll = 13");
ad720100 493// Lambda_c -> mu X
b7227478 494 TPythia8::Instance()->ReadString("4122:onMode = off");
495 TPythia8::Instance()->ReadString("4122:onIfAll = 13");
ad720100 496// Sigma_c -> mu X
b7227478 497 TPythia8::Instance()->ReadString("4132:onMode = off");
498 TPythia8::Instance()->ReadString("4132:onIfAll = 13");
ad720100 499// Sigma_c -> mu X
b7227478 500 TPythia8::Instance()->ReadString("4232:onMode = off");
501 TPythia8::Instance()->ReadString("4232:onIfAll = 13");
ad720100 502// Omega_c -> mu X
b7227478 503 TPythia8::Instance()->ReadString("4332:onMode = off");
504 TPythia8::Instance()->ReadString("4332:onIfAll = 13");
948d10f4 505 break;
506 case kZDiMuon:
ad720100 507// Z -> mu+ mu-
b7227478 508 TPythia8::Instance()->ReadString("23:onMode = off");
509 TPythia8::Instance()->ReadString("23:onIfAll = 13 13");
948d10f4 510 break;
511 case kZDiElectron:
ad720100 512// Z -> e+ e-
b7227478 513 TPythia8::Instance()->ReadString("23:onMode = off");
514 TPythia8::Instance()->ReadString("23:onIfAll = 11 11");
948d10f4 515 break;
516 case kHadronicD:
517 ForceHadronicD(1);
518 break;
519 case kHadronicDWithout4Bodies:
520 ForceHadronicD(0);
521 break;
522 case kPhiKK:
ad720100 523 // Phi-> K+ K-
b7227478 524 TPythia8::Instance()->ReadString("333:onMode = off");
525 TPythia8::Instance()->ReadString("333:onIfAll = 321 321");
948d10f4 526 break;
527 case kOmega:
ad720100 528 // Omega -> Lambda K
b7227478 529 TPythia8::Instance()->ReadString("3334:onMode = off");
530 TPythia8::Instance()->ReadString("3334:onIfAll = 3122 321 ");
d3553100 531 case kLambda:
532 // Lambda -> p pi-
533 TPythia8::Instance()->ReadString("3122:onMode = off");
534 TPythia8::Instance()->ReadString("3122:onIfAll = 2212 211 ");
948d10f4 535 case kAll:
536 break;
537 case kNoDecay:
538 TPythia8::Instance()->ReadString("HadronLevel:Decay = off");
539 break;
540 case kNoDecayHeavy:
1fefb2d4 541 case kNoDecayBeauty:
948d10f4 542 case kNeutralPion:
543 break;
544 }
545}
546
547Float_t AliDecayerPythia8::GetPartialBranchingRatio(Int_t ipart)
548{
549 // Get the partial branching ration for the forced decay channels
550
551 Pythia8::Pythia* thePythia = TPythia8::Instance()->Pythia8();
552 Pythia8::ParticleDataTable table = thePythia->particleData;
553 Pythia8::ParticleDataEntry* pd = table.particleDataPtr(ipart);
554 Pythia8::DecayTable decays = pd->decay;
555
556
557 Int_t nc = decays.size();
558 Float_t br = 0.;
559//
560// Loop over decay channels
561 for (Int_t ic = 0; ic < nc; ic++) {
562 Pythia8::DecayChannel& decCh = decays[ic];
b7227478 563 for (Int_t i = 0; i < decCh.multiplicity(); i++) {
948d10f4 564 br += decCh.bRatio();
565 }
566 }
567 return (br);
568}
569
570
948d10f4 571Float_t AliDecayerPythia8::GetLifetime(Int_t kf)
572{
573 // Return lifetime of particle
574 Pythia8::Pythia* thePythia = TPythia8::Instance()->Pythia8();
575 Pythia8::ParticleDataTable table = thePythia->particleData;
576 Float_t tau = table.tau0(kf);
577 return ( tau);
578}
579
580void AliDecayerPythia8::SwitchOffHeavyFlavour()
581{
582 // Switch off heavy flavour production
583 //
584// Maximum number of quark flavours used in pdf
585 TPythia8::Instance()->ReadString("PDFinProcess:nQuarkIn = 3");
586// Maximum number of flavors that can be used in showers
587 TPythia8::Instance()->ReadString("SpaceShower:nQuarkIn = 3");
588 TPythia8::Instance()->ReadString("TimeShower:nGammaToQuark = 3");
589 TPythia8::Instance()->ReadString("TimeShower:nGluonToQuark = 3");
590}
591
592
593void AliDecayerPythia8::ForceHadronicD(Int_t optUse4Bodies)
594{
595//
596// Force golden D decay modes
597//
ad720100 598 // K* -> K pi
b7227478 599 TPythia8::Instance()->ReadString("313:onMode = off");
600 TPythia8::Instance()->ReadString("313:onIfAll = 321 211");
948d10f4 601 // for Ds -> Phi pi+
b7227478 602 TPythia8::Instance()->ReadString("333:onMode = off");
603 TPythia8::Instance()->ReadString("333:onIfAll = 321 321");
948d10f4 604 // for D0 -> rho0 pi+ k-
b7227478 605 TPythia8::Instance()->ReadString("113:onMode = off");
606 TPythia8::Instance()->ReadString("113:onIfAll = 211 211");
948d10f4 607 // for Lambda_c -> Delta++ K-
b7227478 608 TPythia8::Instance()->ReadString("2224:onMode = off");
609 TPythia8::Instance()->ReadString("2224:onIfAll = 2212 211");
00a8ca0b 610 // for Lambda_c -> Lambda(1520) K-
611 TPythia8::Instance()->ReadString("3124:onMode = off");
612 TPythia8::Instance()->ReadString("3124:onIfAll = 2212 321");
948d10f4 613
614
b7227478 615 TPythia8::Instance()->ReadString("411:onMode = off");
616 TPythia8::Instance()->ReadString("421:onMode = off");
617 TPythia8::Instance()->ReadString("431:onMode = off");
618 TPythia8::Instance()->ReadString("4112:onMode = off");
619 TPythia8::Instance()->ReadString("4122:onMode = off");
620
ad720100 621 // D+/- -> K pi pi
b7227478 622 TPythia8::Instance()->ReadString("411:onIfMatch = 321 211 211");
d3553100 623 // D+/- -> K* pi
b7227478 624 TPythia8::Instance()->ReadString("411:onIfMatch = 313 211");
00a8ca0b 625 // D0 -> K pi
b7227478 626 TPythia8::Instance()->ReadString("421:onIfMatch = 321 211");
ad720100 627
b7227478 628 if (optUse4Bodies) {
ad720100 629 // D0 -> K pi pi pi
b7227478 630 TPythia8::Instance()->ReadString("421:onIfMatch = 321 211 211 211");
ad720100 631 // D0 -> K pi rho
b7227478 632 TPythia8::Instance()->ReadString("421:onIfMatch = 321 211 113");
00a8ca0b 633 // D0 -> K*0 pi pi
634 TPythia8::Instance()->ReadString("421:onIfMatch = 313 211 211");
b7227478 635 }
948d10f4 636
ad720100 637 // D_s -> K K*
b7227478 638 TPythia8::Instance()->ReadString("431:onIfMatch = 321 313");
ad720100 639 // D_s -> Phi pi
b7227478 640 TPythia8::Instance()->ReadString("431:onIfMatch = 333 211");
b7227478 641
ad720100 642 // Lambda_c -> p K*
b7227478 643 TPythia8::Instance()->ReadString("4122:onIfMatch = 2212 313");
ad720100 644 // Lambda_c -> Delta K
b7227478 645 TPythia8::Instance()->ReadString("4122:onIfMatch = 2224 321");
00a8ca0b 646 // Lambda_c -> Lambda(1520) pi
647 TPythia8::Instance()->ReadString("4122:onIfMatch = 3124 211");
ad720100 648 // Lambda_c -> p K pi
b7227478 649 TPythia8::Instance()->ReadString("4122:onIfMatch = 2212 321 211");
00a8ca0b 650 // Lambda_c -> Lambda pi
651 TPythia8::Instance()->ReadString("4122:onIfMatch = 3122 211");
b7227478 652
948d10f4 653}
654