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 // Library class for particle pt and y distributions used for
18 // LambdaC simulations.
19 // To be used with AliGenParam.
21 // Author: Annalisa Mastroserio <Annalisa.Mastroserio@cern.ch>
29 #include "AliGenLcLib.h"
35 //---------------------------------------------
37 //---------------------------------------------
38 Int_t AliGenLcLib::IpLcPlus(TRandom *)
44 Int_t AliGenLcLib::IpLcMinus(TRandom *)
50 Double_t AliGenLcLib::PtLcFlat( const Double_t *, const Double_t *)
52 // FLAT pt-distribution
56 Double_t AliGenLcLib::PtLcExp( const Double_t *x, const Double_t *)
59 //return x[0]*TMath::Exp(-x[0]/0.16); // distribution used in LHC11f1 for the anchor runs : 139441, 139510, 139511, 130513, 130514, 130517.
60 return TMath::GammaDist(x[0],2,0,1.7); //distribution as in LHC11a10a of the prompt Lc whose daughters are in |eta|<0.9. Used for Lb as well.
63 Double_t AliGenLcLib::YLcFlat(const Double_t *,const Double_t *)
65 //LambdaC y-distribution
71 typedef Double_t (*GenFunc) (const Double_t*, const Double_t*);
72 typedef Int_t (*GenFuncIp) (TRandom *);
74 GenFunc AliGenLcLib::GetPt(Int_t iPID, const char * sForm) const
76 // Return pointer to Pt parameterisation
77 printf("PID: %i, form: %s \n",iPID,sForm);
84 if (type=="FLAT") {func=PtLcFlat; break;}
85 else if(type=="EXP") {func=PtLcExp; break;}
87 AliFatal(Form("Unknown Pt distribution form: %s",sForm)); func=0;
91 if (type=="FLAT") {func=PtLcFlat; break;}
92 else if(type=="EXP") {func=PtLcExp; break;}
94 AliFatal(Form("Unknown Pt distribution form: %s",sForm)); func=0;
97 default : AliFatal(Form("Unknown particle type: %i",iPID)); func=0;
103 GenFunc AliGenLcLib::GetY(Int_t iPID, const char *sForm) const
105 AliDebug(1,Form("PID: %i, form: %s",iPID,sForm));
109 case kLcPlus: func=YLcFlat; break;
110 case kLcMinus: func=YLcFlat; break;
112 default : AliFatal(Form("Unknown particle type: %i",iPID)); func=0; break;
118 GenFuncIp AliGenLcLib::GetIp(Int_t iPID, const char *sForm) const
120 // Return pointer to particle type parameterisation
121 AliDebug(1,Form("PID: %i, form: %s",iPID,sForm)); //////////
125 case kLcPlus: return IpLcPlus;
126 case kLcMinus: return IpLcMinus;
128 default : AliFatal(Form("Unknown particle type: %i",iPID)); return 0;