]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIGENPARAM_H | |
2 | #define ALIGENPARAM_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | // | |
9 | // Class to generate particles from using parametrized pT and y distributions. | |
10 | // Distributions are obtained from pointer to object of type AliGenLib. | |
11 | // (For example AliGenMUONlib) | |
12 | // | |
13 | // andreas.morsch@cern.ch | |
14 | // | |
15 | ||
16 | #include "AliGenMC.h" | |
17 | ||
18 | class AliPythia; | |
19 | class TParticle; | |
20 | class AliGenLib; | |
21 | class TF1; | |
22 | ||
23 | typedef enum { kAnalog, kNonAnalog} Weighting_t; | |
24 | //------------------------------------------------------------- | |
25 | class AliGenParam : public AliGenMC | |
26 | { | |
27 | public: | |
28 | AliGenParam(); | |
29 | AliGenParam(Int_t npart, AliGenLib * Library, Int_t param, char* tname = 0); | |
30 | AliGenParam(Int_t npart, Int_t param, const char* tname = 0, const char* name = 0); | |
31 | AliGenParam(Int_t npart, Int_t param, | |
32 | Double_t (*PtPara)(Double_t*, Double_t*), | |
33 | Double_t (*YPara )(Double_t*, Double_t*), | |
34 | Int_t (*IpPara)(TRandom*) ); | |
35 | ||
36 | virtual ~AliGenParam(); | |
37 | virtual void Generate(); | |
38 | virtual void Init(); | |
39 | // select particle type | |
40 | virtual void SetParam(Int_t param) {fParam = param;} | |
41 | // force decay type | |
42 | virtual void SetWeighting(Weighting_t flag = kAnalog) {fAnalog = flag;} | |
43 | virtual void SetDeltaPt(Float_t delta=0.01) {fDeltaPt = delta;} | |
44 | virtual void SetDecayer(AliDecayer* decayer) {fDecayer = decayer;} | |
45 | virtual void Draw(const char * opt); | |
46 | TF1 * GetPt() { return fPtPara;} | |
47 | TF1 * GetY() {return fYPara;} | |
48 | Float_t GetRelativeArea(Float_t ptMin, Float_t ptMax, Float_t yMin, Float_t yMax, Float_t phiMin, Float_t phiMax); | |
49 | ||
50 | protected: | |
51 | Double_t (*fPtParaFunc)(Double_t*, Double_t*); //! Pointer to Pt parametrisation function | |
52 | Double_t (*fYParaFunc )(Double_t*, Double_t*); //! Pointer to Y parametrisation function | |
53 | Int_t (*fIpParaFunc )(TRandom*); //! Pointer to particle type parametrisation function | |
54 | TF1* fPtPara; // Transverse momentum parameterisation | |
55 | TF1* fYPara; // Rapidity parameterisation | |
56 | Int_t fParam; // Parameterisation type | |
57 | Float_t fdNdy0; // central multiplicity per event | |
58 | Float_t fYWgt; // Y-weight | |
59 | Float_t fPtWgt; // Pt-weight | |
60 | Float_t fBias; // Biasing factor | |
61 | Int_t fTrials; // Number of trials | |
62 | Float_t fDeltaPt; // pT sampling in steps of fDeltaPt | |
63 | AliDecayer *fDecayer; // ! Pointer to pythia object for decays | |
64 | ||
65 | private: | |
66 | AliGenParam(const AliGenParam &Param); | |
67 | AliGenParam & operator=(const AliGenParam & rhs); | |
68 | ||
69 | ClassDef(AliGenParam,1) // Generator using parameterised pt- and y-distribution | |
70 | }; | |
71 | #endif | |
72 | ||
73 | ||
74 | ||
75 | ||
76 | ||
77 | ||
78 | ||
79 | ||
80 | ||
81 |