6 # define lu1ent lu1ent_
10 # define type_of_call _stdcall
13 extern "C" void type_of_call
14 lu1ent(Int_t&, Int_t&, Float_t&, Float_t&, Float_t&);
18 //_____________________________________________________________________________
20 Int_t AliPythia::fgInit=0;
22 void AliPythia::Lu1Ent(Int_t flag, Int_t idpart,
23 Float_t mom, Float_t theta,Float_t phi)
25 printf("%d %d %f %f %f\n",flag, idpart, mom, theta, phi);
26 lu1ent(flag, idpart, mom, theta, phi);
29 void AliPythia::DecayParticle(Int_t idpart,
30 Float_t mom, Float_t theta,Float_t phi)
32 Lu1Ent(0, idpart, mom, theta, phi);
36 void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfunc)
40 fStrucFunc = strucfunc;
42 SetMDCY(LuComp(111),1,0);
43 // select structure function
45 SetMSTP(51,strucfunc);
47 // Pythia initialisation for selected processes//
51 for (Int_t i=1; i<= 200; i++) {
54 // select charm production
110 Initialize("CMS","p","p",fEcms);
113 Int_t AliPythia::CountProducts(Int_t channel, Int_t particle)
116 for (Int_t i=1; i<=5; i++) {
117 if (TMath::Abs(GetKFDP(channel,i)) == particle) np++;
122 void AliPythia::AllowAllDecays()
125 for (i=1; i<= 2000; i++) {
129 for (i=0; i<501; i++){
134 void AliPythia::ForceParticleDecay(Int_t particle, Int_t product, Int_t mult)
137 // force decay of particle into products with multiplicity mult
138 Int_t kc=LuComp(particle);
139 Int_t ifirst=GetMDCY(kc,2);
140 Int_t ilast=ifirst+GetMDCY(kc,3)-1;
143 // Loop over decay channels
144 for (Int_t channel=ifirst; channel<=ilast;channel++) {
145 if (CountProducts(channel,product) >= mult) {
146 SetMDME(channel,1,1);
148 SetMDME(channel,1,0);
149 fBraPart[kc]-=GetBRAT(channel);
154 void AliPythia::ForceDecay(Decay_t decay)
166 ForceParticleDecay( 411,13,1); // D+/-
167 ForceParticleDecay( 421,13,1); // D0
168 ForceParticleDecay( 431,13,1); // D_s
169 ForceParticleDecay( 4122,13,1); // Lambda_c
171 ForceParticleDecay( 511,13,1); // B0
172 ForceParticleDecay( 521,13,1); // B+/-
173 ForceParticleDecay( 531,13,1); // B_s
174 ForceParticleDecay( 5122,13,1); // Lambda_b
177 ForceParticleDecay( 41,13,2); // phi
178 ForceParticleDecay( 443,13,2); // J/Psi
179 ForceParticleDecay(30443,13,2); // Psi'
180 ForceParticleDecay( 553,13,2); // Upsilon
181 ForceParticleDecay(30553,13,2); // Upsilon'
185 ForceParticleDecay( 411,11,1); // D+/-
186 ForceParticleDecay( 421,11,1); // D0
187 ForceParticleDecay( 431,11,1); // D_s
188 ForceParticleDecay( 4122,11,1); // Lambda_c
190 ForceParticleDecay( 511,11,1); // B0
191 ForceParticleDecay( 521,11,1); // B+/-
192 ForceParticleDecay( 531,11,1); // B_s
193 ForceParticleDecay( 5122,11,1); // Lambda_b
197 ForceParticleDecay( 41,11,2); // phi
198 ForceParticleDecay( 443,11,2); // J/Psi
199 ForceParticleDecay(30443,11,2); // Psi'
200 ForceParticleDecay( 553,11,2); // Upsilon
201 ForceParticleDecay(30553,11,2); // Upsilon'
204 ForceParticleDecay( 511,443,1); // B0
205 ForceParticleDecay( 521,443,1); // B+/-
206 ForceParticleDecay( 531,443,1); // B_s
207 ForceParticleDecay( 5122,443,1); // Lambda_b
208 ForceParticleDecay( 443,13,2); // J/Psi
211 ForceParticleDecay( 511,30443,1); // B0
212 ForceParticleDecay( 521,30443,1); // B+/-
213 ForceParticleDecay( 531,30443,1); // B_s
214 ForceParticleDecay( 5122,30443,1); // Lambda_b
215 ForceParticleDecay(30443,13,2); // Psi'
217 case b_jpsi_dielectron:
218 ForceParticleDecay( 511,443,1); // B0
219 ForceParticleDecay( 521,443,1); // B+/-
220 ForceParticleDecay( 531,443,1); // B_s
221 ForceParticleDecay( 5122,443,1); // Lambda_b
222 ForceParticleDecay( 443,11,2); // J/Psi
224 case b_psip_dielectron:
225 ForceParticleDecay( 511,30443,1); // B0
226 ForceParticleDecay( 521,30443,1); // B+/-
227 ForceParticleDecay( 531,30443,1); // B_s
228 ForceParticleDecay( 5122,30443,1); // Lambda_b
229 ForceParticleDecay(30443,11,2); // Psi'
235 void AliPythia::DefineParticles()
239 AliMC *pMC=AliMC::GetMC();
246 // Some particles cloned for rare decays
248 // phi-> mu+mu- and phi -> e+e-
249 // clone the original phi
254 SetKCHG(nkc,i,GetKCHG(kc,i));
258 SetPMAS(nkc,i,GetPMAS(kc,i));
260 SetCHAF(nkc,GetCHAF(kc));
271 SetBRAT(993,2.99e-4);
290 // phi clone for dileptin decay-channel
294 pMC->Gspart(113,"Phi",3,mass,0,tlife);
301 pMC->Gspart(114,"J/Psi",3,mass,0,tlife);
308 pMC->Gspart(115,"Psi'",3,mass,0,tlife);
315 pMC->Gspart(116,"Upsilon",3,mass,0,tlife);
322 pMC->Gspart(117,"Upsilon'",3,mass,0,tlife);
329 pMC->Gspart(118,"Upsilon''",3,mass,0,tlife);
339 pMC->Gspart(119,"D^+",3,mass, 1,tlife);
340 pMC->Gspart(120,"D^-",3,mass,-1,tlife);
347 pMC->Gspart(121,"D^0",3,mass,0,tlife);
348 pMC->Gspart(122,"D^0bar",3,mass,0,tlife);
355 pMC->Gspart(123,"D_s^+",3,mass, 1,tlife);
356 pMC->Gspart(124,"D_s^-",3,mass,-1,tlife);
363 pMC->Gspart(125,"Lambda_c+",3,mass, 1,tlife);
364 pMC->Gspart(126,"Lambda_c-",3,mass,-1,tlife);
373 pMC->Gspart(127,"B^0",3,mass, 0,tlife);
374 pMC->Gspart(128,"B^0bar",3,mass, 0,tlife);
381 pMC->Gspart(129,"B^+",3,mass, 1,tlife);
382 pMC->Gspart(130,"B^-",3,mass,-1,tlife);
389 pMC->Gspart(131,"B_s",3,mass, 0,tlife);
390 pMC->Gspart(132,"B_s^bar",3,mass,0,tlife);
397 pMC->Gspart(133,"Lambda_b",3,mass, 0,tlife);
398 pMC->Gspart(134,"Lambda_b^bar",3,mass,0,tlife);
402 // set up correspondance between standard GEANT particle codes
405 kc=LuComp(22); // gamma
409 kc=LuComp(11); // positron
413 kc=LuComp(12); // neutrino
417 kc=LuComp(13); // muon
421 kc=LuComp(111); // pi0
425 kc=LuComp(211); // pi+
429 kc=LuComp(130); // K0 short
433 kc=LuComp(321); // K+/-
437 kc=LuComp(2112); // neutron/anti-neutron
441 kc=LuComp(2212); // proton/anti-proton
445 kc=LuComp(310); // K0 short
449 kc=LuComp(221); // eta
453 kc=LuComp(3122); // lambda
457 kc=LuComp(3222); // sigma+/antisigma+
461 kc=LuComp(3212); // sigma0/antisigma0
465 kc=LuComp(3112); // sigma-/antisigma-
469 kc=LuComp(3322); // xsi0-/antixsi0
473 kc=LuComp(3312); // xsi-/antixsi+
477 kc=LuComp(3334); // omega/antiomega
484 Int_t AliPythia::GetGeantCode(Int_t kf)
486 Int_t kc=LuComp(TMath::Abs(kf));
487 return (kf > 0) ? fGPCode[kc][0] : fGPCode[kc][1];
490 Float_t AliPythia::GetBraPart(Int_t kf)
492 Int_t kc=LuComp(TMath::Abs(kf));