1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 // Implementation of AliDecayer using Pythia8
19 // Author: andreas.morsch@cern.ch
22 #include <TLorentzVector.h>
23 #include "AliTPythia8.h"
24 #include "AliDecayerPythia8.h"
25 #include "ParticleData.h"
27 ClassImp(AliDecayerPythia8)
29 Bool_t AliDecayerPythia8::fgInit = kFALSE;
31 AliDecayerPythia8::AliDecayerPythia8():
33 fPythia8(new AliTPythia8()),
39 fPythia8->Pythia8()->readString("SoftQCD:elastic = on");
40 fPythia8->Pythia8()->init();
43 //___________________________________________________________________________
44 void AliDecayerPythia8::Decay(Int_t pdg, TLorentzVector* p)
46 // Decay a single particle
48 AppendParticle(pdg, p);
49 Int_t idPart = fPythia8->Pythia8()->event[0].id();
50 fPythia8->Pythia8()->particleData.mayDecay(idPart,kTRUE);
51 fPythia8->Pythia8()->moreDecays();
52 if (fDebug > 0) fPythia8->EventListing();
55 //___________________________________________________________________________
56 Int_t AliDecayerPythia8::ImportParticles(TClonesArray *particles)
58 //import the decay products into particles array
59 return (fPythia8->ImportParticles(particles, "All"));
63 void AliDecayerPythia8::Init()
69 // fPythia->SetDecayTable();
72 // Switch on heavy flavor decays
75 Int_t heavy[14] = {411, 421, 431, 4122, 4132, 4232, 4332, 511, 521, 531, 5122, 5132, 5232, 5332};
76 // fPythia->ResetDecayTable();
77 for (j=0; j < 14; j++) {
78 if (fDecay == kNoDecayHeavy) {
79 AliTPythia8::Instance()->ReadString(Form("%d:onMode = off", heavy[j]));
81 AliTPythia8::Instance()->ReadString(Form("%d:onMode = on", heavy[j]));
86 //...Switch off decay of pi0, K0S, Lambda, Sigma+-, Xi0-, Omega-.
88 if (fDecay != kNeutralPion) {
89 AliTPythia8::Instance()->ReadString("111:onMode = off");
91 AliTPythia8::Instance()->ReadString("111:onMode = on");
94 AliTPythia8::Instance()->ReadString("310:onMode = off");
95 AliTPythia8::Instance()->ReadString("3112:onMode = off");
96 AliTPythia8::Instance()->ReadString("3212:onMode = off");
97 AliTPythia8::Instance()->ReadString("3222:onMode = off");
98 AliTPythia8::Instance()->ReadString("3312:onMode = off");
99 AliTPythia8::Instance()->ReadString("3322:onMode = off");
100 AliTPythia8::Instance()->ReadString("3334:onMode = off");
101 // .. Force decay channels
105 void AliDecayerPythia8::ForceDecay()
108 // Force a particle decay mode
109 // Switch heavy flavour production off if requested
110 if (!fHeavyFlavour) SwitchOffHeavyFlavour();
112 Decay_t decay = fDecay;
113 AliTPythia8::Instance()->ReadString("HadronLevel:Decay = on");
115 if (decay == kNoDecayHeavy) return;
123 AliTPythia8::Instance()->ReadString("511:onMode = off");
124 AliTPythia8::Instance()->ReadString("511:onIfAny = 13 443 100443");
126 AliTPythia8::Instance()->ReadString("521:onMode = off");
127 AliTPythia8::Instance()->ReadString("521:onIfAny = 13 443 100443");
129 AliTPythia8::Instance()->ReadString("531:onMode = off");
130 AliTPythia8::Instance()->ReadString("531:onIfAny = 13 443 100443");
132 AliTPythia8::Instance()->ReadString("5122:onMode = off");
133 AliTPythia8::Instance()->ReadString("5122:onIfAny = 13 443 100443");
135 AliTPythia8::Instance()->ReadString("5132:onMode = off");
136 AliTPythia8::Instance()->ReadString("5132:onIfAny = 13 443 100443");
138 AliTPythia8::Instance()->ReadString("5232:onMode = off");
139 AliTPythia8::Instance()->ReadString("5232:onIfAny = 13 443 100443");
141 AliTPythia8::Instance()->ReadString("5332:onMode = off");
142 AliTPythia8::Instance()->ReadString("5332:onIfAny = 13 443 100443");
144 AliTPythia8::Instance()->ReadString("100443:onMode = off");
145 AliTPythia8::Instance()->ReadString("100443:onIfAny = 443");
147 AliTPythia8::Instance()->ReadString("443:onMode = off");
148 AliTPythia8::Instance()->ReadString("443:onIfAll = 13 13");
150 AliTPythia8::Instance()->ReadString("411:onMode = off");
151 AliTPythia8::Instance()->ReadString("411:onIfAll = 13");
153 AliTPythia8::Instance()->ReadString("421:onMode = off");
154 AliTPythia8::Instance()->ReadString("421:onIfAll = 13");
156 AliTPythia8::Instance()->ReadString("431:onMode = off");
157 AliTPythia8::Instance()->ReadString("431:onIfAll = 13");
159 AliTPythia8::Instance()->ReadString("4122:onMode = off");
160 AliTPythia8::Instance()->ReadString("4122:onIfAll = 13");
162 AliTPythia8::Instance()->ReadString("4132:onMode = off");
163 AliTPythia8::Instance()->ReadString("4132:onIfAll = 13");
165 AliTPythia8::Instance()->ReadString("4232:onMode = off");
166 AliTPythia8::Instance()->ReadString("4232:onIfAll = 13");
168 AliTPythia8::Instance()->ReadString("4332:onMode = off");
169 AliTPythia8::Instance()->ReadString("4332:onIfAll = 13");
172 case kChiToJpsiGammaToMuonMuon:
173 // Chi_1c -> J/Psi Gamma
174 AliTPythia8::Instance()->ReadString("20443:onMode = off");
175 AliTPythia8::Instance()->ReadString("20443:onIfAll = 443 22");
176 // Chi_2c -> J/Psi Gamma
177 AliTPythia8::Instance()->ReadString("445:onMode = off");
178 AliTPythia8::Instance()->ReadString("445:onIfAll = 443 22");
180 AliTPythia8::Instance()->ReadString("443:onMode = off");
181 AliTPythia8::Instance()->ReadString("443:onIfAll = 13 13");
183 case kChiToJpsiGammaToElectronElectron:
184 // Chi_1c -> J/Psi Gamma
185 AliTPythia8::Instance()->ReadString("20443:onMode = off");
186 AliTPythia8::Instance()->ReadString("20443:onIfAll = 443 22");
187 // Chi_2c -> J/Psi Gamma
188 AliTPythia8::Instance()->ReadString("445:onMode = off");
189 AliTPythia8::Instance()->ReadString("445:onIfAll = 443 22");
191 AliTPythia8::Instance()->ReadString("443:onMode = off");
192 AliTPythia8::Instance()->ReadString("443:onIfAll = 11 11");
197 AliTPythia8::Instance()->ReadString("511:onMode = off");
198 AliTPythia8::Instance()->ReadString("511:onIfAny = 13");
200 AliTPythia8::Instance()->ReadString("521:onMode = off");
201 AliTPythia8::Instance()->ReadString("521:onIfAny = 13");
203 AliTPythia8::Instance()->ReadString("531:onMode = off");
204 AliTPythia8::Instance()->ReadString("531:onIfAny = 13");
206 AliTPythia8::Instance()->ReadString("5122:onMode = off");
207 AliTPythia8::Instance()->ReadString("5122:onIfAny = 13");
209 AliTPythia8::Instance()->ReadString("5132:onMode = off");
210 AliTPythia8::Instance()->ReadString("5132:onIfAny = 13");
212 AliTPythia8::Instance()->ReadString("5232:onMode = off");
213 AliTPythia8::Instance()->ReadString("5232:onIfAny = 13");
215 AliTPythia8::Instance()->ReadString("5332:onMode = off");
216 AliTPythia8::Instance()->ReadString("5332:onIfAny = 13");
220 AliTPythia8::Instance()->ReadString("411:onMode = off");
221 AliTPythia8::Instance()->ReadString("411:onIfAll = 13");
223 AliTPythia8::Instance()->ReadString("421:onMode = off");
224 AliTPythia8::Instance()->ReadString("421:onIfAll = 13");
226 AliTPythia8::Instance()->ReadString("431:onMode = off");
227 AliTPythia8::Instance()->ReadString("431:onIfAll = 13");
229 AliTPythia8::Instance()->ReadString("4122:onMode = off");
230 AliTPythia8::Instance()->ReadString("4122:onIfAll = 13");
232 AliTPythia8::Instance()->ReadString("4132:onMode = off");
233 AliTPythia8::Instance()->ReadString("4132:onIfAll = 13");
235 AliTPythia8::Instance()->ReadString("4232:onMode = off");
236 AliTPythia8::Instance()->ReadString("4232:onIfAll = 13");
238 AliTPythia8::Instance()->ReadString("4332:onMode = off");
239 AliTPythia8::Instance()->ReadString("4332:onIfAll = 13");
241 AliTPythia8::Instance()->ReadString("511:onMode = off");
242 AliTPythia8::Instance()->ReadString("511:onIfAny = 13");
244 AliTPythia8::Instance()->ReadString("521:onMode = off");
245 AliTPythia8::Instance()->ReadString("521:onIfAny = 13");
247 AliTPythia8::Instance()->ReadString("531:onMode = off");
248 AliTPythia8::Instance()->ReadString("531:onIfAny = 13");
250 AliTPythia8::Instance()->ReadString("5122:onMode = off");
251 AliTPythia8::Instance()->ReadString("5122:onIfAny = 13");
253 AliTPythia8::Instance()->ReadString("5132:onMode = off");
254 AliTPythia8::Instance()->ReadString("5132:onIfAny = 13");
256 AliTPythia8::Instance()->ReadString("5232:onMode = off");
257 AliTPythia8::Instance()->ReadString("5232:onIfAny = 13");
259 AliTPythia8::Instance()->ReadString("5332:onMode = off");
260 AliTPythia8::Instance()->ReadString("5332:onIfAny = 13");
265 AliTPythia8::Instance()->ReadString("443:onMode = off");
266 AliTPythia8::Instance()->ReadString("443:onIfAll = 13 13");
270 AliTPythia8::Instance()->ReadString("113:onMode = off");
271 AliTPythia8::Instance()->ReadString("113:onIfAll = 13 13");
273 AliTPythia8::Instance()->ReadString("221:onMode = off");
274 AliTPythia8::Instance()->ReadString("221:onIfAll = 13 13");
276 AliTPythia8::Instance()->ReadString("223:onMode = off");
277 AliTPythia8::Instance()->ReadString("223:onIfAll = 13 13");
279 AliTPythia8::Instance()->ReadString("333:onMode = off");
280 AliTPythia8::Instance()->ReadString("333:onIfAll = 13 13");
282 AliTPythia8::Instance()->ReadString("443:onMode = off");
283 AliTPythia8::Instance()->ReadString("443:onIfAll = 13 13");
285 AliTPythia8::Instance()->ReadString("100443:onMode = off");
286 AliTPythia8::Instance()->ReadString("100443:onIfAll = 13 13");
288 AliTPythia8::Instance()->ReadString("553:onMode = off");
289 AliTPythia8::Instance()->ReadString("553:onIfAll = 13 13");
291 AliTPythia8::Instance()->ReadString("100553:onMode = off");
292 AliTPythia8::Instance()->ReadString("100553:onIfAll = 13 13");
294 AliTPythia8::Instance()->ReadString("200553:onMode = off");
295 AliTPythia8::Instance()->ReadString("200553:onIfAll = 13 13");
297 case kBSemiElectronic:
299 AliTPythia8::Instance()->ReadString("511:onMode = off");
300 AliTPythia8::Instance()->ReadString("511:onIfAny = 11");
302 AliTPythia8::Instance()->ReadString("521:onMode = off");
303 AliTPythia8::Instance()->ReadString("521:onIfAny = 11");
305 AliTPythia8::Instance()->ReadString("531:onMode = off");
306 AliTPythia8::Instance()->ReadString("531:onIfAny = 11");
308 AliTPythia8::Instance()->ReadString("5122:onMode = off");
309 AliTPythia8::Instance()->ReadString("5122:onIfAny = 11");
311 AliTPythia8::Instance()->ReadString("5132:onMode = off");
312 AliTPythia8::Instance()->ReadString("5132:onIfAny = 11");
314 AliTPythia8::Instance()->ReadString("5232:onMode = off");
315 AliTPythia8::Instance()->ReadString("5232:onIfAny = 11");
317 AliTPythia8::Instance()->ReadString("5332:onMode = off");
318 AliTPythia8::Instance()->ReadString("5332:onIfAny = 11");
320 case kSemiElectronic:
322 AliTPythia8::Instance()->ReadString("411:onMode = off");
323 AliTPythia8::Instance()->ReadString("411:onIfAll = 11");
325 AliTPythia8::Instance()->ReadString("421:onMode = off");
326 AliTPythia8::Instance()->ReadString("421:onIfAll = 11");
328 AliTPythia8::Instance()->ReadString("431:onMode = off");
329 AliTPythia8::Instance()->ReadString("431:onIfAll = 11");
331 AliTPythia8::Instance()->ReadString("4122:onMode = off");
332 AliTPythia8::Instance()->ReadString("4122:onIfAll = 11");
334 AliTPythia8::Instance()->ReadString("4132:onMode = off");
335 AliTPythia8::Instance()->ReadString("4132:onIfAll = 11");
337 AliTPythia8::Instance()->ReadString("4232:onMode = off");
338 AliTPythia8::Instance()->ReadString("4232:onIfAll = 11");
340 AliTPythia8::Instance()->ReadString("4332:onMode = off");
341 AliTPythia8::Instance()->ReadString("4332:onIfAll = 11");
343 AliTPythia8::Instance()->ReadString("511:onMode = off");
344 AliTPythia8::Instance()->ReadString("511:onIfAny = 11");
346 AliTPythia8::Instance()->ReadString("521:onMode = off");
347 AliTPythia8::Instance()->ReadString("521:onIfAny = 11");
349 AliTPythia8::Instance()->ReadString("531:onMode = off");
350 AliTPythia8::Instance()->ReadString("531:onIfAny = 11");
352 AliTPythia8::Instance()->ReadString("5122:onMode = off");
353 AliTPythia8::Instance()->ReadString("5122:onIfAny = 11");
355 AliTPythia8::Instance()->ReadString("5132:onMode = off");
356 AliTPythia8::Instance()->ReadString("5132:onIfAny = 11");
358 AliTPythia8::Instance()->ReadString("5232:onMode = off");
359 AliTPythia8::Instance()->ReadString("5232:onIfAny = 11");
361 AliTPythia8::Instance()->ReadString("5332:onMode = off");
362 AliTPythia8::Instance()->ReadString("5332:onIfAny = 11");
366 AliTPythia8::Instance()->ReadString("113:onMode = off");
367 AliTPythia8::Instance()->ReadString("113:onIfAll = 11 11");
369 AliTPythia8::Instance()->ReadString("221:onMode = off");
370 AliTPythia8::Instance()->ReadString("221:onIfAll = 11 11");
372 AliTPythia8::Instance()->ReadString("223:onMode = off");
373 AliTPythia8::Instance()->ReadString("223:onIfAll = 11 11");
375 AliTPythia8::Instance()->ReadString("333:onMode = off");
376 AliTPythia8::Instance()->ReadString("333:onIfAll = 11 11");
378 AliTPythia8::Instance()->ReadString("443:onMode = off");
379 AliTPythia8::Instance()->ReadString("443:onIfAll = 11 11");
381 AliTPythia8::Instance()->ReadString("100443:onMode = off");
382 AliTPythia8::Instance()->ReadString("100443:onIfAll = 11 11");
384 AliTPythia8::Instance()->ReadString("553:onMode = off");
385 AliTPythia8::Instance()->ReadString("553:onIfAll = 11 11");
387 AliTPythia8::Instance()->ReadString("100553:onMode = off");
388 AliTPythia8::Instance()->ReadString("100553:onIfAll = 11 11");
390 AliTPythia8::Instance()->ReadString("200553:onMode = off");
391 AliTPythia8::Instance()->ReadString("200553:onIfAll = 11 11");
394 // B0 -> J/Psi (Psi') X
395 AliTPythia8::Instance()->ReadString("511:onMode = off");
396 AliTPythia8::Instance()->ReadString("511:onIfAny = 443 100443");
397 // B+/- -> J/Psi (Psi') X
398 AliTPythia8::Instance()->ReadString("521:onMode = off");
399 AliTPythia8::Instance()->ReadString("521:onIfAny = 443 100443");
400 // B_s -> J/Psi (Psi') X
401 AliTPythia8::Instance()->ReadString("531:onMode = off");
402 AliTPythia8::Instance()->ReadString("531:onIfAny = 443 100443");
403 // Lambda_b -> J/Psi (Psi') X
404 AliTPythia8::Instance()->ReadString("5122:onMode = off");
405 AliTPythia8::Instance()->ReadString("5122:onIfAny = 443 100443");
408 AliTPythia8::Instance()->ReadString("443:onMode = off");
409 AliTPythia8::Instance()->ReadString("443:onIfAll = 13 13");
411 AliTPythia8::Instance()->ReadString("100443:onMode = off");
412 AliTPythia8::Instance()->ReadString("100443:onIfAll = 13 13");
414 case kBPsiPrimeDiMuon:
416 AliTPythia8::Instance()->ReadString("511:onMode = off");
417 AliTPythia8::Instance()->ReadString("511:onIfAny = 100443");
419 AliTPythia8::Instance()->ReadString("521:onMode = off");
420 AliTPythia8::Instance()->ReadString("521:onIfAny = 100443");
422 AliTPythia8::Instance()->ReadString("531:onMode = off");
423 AliTPythia8::Instance()->ReadString("531:onIfAny = 100443");
424 // Lambda_b -> Psi' X
425 AliTPythia8::Instance()->ReadString("5122:onMode = off");
426 AliTPythia8::Instance()->ReadString("5122:onIfAny = 100443");
429 AliTPythia8::Instance()->ReadString("100443:onMode = off");
430 AliTPythia8::Instance()->ReadString("100443:onIfAll = 13 13");
432 case kBJpsiDiElectron:
434 AliTPythia8::Instance()->ReadString("511:onMode = off");
435 AliTPythia8::Instance()->ReadString("511:onIfAny = 443");
437 AliTPythia8::Instance()->ReadString("521:onMode = off");
438 AliTPythia8::Instance()->ReadString("521:onIfAny = 443");
440 AliTPythia8::Instance()->ReadString("531:onMode = off");
441 AliTPythia8::Instance()->ReadString("531:onIfAny = 443");
443 AliTPythia8::Instance()->ReadString("5122:onMode = off");
444 AliTPythia8::Instance()->ReadString("5122:onIfAny = 443");
447 AliTPythia8::Instance()->ReadString("443:onMode = off");
448 AliTPythia8::Instance()->ReadString("443:onIfAll = 11 11");
453 AliTPythia8::Instance()->ReadString("511:onMode = off");
454 AliTPythia8::Instance()->ReadString("511:onIfAny = 443");
456 AliTPythia8::Instance()->ReadString("521:onMode = off");
457 AliTPythia8::Instance()->ReadString("521:onIfAny = 443");
459 AliTPythia8::Instance()->ReadString("531:onMode = off");
460 AliTPythia8::Instance()->ReadString("531:onIfAny = 443");
462 AliTPythia8::Instance()->ReadString("5122:onMode = off");
463 AliTPythia8::Instance()->ReadString("5122:onIfAny = 443");
465 case kBPsiPrimeDiElectron:
467 AliTPythia8::Instance()->ReadString("511:onMode = off");
468 AliTPythia8::Instance()->ReadString("511:onIfAny = 100443");
470 AliTPythia8::Instance()->ReadString("521:onMode = off");
471 AliTPythia8::Instance()->ReadString("521:onIfAny = 100443");
473 AliTPythia8::Instance()->ReadString("531:onMode = off");
474 AliTPythia8::Instance()->ReadString("531:onIfAny = 100443");
475 // Lambda_b -> Psi' X
476 AliTPythia8::Instance()->ReadString("5122:onMode = off");
477 AliTPythia8::Instance()->ReadString("5122:onIfAny = 100443");
480 AliTPythia8::Instance()->ReadString("100443:onMode = off");
481 AliTPythia8::Instance()->ReadString("100443:onIfAll = 11 11");
485 AliTPythia8::Instance()->ReadString("211:onMode = off");
486 AliTPythia8::Instance()->ReadString("211:onIfAny = 13");
490 AliTPythia8::Instance()->ReadString("321:onMode = off");
491 AliTPythia8::Instance()->ReadString("321:onIfAny = 13");
495 AliTPythia8::Instance()->ReadString("211:onMode = off");
496 AliTPythia8::Instance()->ReadString("211:onIfAny = 13");
497 AliTPythia8::Instance()->ReadString("321:onMode = off");
498 AliTPythia8::Instance()->ReadString("321:onIfAny = 13");
502 AliTPythia8::Instance()->ReadString("24:onMode = off");
503 AliTPythia8::Instance()->ReadString("24:onIfAny = 13");
507 AliTPythia8::Instance()->ReadString("24:onMode = off");
508 AliTPythia8::Instance()->ReadString("24:onIfAny = 4");
510 case kWToCharmToMuon:
512 AliTPythia8::Instance()->ReadString("24:onMode = off");
513 AliTPythia8::Instance()->ReadString("24:onIfAny = 4");
515 AliTPythia8::Instance()->ReadString("411:onMode = off");
516 AliTPythia8::Instance()->ReadString("411:onIfAll = 13");
518 AliTPythia8::Instance()->ReadString("421:onMode = off");
519 AliTPythia8::Instance()->ReadString("421:onIfAll = 13");
521 AliTPythia8::Instance()->ReadString("431:onMode = off");
522 AliTPythia8::Instance()->ReadString("431:onIfAll = 13");
524 AliTPythia8::Instance()->ReadString("4122:onMode = off");
525 AliTPythia8::Instance()->ReadString("4122:onIfAll = 13");
527 AliTPythia8::Instance()->ReadString("4132:onMode = off");
528 AliTPythia8::Instance()->ReadString("4132:onIfAll = 13");
530 AliTPythia8::Instance()->ReadString("4232:onMode = off");
531 AliTPythia8::Instance()->ReadString("4232:onIfAll = 13");
533 AliTPythia8::Instance()->ReadString("4332:onMode = off");
534 AliTPythia8::Instance()->ReadString("4332:onIfAll = 13");
538 AliTPythia8::Instance()->ReadString("23:onMode = off");
539 AliTPythia8::Instance()->ReadString("23:onIfAll = 13 13");
543 AliTPythia8::Instance()->ReadString("23:onMode = off");
544 AliTPythia8::Instance()->ReadString("23:onIfAll = 11 11");
549 case kHadronicDWithout4Bodies:
554 AliTPythia8::Instance()->ReadString("333:onMode = off");
555 AliTPythia8::Instance()->ReadString("333:onIfAll = 321 321");
559 AliTPythia8::Instance()->ReadString("3334:onMode = off");
560 AliTPythia8::Instance()->ReadString("3334:onIfAll = 3122 321 ");
564 AliTPythia8::Instance()->ReadString("3122:onMode = off");
565 AliTPythia8::Instance()->ReadString("3122:onIfAll = 2212 211 ");
570 AliTPythia8::Instance()->ReadString("HadronLevel:Decay = off");
575 case kPsiPrimeJpsiDiElectron:
583 Float_t AliDecayerPythia8::GetPartialBranchingRatio(Int_t ipart)
585 // Get the partial branching ration for the forced decay channels
587 Pythia8::Pythia* thePythia = AliTPythia8::Instance()->Pythia8();
588 Pythia8::ParticleData & table = thePythia->particleData;
589 Pythia8::ParticleDataEntry* pd = table.particleDataEntryPtr(ipart);
591 Int_t nc = pd->sizeChannels();
594 // Loop over decay channels
595 for (Int_t ic = 0; ic < nc; ic++) {
596 Pythia8::DecayChannel& decCh = pd->channel(ic);
597 for (Int_t i = 0; i < decCh.multiplicity(); i++) {
598 br += decCh.bRatio();
605 Float_t AliDecayerPythia8::GetLifetime(Int_t kf)
607 // Return lifetime of particle
608 Pythia8::Pythia* thePythia = AliTPythia8::Instance()->Pythia8();
609 Pythia8::ParticleData& table = thePythia->particleData;
610 Float_t tau = table.tau0(kf);
614 void AliDecayerPythia8::SwitchOffHeavyFlavour()
616 // Switch off heavy flavour production
618 // Maximum number of quark flavours used in pdf
619 AliTPythia8::Instance()->ReadString("PDFinProcess:nQuarkIn = 3");
620 // Maximum number of flavors that can be used in showers
621 AliTPythia8::Instance()->ReadString("SpaceShower:nQuarkIn = 3");
622 AliTPythia8::Instance()->ReadString("TimeShower:nGammaToQuark = 3");
623 AliTPythia8::Instance()->ReadString("TimeShower:nGluonToQuark = 3");
627 void AliDecayerPythia8::ForceHadronicD(Int_t optUse4Bodies)
630 // Force golden D decay modes
633 AliTPythia8::Instance()->ReadString("313:onMode = off");
634 AliTPythia8::Instance()->ReadString("313:onIfAll = 321 211");
636 AliTPythia8::Instance()->ReadString("333:onMode = off");
637 AliTPythia8::Instance()->ReadString("333:onIfAll = 321 321");
638 // for D0 -> rho0 pi+ k-
639 AliTPythia8::Instance()->ReadString("113:onMode = off");
640 AliTPythia8::Instance()->ReadString("113:onIfAll = 211 211");
641 // for Lambda_c -> Delta++ K-
642 AliTPythia8::Instance()->ReadString("2224:onMode = off");
643 AliTPythia8::Instance()->ReadString("2224:onIfAll = 2212 211");
644 // for Lambda_c -> Lambda(1520) K-
645 AliTPythia8::Instance()->ReadString("3124:onMode = off");
646 AliTPythia8::Instance()->ReadString("3124:onIfAll = 2212 321");
649 AliTPythia8::Instance()->ReadString("411:onMode = off");
650 AliTPythia8::Instance()->ReadString("421:onMode = off");
651 AliTPythia8::Instance()->ReadString("431:onMode = off");
652 AliTPythia8::Instance()->ReadString("4112:onMode = off");
653 AliTPythia8::Instance()->ReadString("4122:onMode = off");
656 AliTPythia8::Instance()->ReadString("411:onIfMatch = 321 211 211");
658 AliTPythia8::Instance()->ReadString("411:onIfMatch = 313 211");
660 AliTPythia8::Instance()->ReadString("421:onIfMatch = 321 211");
664 AliTPythia8::Instance()->ReadString("421:onIfMatch = 321 211 211 211");
666 AliTPythia8::Instance()->ReadString("421:onIfMatch = 321 211 113");
668 AliTPythia8::Instance()->ReadString("421:onIfMatch = 313 211 211");
672 AliTPythia8::Instance()->ReadString("431:onIfMatch = 321 313");
674 AliTPythia8::Instance()->ReadString("431:onIfMatch = 333 211");
677 AliTPythia8::Instance()->ReadString("4122:onIfMatch = 2212 313");
678 // Lambda_c -> Delta K
679 AliTPythia8::Instance()->ReadString("4122:onIfMatch = 2224 321");
680 // Lambda_c -> Lambda(1520) pi
681 AliTPythia8::Instance()->ReadString("4122:onIfMatch = 3124 211");
682 // Lambda_c -> p K pi
683 AliTPythia8::Instance()->ReadString("4122:onIfMatch = 2212 321 211");
684 // Lambda_c -> Lambda pi
685 AliTPythia8::Instance()->ReadString("4122:onIfMatch = 3122 211");
689 //___________________________________________________________________________
690 void AliDecayerPythia8::ReadDecayTable()
692 //to read a decay table (not yet implemented)
696 //___________________________________________________________________________
697 void AliDecayerPythia8::AppendParticle(Int_t pdg, TLorentzVector* p)
699 // Append a particle to the stack
700 fPythia8->Pythia8()->event.append(pdg, 11, 0, 0, p->Px(), p->Py(), p->Pz(), p->E(), p->M());
704 //___________________________________________________________________________
705 void AliDecayerPythia8::ClearEvent()
707 // Clear the event stack
708 fPythia8->Pythia8()->event.clear();