7 # define lu1ent lu1ent_
10 # define lu1ent LU1ENT
11 # define type_of_call _stdcall
14 extern "C" void type_of_call
15 lu1ent(Int_t&, Int_t&, Float_t&, Float_t&, Float_t&);
19 //_____________________________________________________________________________
21 Int_t AliPythia::fgInit=0;
23 AliPythia::AliPythia()
25 for (Int_t i=0; i<501; i++) {
31 void AliPythia::Lu1Ent(Int_t flag, Int_t idpart,
32 Float_t mom, Float_t theta,Float_t phi)
34 printf("%d %d %f %f %f\n",flag, idpart, mom, theta, phi);
35 lu1ent(flag, idpart, mom, theta, phi);
38 void AliPythia::DecayParticle(Int_t idpart,
39 Float_t mom, Float_t theta,Float_t phi)
41 Lu1Ent(0, idpart, mom, theta, phi);
45 void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfunc)
49 fStrucFunc = strucfunc;
51 SetMDCY(LuComp(111),1,0);
52 // select structure function
54 SetMSTP(51,strucfunc);
56 // Pythia initialisation for selected processes//
60 for (Int_t i=1; i<= 200; i++) {
63 // select charm production
107 case beauty_unforced:
117 // Minimum Bias pp-Collisions
119 // Tuning of parameters descibed in G. Ciapetti and A. Di Ciaccio
120 // Proc. of the LHC Workshop, Aachen 1990, Vol. II p. 155
122 // select Pythia min. bias model
128 // Multiple interactions switched on
131 // Low-pT cut-off for hard scattering
133 // model for subsequent non-hardest interaction
134 // 90% gg->gg 10% gg->qq
136 // 90% of gluon interactions have minimum string length
141 Initialize("CMS","p","p",fEcms);
144 Int_t AliPythia::CountProducts(Int_t channel, Int_t particle)
147 for (Int_t i=1; i<=5; i++) {
148 if (TMath::Abs(GetKFDP(channel,i)) == particle) np++;
153 void AliPythia::AllowAllDecays()
156 for (i=1; i<= 2000; i++) {
160 for (i=0; i<501; i++){
165 void AliPythia::ForceParticleDecay(Int_t particle, Int_t product, Int_t mult)
168 // force decay of particle into products with multiplicity mult
170 Int_t kc=LuComp(particle);
172 Int_t ifirst=GetMDCY(kc,2);
173 Int_t ilast=ifirst+GetMDCY(kc,3)-1;
176 // Loop over decay channels
177 for (Int_t channel=ifirst; channel<=ilast;channel++) {
178 if (CountProducts(channel,product) >= mult) {
179 SetMDME(channel,1,1);
181 SetMDME(channel,1,0);
182 fBraPart[kc]-=GetBRAT(channel);
187 void AliPythia::ForceDecay(Decay_t decay)
199 if (fProcess==charm || fProcess == charm_unforced) {
200 ForceParticleDecay( 411,13,1); // D+/-
201 ForceParticleDecay( 421,13,1); // D0
202 ForceParticleDecay( 431,13,1); // D_s
203 ForceParticleDecay( 4122,13,1); // Lambda_c
205 if (fProcess==beauty || fProcess == beauty_unforced) {
206 ForceParticleDecay( 511,13,1); // B0
207 ForceParticleDecay( 521,13,1); // B+/-
208 ForceParticleDecay( 531,13,1); // B_s
209 ForceParticleDecay( 5122,13,1); // Lambda_b
213 ForceParticleDecay( 41,13,2); // phi
214 ForceParticleDecay( 443,13,2); // J/Psi
215 ForceParticleDecay(30443,13,2); // Psi'
216 ForceParticleDecay( 553,13,2); // Upsilon
217 ForceParticleDecay(30553,13,2); // Upsilon'
221 ForceParticleDecay( 411,11,1); // D+/-
222 ForceParticleDecay( 421,11,1); // D0
223 ForceParticleDecay( 431,11,1); // D_s
224 ForceParticleDecay( 4122,11,1); // Lambda_c
226 ForceParticleDecay( 511,11,1); // B0
227 ForceParticleDecay( 521,11,1); // B+/-
228 ForceParticleDecay( 531,11,1); // B_s
229 ForceParticleDecay( 5122,11,1); // Lambda_b
233 ForceParticleDecay( 41,11,2); // phi
234 ForceParticleDecay( 443,11,2); // J/Psi
235 ForceParticleDecay(30443,11,2); // Psi'
236 ForceParticleDecay( 553,11,2); // Upsilon
237 ForceParticleDecay(30553,11,2); // Upsilon'
240 ForceParticleDecay( 511,443,1); // B0
241 ForceParticleDecay( 521,443,1); // B+/-
242 ForceParticleDecay( 531,443,1); // B_s
243 ForceParticleDecay( 5122,443,1); // Lambda_b
244 ForceParticleDecay( 443,13,2); // J/Psi
247 ForceParticleDecay( 511,30443,1); // B0
248 ForceParticleDecay( 521,30443,1); // B+/-
249 ForceParticleDecay( 531,30443,1); // B_s
250 ForceParticleDecay( 5122,30443,1); // Lambda_b
251 ForceParticleDecay(30443,13,2); // Psi'
253 case b_jpsi_dielectron:
254 ForceParticleDecay( 511,443,1); // B0
255 ForceParticleDecay( 521,443,1); // B+/-
256 ForceParticleDecay( 531,443,1); // B_s
257 ForceParticleDecay( 5122,443,1); // Lambda_b
258 ForceParticleDecay( 443,11,2); // J/Psi
260 case b_psip_dielectron:
261 ForceParticleDecay( 511,30443,1); // B0
262 ForceParticleDecay( 521,30443,1); // B+/-
263 ForceParticleDecay( 531,30443,1); // B_s
264 ForceParticleDecay( 5122,30443,1); // Lambda_b
265 ForceParticleDecay(30443,11,2); // Psi'
268 ForceParticleDecay(211,13,1); // pi->mu
271 ForceParticleDecay(321,13,1); // K->mu
277 void AliPythia::DefineParticles()
281 AliMC *pMC=AliMC::GetMC();
288 // Some particles cloned for rare decays
290 // phi-> mu+mu- and phi -> e+e-
291 // clone the original phi
296 SetKCHG(nkc,i,GetKCHG(kc,i));
300 SetPMAS(nkc,i,GetPMAS(kc,i));
302 SetCHAF(nkc,GetCHAF(kc));
313 SetBRAT(993,2.99e-4);
332 // phi clone for dilepton decay-channel
336 pMC->Gspart(113,"Phi",3,mass,0,tlife);
343 pMC->Gspart(114,"J/Psi",3,mass,0,tlife);
350 pMC->Gspart(115,"Psi'",3,mass,0,tlife);
357 pMC->Gspart(116,"Upsilon",3,mass,0,tlife);
364 pMC->Gspart(117,"Upsilon'",3,mass,0,tlife);
371 pMC->Gspart(118,"Upsilon''",3,mass,0,tlife);
381 pMC->Gspart(119,"D^+",3,mass, 1,tlife);
382 pMC->Gspart(120,"D^-",3,mass,-1,tlife);
389 pMC->Gspart(121,"D^0",3,mass,0,tlife);
390 pMC->Gspart(122,"D^0bar",3,mass,0,tlife);
397 pMC->Gspart(123,"D_s^+",3,mass, 1,tlife);
398 pMC->Gspart(124,"D_s^-",3,mass,-1,tlife);
405 pMC->Gspart(125,"Lambda_c+",3,mass, 1,tlife);
406 pMC->Gspart(126,"Lambda_c-",3,mass,-1,tlife);
415 pMC->Gspart(127,"B^0",3,mass, 0,tlife);
416 pMC->Gspart(128,"B^0bar",3,mass, 0,tlife);
423 pMC->Gspart(129,"B^+",3,mass, 1,tlife);
424 pMC->Gspart(130,"B^-",3,mass,-1,tlife);
431 pMC->Gspart(131,"B_s",3,mass, 0,tlife);
432 pMC->Gspart(132,"B_s^bar",3,mass,0,tlife);
439 pMC->Gspart(133,"Lambda_b",3,mass, 0,tlife);
440 pMC->Gspart(134,"Lambda_b^bar",3,mass,0,tlife);
444 // set up correspondance between standard GEANT particle codes
447 kc=LuComp(22); // gamma
451 kc=LuComp(11); // positron
455 kc=LuComp(12); // neutrino
459 kc=LuComp(13); // muon
463 kc=LuComp(111); // pi0
467 kc=LuComp(211); // pi+
471 kc=LuComp(130); // K0 short
475 kc=LuComp(321); // K+/-
479 kc=LuComp(2112); // neutron/anti-neutron
483 kc=LuComp(2212); // proton/anti-proton
487 kc=LuComp(310); // K0 short
491 kc=LuComp(221); // eta
495 kc=LuComp(3122); // lambda
499 kc=LuComp(3222); // sigma+/antisigma+
503 kc=LuComp(3212); // sigma0/antisigma0
507 kc=LuComp(3112); // sigma-/antisigma-
511 kc=LuComp(3322); // xsi0-/antixsi0
515 kc=LuComp(3312); // xsi-/antixsi+
519 kc=LuComp(3334); // omega/antiomega
526 Int_t AliPythia::GetGeantCode(Int_t kf)
528 Int_t kc=LuComp(TMath::Abs(kf));
529 return (kf > 0) ? fGPCode[kc][0] : fGPCode[kc][1];
532 Float_t AliPythia::GetBraPart(Int_t kf)
534 Int_t kc=LuComp(TMath::Abs(kf));