7816887f |
1 | #ifndef ALIGENGEVSIM_H |
2 | #define ALIGENGEVSIM_H |
3 | |
4966b266 |
4 | //////////////////////////////////////////////////////////////////////////////// |
5 | // |
7e4131fc |
6 | // AliGenGeVSim is a class implementing GeVSim event generator. |
7 | // |
8 | // GeVSim is a simple Monte-Carlo event generator for testing detector and |
9 | // algorythm performance especialy concerning flow and event-by-event studies |
4966b266 |
10 | // |
11 | // In this event generator particles are generated from thermal distributions |
12 | // without any dynamics and addicional constrains. Distribution parameters like |
13 | // multiplicity, particle type yields, inverse slope parameters, flow coeficients |
14 | // and expansion velocities are expleicite defined by the user. |
15 | // |
16 | // GeVSim contains four thermal distributions the same as |
17 | // MevSim event generator developed for STAR experiment. |
18 | // |
7e4131fc |
19 | // In addition custom distributions can be used be the mean |
20 | // either two dimensional formula (TF2), a two dimensional histogram or |
21 | // two one dimensional histograms. |
4966b266 |
22 | // |
23 | // Azimuthal distribution is deconvoluted from (Pt,Y) distribution |
24 | // and is described by two Fourier coefficients representing |
7e4131fc |
25 | // Directed and Elliptic flow. |
4966b266 |
26 | // |
7e4131fc |
27 | //////////////////////////////////////////////////////////////////////////////// |
28 | // |
4966b266 |
29 | // To apply flow to event ganerated by an arbitraly event generator |
30 | // refer to AliGenAfterBurnerFlow class. |
7e4131fc |
31 | // |
32 | //////////////////////////////////////////////////////////////////////////////// |
33 | // |
4966b266 |
34 | // For examples, parameters and testing macros refer to: |
35 | // http:/home.cern.ch/radomski |
7e4131fc |
36 | // |
37 | // for more detailed description refer to ALICE NOTE |
38 | // "GeVSim Monte-Carlo Event Generator" |
39 | // S.Radosmki, P. Foka. |
4966b266 |
40 | // |
41 | // Author: |
42 | // Sylwester Radomski, |
43 | // GSI, March 2002 |
44 | // |
45 | // S.Radomski@gsi.de |
46 | // |
47 | //////////////////////////////////////////////////////////////////////////////// |
7e4131fc |
48 | // |
49 | // Updated and revised: September 2002, S. Radomski, GSI |
50 | // |
51 | //////////////////////////////////////////////////////////////////////////////// |
52 | |
4966b266 |
53 | |
54 | class TFormula; |
55 | class TF1; |
56 | class TF2; |
7e4131fc |
57 | class TH1D; |
58 | class TH2D; |
4966b266 |
59 | class TObjArray; |
60 | class AliGeVSimParticle; |
7816887f |
61 | |
62 | |
63 | class AliGenGeVSim : public AliGenerator { |
64 | |
4966b266 |
65 | public: |
66 | |
67 | AliGenGeVSim(); |
7e4131fc |
68 | AliGenGeVSim(Float_t psi, Bool_t isMultTotal = kTRUE); |
4966b266 |
69 | |
70 | virtual ~AliGenGeVSim(); |
71 | |
72 | ///////////////////////////////////////////////////////////////// |
73 | |
74 | void AddParticleType(AliGeVSimParticle *part); |
7e4131fc |
75 | void SetMultTotal(Bool_t isTotal = kTRUE); |
4966b266 |
76 | |
77 | void Init(); |
78 | void Generate(); |
79 | |
80 | ///////////////////////////////////////////////////////////////// |
81 | |
82 | private: |
83 | |
7e4131fc |
84 | Int_t fModel; // Selected model (1-7) |
7816887f |
85 | Float_t fPsi; // Reaction Plane angle (0-2pi) |
7e4131fc |
86 | Bool_t fIsMultTotal; // Mode od multiplicity: total, dN/dY |
87 | |
88 | TF1 *fPtFormula; //! Pt formula for model (1) |
89 | TF1 *fYFormula; //! Y formula for model (1) |
e760b04a |
90 | TF2 *fPtYFormula[4]; //! Pt,Y formulae for model (2)-(4) |
7e4131fc |
91 | TF1 *fPhiFormula; //! phi formula |
4966b266 |
92 | |
7e4131fc |
93 | TFormula *fCurrentForm; //! currently used formula |
94 | TH1D *fHist[2]; //! two 1D histograms (fModel == 6) |
95 | TH2D *fPtYHist; //! two-dimensional histogram (fModel == 7) |
96 | |
7816887f |
97 | TObjArray *fPartTypes; // Registered particles |
4966b266 |
98 | |
7e4131fc |
99 | void InitFormula(); |
100 | void SetFormula(Int_t pdg); |
101 | void AdjustFormula(); |
4966b266 |
102 | void DetermineReactionPlane(); |
7e4131fc |
103 | void GetRandomPtY(Double_t &pt, Double_t &y); |
104 | |
105 | Float_t GetdNdYToTotal(); |
7816887f |
106 | |
7e4131fc |
107 | Bool_t CheckPtYPhi(Float_t pt, Float_t y, Float_t phi); // for histograms only |
108 | Bool_t CheckAcceptance(Float_t p[3]); |
4966b266 |
109 | |
7816887f |
110 | Float_t FindScaler(Int_t paramId, Int_t pdg); |
7816887f |
111 | |
7816887f |
112 | ///////////////////////////////////////////////////////////////// |
113 | |
4966b266 |
114 | public: |
115 | |
7e4131fc |
116 | ClassDef(AliGenGeVSim, 2) |
7816887f |
117 | |
118 | }; |
119 | |
120 | #endif |