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 //======================================================================
39 Revision 1.1 2001/12/04 18:06:39 morsch
40 AliGenSTRANGElib.cxx first commit.
47 #include "AliGenSTRANGElib.h"
49 ClassImp(AliGenSTRANGElib)
51 //=============================================================
53 Double_t AliGenSTRANGElib::PtScal(Double_t pt, Int_t np)
56 // Function for the calculation of the Pt distribution for a
57 // given particle np, from the pion Pt distribution using the
58 // mt scaling. This function was taken from AliGenMUONlib
59 // aliroot version 3.01, and was extended for hyperons.
60 // np = 1=>Pions 2=>Kaons 3=>Etas 4=>Omegas 5=>ETA' 6=>PHI
61 // 7=>BARYONS-BARYONBARS
62 // 8=>Lambda-antiLambda
64 // 10=>Omega-antiOmega
66 // MASS SCALING RESPECT TO PIONS
67 // MASS 1=>PI, 2=>K, 3=>ETA,4=>OMEGA,5=>ETA',6=>PHI
68 const Double_t khm[10] = {0.1396, 0.494,0.547, 0.782, 0.957, 1.02,
69 // MASS 7=>BARYON-BARYONBAR
71 // MASS 8=>Lambda-antiLambda
75 // MASS 10=>Omega-antiOmega
77 // VALUE MESON/PI AT 5 GEV
78 const Double_t kfmax[10]={1., 1., 1., 1., 1., 1., 1., 1., 1., 1.};
80 Double_t f5=TMath::Power(((sqrt(100.018215)+2.)/(sqrt(100.+khm[np]*khm[np])+2.0)),12.3);
81 Double_t kfmax2=f5/kfmax[np];
83 Double_t ptpion=100.*PtPion(&pt, (Double_t*) 0);
84 Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/
85 (sqrt(pt*pt+khm[np]*khm[np])+2.0)),12.3)/ kfmax2;
86 return fmtscal*ptpion;
88 //=============================================================
90 Double_t AliGenSTRANGElib::PtPion(Double_t *px, Double_t *)
92 // Pion transverse momentum distribtuion taken
93 // from AliGenMUONlib class, version 3.01 of aliroot
94 // PT-PARAMETERIZATION CDF, PRL 61(88) 1819
95 // POWER LAW FOR PT > 500 MEV
96 // MT SCALING BELOW (T=160 MEV)
98 const Double_t kp0 = 1.3;
99 const Double_t kxn = 8.28;
100 const Double_t kxlim=0.5;
101 const Double_t kt=0.160;
102 const Double_t kxmpi=0.139;
103 const Double_t kb=1.;
104 Double_t y, y1, kxmpi2, ynorm, a;
107 y1=TMath::Power(kp0/(kp0+kxlim),kxn);
109 ynorm=kb*(TMath::Exp(-sqrt(kxlim*kxlim+kxmpi2)/kt));
112 y=a*TMath::Power(kp0/(kp0+x),kxn);
114 y=kb*TMath::Exp(-sqrt(x*x+kxmpi2)/kt);
118 //============================================================================
120 Double_t AliGenSTRANGElib::PtKaon( Double_t *px, Double_t *)
124 //____________________________________________________________
126 return PtScal(*px,2); // 2==> Kaon in the PtScal function
129 Double_t AliGenSTRANGElib::YKaon( Double_t *py, Double_t *)
132 //____________________________________________________________
134 const Double_t ka = 1000.;
135 const Double_t kdy = 4.;
138 Double_t y=TMath::Abs(*py);
140 Double_t ex = y*y/(2*kdy*kdy);
141 return ka*TMath::Exp(-ex);
144 Int_t AliGenSTRANGElib::IpKaon(TRandom *ran)
146 // particle composition
149 Float_t random = ran->Rndm();
150 Float_t random2 = ran->Rndm();
162 return 130; // K^0 short
164 return 310; // K^0 long
169 //============================================================================
170 //============================================================================
172 Double_t AliGenSTRANGElib::PtPhi( Double_t *px, Double_t *)
176 //____________________________________________________________
178 return PtScal(*px,6); // 6==> Phi in the PtScal function
181 Double_t AliGenSTRANGElib::YPhi( Double_t *py, Double_t *)
184 //____________________________________________________________
186 const Double_t ka = 1000.;
187 const Double_t kdy = 4.;
190 Double_t y=TMath::Abs(*py);
192 Double_t ex = y*y/(2*kdy*kdy);
193 return ka*TMath::Exp(-ex);
196 Int_t AliGenSTRANGElib::IpPhi(TRandom *)
198 // particle composition
204 //===================================================================
205 //============================================================================
207 Double_t AliGenSTRANGElib::PtLambda( Double_t *px, Double_t *)
211 //____________________________________________________________
213 return PtScal(*px,8); // 8==> Lambda-antiLambda in the PtScal function
216 Double_t AliGenSTRANGElib::YLambda( Double_t *py, Double_t *)
219 //____________________________________________________________
221 const Double_t ka = 1000.;
222 const Double_t kdy = 4.;
225 Double_t y=TMath::Abs(*py);
227 Double_t ex = y*y/(2*kdy*kdy);
228 return ka*TMath::Exp(-ex);
231 Int_t AliGenSTRANGElib::IpLambda(TRandom *)
233 // particle composition
234 // generation of fixed type of particle
237 return 3122; // Lambda
240 //============================================================================
242 Double_t AliGenSTRANGElib::PtXiMinus( Double_t *px, Double_t *)
246 //____________________________________________________________
248 return PtScal(*px,9); // 9==> Xi-antiXi in the PtScal function
251 Double_t AliGenSTRANGElib::YXiMinus( Double_t *py, Double_t *)
254 //____________________________________________________________
256 const Double_t ka = 1000.;
257 const Double_t kdy = 4.;
260 Double_t y=TMath::Abs(*py);
262 Double_t ex = y*y/(2*kdy*kdy);
263 return ka*TMath::Exp(-ex);
266 Int_t AliGenSTRANGElib::IpXiMinus(TRandom *)
268 // particle composition
269 // generation of fixed type of particle
272 return 3312; // Xi- (only)
273 // return -3312; // Xi+
276 //============================================================================
278 Double_t AliGenSTRANGElib::PtOmegaMinus( Double_t *px, Double_t *)
282 //____________________________________________________________
284 return PtScal(*px,10); // 10==> Omega-antiOmega in the PtScal function
287 Double_t AliGenSTRANGElib::YOmegaMinus( Double_t *py, Double_t *)
290 //____________________________________________________________
292 const Double_t ka = 1000.;
293 const Double_t kdy = 4.;
296 Double_t y=TMath::Abs(*py);
298 Double_t ex = y*y/(2*kdy*kdy);
299 return ka*TMath::Exp(-ex);
302 Int_t AliGenSTRANGElib::IpOmegaMinus(TRandom *)
304 // particle composition
305 // generation of fixed type of particle
308 return 3334; // Omega-
311 //============================================================================
314 typedef Double_t (*GenFunc) (Double_t*, Double_t*);
315 GenFunc AliGenSTRANGElib::GetPt(Int_t param, const char* tname) const
317 // Return pinter to pT parameterisation
339 printf("<AliGenSTRANGElib::GetPt> unknown parametrisationn");
344 GenFunc AliGenSTRANGElib::GetY(Int_t param, const char* tname) const
346 // Return pointer to Y parameterisation
367 printf("<AliGenSTRANGElib::GetY> unknown parametrisationn");
371 typedef Int_t (*GenFuncIp) (TRandom *);
372 GenFuncIp AliGenSTRANGElib::GetIp(Int_t param, const char* tname) const
374 // Return pointer to particle composition
395 printf("<AliGenSTRANGElib::GetIp> unknown parametrisationn");