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 **************************************************************************/
17 //======================================================================
18 // AliGenSTRANGElib class contains parameterizations of the
19 // kaon, phi and hyperon (Lambda, Anti-Lambda, Xi, anti-Xi, Omega,
20 // anti-Omega) for the PPR study of the strange particle production.
21 // These parameterizations are used by the
23 // AliGenParam(npar, param, AliGenSTRANGElib::GetPt(param),
24 // AliGenSTRANGElib::GetY(param),
25 // AliGenSTRANGElib::GetIp(param) )
26 // param represents the particle to be simulated.
28 // Pt distributions are calculated from the transverse mass scaling
29 // with Pions, using the PtScal function taken from AliGenMUONlib
30 // version aliroot 3.01
32 // Rocco CALIANDRO. Rosa Anna FINI, Tiziano VIRGILI
33 // Rocco.Caliandro@cern.ch Rosanna.Fini@ba.infn.it,
34 // Tiziano.Virgili@roma1.infn.it
35 //======================================================================
44 #include "AliGenSTRANGElib.h"
46 ClassImp(AliGenSTRANGElib)
48 //=============================================================
50 Double_t AliGenSTRANGElib::PtScal(Double_t pt, Int_t np)
53 // Function for the calculation of the Pt distribution for a
54 // given particle np, from the pion Pt distribution using the
55 // mt scaling. This function was taken from AliGenMUONlib
56 // aliroot version 3.01, and was extended for hyperons.
57 // np = 1=>Pions 2=>Kaons 3=>Etas 4=>Omegas 5=>ETA' 6=>PHI
58 // 7=>BARYONS-BARYONBARS
59 // 8=>Lambda-antiLambda
61 // 10=>Omega-antiOmega
63 // MASS SCALING RESPECT TO PIONS
64 // MASS 1=>PI, 2=>K, 3=>ETA,4=>OMEGA,5=>ETA',6=>PHI
65 const Double_t khm[10] = {0.1396, 0.494,0.547, 0.782, 0.957, 1.02,
66 // MASS 7=>BARYON-BARYONBAR
68 // MASS 8=>Lambda-antiLambda
72 // MASS 10=>Omega-antiOmega
74 // VALUE MESON/PI AT 5 GEV
75 const Double_t kfmax[10]={1., 1., 1., 1., 1., 1., 1., 1., 1., 1.};
77 Double_t f5=TMath::Power(((sqrt(100.018215)+2.)/(sqrt(100.+khm[np]*khm[np])+2.0)),12.3);
78 Double_t kfmax2=f5/kfmax[np];
80 Double_t ptpion=100.*PtPion(&pt, (Double_t*) 0);
81 Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/
82 (sqrt(pt*pt+khm[np]*khm[np])+2.0)),12.3)/ kfmax2;
83 return fmtscal*ptpion;
85 //=============================================================
87 Double_t AliGenSTRANGElib::PtPion(Double_t *px, Double_t *)
89 // Pion transverse momentum distribtuion taken
90 // from AliGenMUONlib class, version 3.01 of aliroot
91 // PT-PARAMETERIZATION CDF, PRL 61(88) 1819
92 // POWER LAW FOR PT > 500 MEV
93 // MT SCALING BELOW (T=160 MEV)
95 const Double_t kp0 = 1.3;
96 const Double_t kxn = 8.28;
97 const Double_t kxlim=0.5;
98 const Double_t kt=0.160;
99 const Double_t kxmpi=0.139;
100 const Double_t kb=1.;
101 Double_t y, y1, kxmpi2, ynorm, a;
104 y1=TMath::Power(kp0/(kp0+kxlim),kxn);
106 ynorm=kb*(TMath::Exp(-sqrt(kxlim*kxlim+kxmpi2)/kt));
109 y=a*TMath::Power(kp0/(kp0+x),kxn);
111 y=kb*TMath::Exp(-sqrt(x*x+kxmpi2)/kt);
115 //============================================================================
117 Double_t AliGenSTRANGElib::PtKaon( Double_t *px, Double_t *)
121 //____________________________________________________________
123 return PtScal(*px,2); // 2==> Kaon in the PtScal function
126 Double_t AliGenSTRANGElib::YKaon( Double_t *py, Double_t *)
129 //____________________________________________________________
131 const Double_t ka = 1000.;
132 const Double_t kdy = 4.;
135 Double_t y=TMath::Abs(*py);
137 Double_t ex = y*y/(2*kdy*kdy);
138 return ka*TMath::Exp(-ex);
141 Int_t AliGenSTRANGElib::IpKaon(TRandom *ran)
143 // particle composition
146 Float_t random = ran->Rndm();
147 Float_t random2 = ran->Rndm();
159 return 130; // K^0 short
161 return 310; // K^0 long
166 //============================================================================
167 //============================================================================
169 Double_t AliGenSTRANGElib::PtPhi( Double_t *px, Double_t *)
173 //____________________________________________________________
175 return PtScal(*px,6); // 6==> Phi in the PtScal function
178 Double_t AliGenSTRANGElib::YPhi( Double_t *py, Double_t *)
181 //____________________________________________________________
183 const Double_t ka = 1000.;
184 const Double_t kdy = 4.;
187 Double_t y=TMath::Abs(*py);
189 Double_t ex = y*y/(2*kdy*kdy);
190 return ka*TMath::Exp(-ex);
193 Int_t AliGenSTRANGElib::IpPhi(TRandom *)
195 // particle composition
201 //===================================================================
202 //============================================================================
204 Double_t AliGenSTRANGElib::PtLambda( Double_t *px, Double_t *)
208 //____________________________________________________________
210 return PtScal(*px,8); // 8==> Lambda-antiLambda in the PtScal function
213 Double_t AliGenSTRANGElib::YLambda( Double_t *py, Double_t *)
216 //____________________________________________________________
218 const Double_t ka = 1000.;
219 const Double_t kdy = 4.;
222 Double_t y=TMath::Abs(*py);
224 Double_t ex = y*y/(2*kdy*kdy);
225 return ka*TMath::Exp(-ex);
228 Int_t AliGenSTRANGElib::IpLambda(TRandom *)
230 // particle composition
231 // generation of fixed type of particle
234 return 3122; // Lambda
237 //============================================================================
239 Double_t AliGenSTRANGElib::PtXiMinus( Double_t *px, Double_t *)
243 //____________________________________________________________
245 return PtScal(*px,9); // 9==> Xi-antiXi in the PtScal function
248 Double_t AliGenSTRANGElib::YXiMinus( Double_t *py, Double_t *)
251 //____________________________________________________________
253 const Double_t ka = 1000.;
254 const Double_t kdy = 4.;
257 Double_t y=TMath::Abs(*py);
259 Double_t ex = y*y/(2*kdy*kdy);
260 return ka*TMath::Exp(-ex);
263 Int_t AliGenSTRANGElib::IpXiMinus(TRandom *)
265 // particle composition
266 // generation of fixed type of particle
269 return 3312; // Xi- (only)
270 // return -3312; // Xi+
273 //============================================================================
275 Double_t AliGenSTRANGElib::PtOmegaMinus( Double_t *px, Double_t *)
279 //____________________________________________________________
281 return PtScal(*px,10); // 10==> Omega-antiOmega in the PtScal function
284 Double_t AliGenSTRANGElib::YOmegaMinus( Double_t *py, Double_t *)
287 //____________________________________________________________
289 const Double_t ka = 1000.;
290 const Double_t kdy = 4.;
293 Double_t y=TMath::Abs(*py);
295 Double_t ex = y*y/(2*kdy*kdy);
296 return ka*TMath::Exp(-ex);
299 Int_t AliGenSTRANGElib::IpOmegaMinus(TRandom *)
301 // particle composition
302 // generation of fixed type of particle
305 return 3334; // Omega-
308 //============================================================================
311 typedef Double_t (*GenFunc) (Double_t*, Double_t*);
312 GenFunc AliGenSTRANGElib::GetPt(Int_t param, const char* tname)
314 // Return pinter to pT parameterisation
336 printf("<AliGenSTRANGElib::GetPt> unknown parametrisationn");
341 GenFunc AliGenSTRANGElib::GetY(Int_t param, const char* tname)
343 // Return pointer to Y parameterisation
364 printf("<AliGenSTRANGElib::GetY> unknown parametrisationn");
368 typedef Int_t (*GenFuncIp) (TRandom *);
369 GenFuncIp AliGenSTRANGElib::GetIp(Int_t param, const char* tname)
371 // Return pointer to particle composition
392 printf("<AliGenSTRANGElib::GetIp> unknown parametrisationn");