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 //======================================================================
42 #include "AliGenSTRANGElib.h"
44 ClassImp(AliGenSTRANGElib)
46 //=============================================================
48 Double_t AliGenSTRANGElib::PtScal(Double_t pt, Int_t np)
51 // Function for the calculation of the Pt distribution for a
52 // given particle np, from the pion Pt distribution using the
53 // mt scaling. This function was taken from AliGenMUONlib
54 // aliroot version 3.01, and was extended for hyperons.
55 // np = 1=>Pions 2=>Kaons 3=>Etas 4=>Omegas 5=>ETA' 6=>PHI
56 // 7=>BARYONS-BARYONBARS
57 // 8=>Lambda-antiLambda
59 // 10=>Omega-antiOmega
61 // MASS SCALING RESPECT TO PIONS
62 // MASS 1=>PI, 2=>K, 3=>ETA,4=>OMEGA,5=>ETA',6=>PHI
63 const Double_t khm[10] = {0.1396, 0.494,0.547, 0.782, 0.957, 1.02,
64 // MASS 7=>BARYON-BARYONBAR
66 // MASS 8=>Lambda-antiLambda
70 // MASS 10=>Omega-antiOmega
72 // VALUE MESON/PI AT 5 GEV
73 const Double_t kfmax[10]={1., 1., 1., 1., 1., 1., 1., 1., 1., 1.};
75 Double_t f5=TMath::Power(((sqrt(100.018215)+2.)/(sqrt(100.+khm[np]*khm[np])+2.0)),12.3);
76 Double_t kfmax2=f5/kfmax[np];
78 Double_t ptpion=100.*PtPion(&pt, (Double_t*) 0);
79 Double_t fmtscal=TMath::Power(((sqrt(pt*pt+0.018215)+2.)/
80 (sqrt(pt*pt+khm[np]*khm[np])+2.0)),12.3)/ kfmax2;
81 return fmtscal*ptpion;
83 //=============================================================
85 Double_t AliGenSTRANGElib::PtPion(Double_t *px, Double_t *)
87 // Pion transverse momentum distribtuion taken
88 // from AliGenMUONlib class, version 3.01 of aliroot
89 // PT-PARAMETERIZATION CDF, PRL 61(88) 1819
90 // POWER LAW FOR PT > 500 MEV
91 // MT SCALING BELOW (T=160 MEV)
93 const Double_t kp0 = 1.3;
94 const Double_t kxn = 8.28;
95 const Double_t kxlim=0.5;
96 const Double_t kt=0.160;
97 const Double_t kxmpi=0.139;
99 Double_t y, y1, kxmpi2, ynorm, a;
102 y1=TMath::Power(kp0/(kp0+kxlim),kxn);
104 ynorm=kb*(TMath::Exp(-sqrt(kxlim*kxlim+kxmpi2)/kt));
107 y=a*TMath::Power(kp0/(kp0+x),kxn);
109 y=kb*TMath::Exp(-sqrt(x*x+kxmpi2)/kt);
113 //============================================================================
115 Double_t AliGenSTRANGElib::PtKaon( Double_t *px, Double_t *)
119 //____________________________________________________________
121 return PtScal(*px,2); // 2==> Kaon in the PtScal function
124 Double_t AliGenSTRANGElib::YKaon( Double_t *py, Double_t *)
127 //____________________________________________________________
129 const Double_t ka = 1000.;
130 const Double_t kdy = 4.;
133 Double_t y=TMath::Abs(*py);
135 Double_t ex = y*y/(2*kdy*kdy);
136 return ka*TMath::Exp(-ex);
139 Int_t AliGenSTRANGElib::IpKaon(TRandom *ran)
141 // particle composition
144 Float_t random = ran->Rndm();
145 Float_t random2 = ran->Rndm();
157 return 130; // K^0 short
159 return 310; // K^0 long
164 //============================================================================
165 //============================================================================
167 Double_t AliGenSTRANGElib::PtPhi( Double_t *px, Double_t *)
171 //____________________________________________________________
173 return PtScal(*px,6); // 6==> Phi in the PtScal function
176 Double_t AliGenSTRANGElib::YPhi( Double_t *py, Double_t *)
179 //____________________________________________________________
181 const Double_t ka = 1000.;
182 const Double_t kdy = 4.;
185 Double_t y=TMath::Abs(*py);
187 Double_t ex = y*y/(2*kdy*kdy);
188 return ka*TMath::Exp(-ex);
191 Int_t AliGenSTRANGElib::IpPhi(TRandom *)
193 // particle composition
199 //===================================================================
200 //============================================================================
202 Double_t AliGenSTRANGElib::PtLambda( Double_t *px, Double_t *)
206 //____________________________________________________________
208 return PtScal(*px,8); // 8==> Lambda-antiLambda in the PtScal function
211 Double_t AliGenSTRANGElib::YLambda( Double_t *py, Double_t *)
214 //____________________________________________________________
216 const Double_t ka = 1000.;
217 const Double_t kdy = 4.;
220 Double_t y=TMath::Abs(*py);
222 Double_t ex = y*y/(2*kdy*kdy);
223 return ka*TMath::Exp(-ex);
226 Int_t AliGenSTRANGElib::IpLambda(TRandom *ran)
228 // particle composition
229 // generation of fixed type of particle
231 Float_t random = ran->Rndm();
233 return 3122; // Lambda
235 return -3122; // Anti-Lambda
239 //============================================================================
241 Double_t AliGenSTRANGElib::PtXiMinus( Double_t *px, Double_t *)
245 //____________________________________________________________
247 return PtScal(*px,9); // 9==> Xi-antiXi in the PtScal function
250 Double_t AliGenSTRANGElib::YXiMinus( Double_t *py, Double_t *)
253 //____________________________________________________________
255 const Double_t ka = 1000.;
256 const Double_t kdy = 4.;
259 Double_t y=TMath::Abs(*py);
261 Double_t ex = y*y/(2*kdy*kdy);
262 return ka*TMath::Exp(-ex);
265 Int_t AliGenSTRANGElib::IpXiMinus(TRandom *ran)
267 // particle composition
268 // generation of fixed type of particle
270 Float_t random = ran->Rndm();
278 //============================================================================
280 Double_t AliGenSTRANGElib::PtOmegaMinus( Double_t *px, Double_t *)
284 //____________________________________________________________
286 return PtScal(*px,10); // 10==> Omega-antiOmega in the PtScal function
289 Double_t AliGenSTRANGElib::YOmegaMinus( Double_t *py, Double_t *)
292 //____________________________________________________________
294 const Double_t ka = 1000.;
295 const Double_t kdy = 4.;
298 Double_t y=TMath::Abs(*py);
300 Double_t ex = y*y/(2*kdy*kdy);
301 return ka*TMath::Exp(-ex);
304 Int_t AliGenSTRANGElib::IpOmegaMinus(TRandom * ran)
306 // particle composition
307 // generation of fixed type of particle
310 Float_t random = ran->Rndm();
312 return 3334; // Omega-
314 return -3334; // Omega+
318 //============================================================================
321 typedef Double_t (*GenFunc) (Double_t*, Double_t*);
322 GenFunc AliGenSTRANGElib::GetPt(Int_t param, const char* /*tname*/) const
324 // Return pinter to pT parameterisation
346 printf("<AliGenSTRANGElib::GetPt> unknown parametrisationn");
351 GenFunc AliGenSTRANGElib::GetY(Int_t param, const char* /*tname*/) const
353 // Return pointer to Y parameterisation
374 printf("<AliGenSTRANGElib::GetY> unknown parametrisationn");
378 typedef Int_t (*GenFuncIp) (TRandom *);
379 GenFuncIp AliGenSTRANGElib::GetIp(Int_t param, const char* /*tname*/) const
381 // Return pointer to particle composition
402 printf("<AliGenSTRANGElib::GetIp> unknown parametrisationn");