]>
Commit | Line | Data |
---|---|---|
88ba9030 | 1 | #include "AliGenPHOSlib.h" |
2 | #include "TF1.h" | |
3 | ||
4 | class AliGenPHOSlibPlus: public AliGenPHOSlib | |
5 | { | |
6 | ||
7 | public: | |
8 | AliGenPHOSlibPlus() | |
9 | { | |
10 | fPart=111; | |
11 | fFun=NULL; | |
12 | } | |
13 | ||
14 | AliGenPHOSlibPlus(Int_t part, TF1* ptSpect) | |
15 | { | |
16 | fPart = part; | |
17 | fFun = ptSpect; | |
18 | } | |
19 | ||
20 | GenFunc GetPt(Int_t , const char* ) const {return PtPion ;} | |
21 | GenFunc GetY (Int_t , const char* ) const {return YPion ;} | |
22 | GenFuncIp GetIp(Int_t , const char* ) const {return IpPion ;} | |
23 | ||
24 | static Double_t PtPion(const Double_t *px, const Double_t *) | |
25 | { | |
26 | // printf("PtPion: return %f of %s\n",fFun->Eval((*px)),fFun->GetName()); | |
27 | return fFun->Eval((*px)); | |
28 | } | |
29 | ||
30 | static Int_t IpPion(TRandom* ){return fPart ;} | |
31 | static Double_t YPion( const Double_t *, const Double_t *){return 1.;} | |
32 | ||
33 | public: | |
34 | ||
35 | static Int_t fPart ; | |
36 | static TF1* fFun; // pT-spectrum | |
37 | ||
38 | ClassDef(AliGenPHOSlibPlus,1) | |
39 | ||
40 | } ; | |
41 | ||
42 | Int_t AliGenPHOSlibPlus::fPart = 111 ; | |
43 | TF1* AliGenPHOSlibPlus::fFun = new TF1(); |