]>
Commit | Line | Data |
---|---|---|
936b0a6c | 1 | #ifndef ALIROOT_ALIFORWARDFLOWWEIGHTS |
2 | #define ALIROOT_ALIFORWARDFLOWWEIGHTS | |
3 | #include <TObject.h> | |
4 | class TGraph; | |
5 | class TF1; | |
6 | class TList; | |
7 | ||
8 | /** | |
9 | * Utility class to calculate flow weights | |
10 | * | |
11 | */ | |
12 | class AliForwardFlowWeights : public TObject | |
13 | { | |
14 | public: | |
15 | enum { | |
16 | kEta = 0x01, // include eta effect | |
17 | kPt = 0x02, // include pt effect | |
18 | kPID = 0x04, // include PID effect | |
19 | kCent = 0x08, // include centrality effect | |
20 | kB = 0x10 // include impact parmaeter effect | |
21 | }; | |
22 | /** | |
23 | * Constructor | |
24 | */ | |
25 | AliForwardFlowWeights(); | |
26 | /** | |
27 | * copy constructor | |
28 | * | |
29 | * @param o Object to copy from | |
30 | */ | |
31 | AliForwardFlowWeights(const AliForwardFlowWeights& o); | |
32 | /** | |
33 | * Assignment operator | |
34 | * | |
35 | * @param o Object to assign from | |
290052e7 | 36 | * |
37 | * @return Reference to this object | |
936b0a6c | 38 | */ |
39 | AliForwardFlowWeights& operator=(const AliForwardFlowWeights& o); | |
40 | /** | |
41 | * Destructor | |
42 | */ | |
43 | virtual ~AliForwardFlowWeights(); | |
44 | ||
45 | /** | |
46 | * Initialize | |
47 | * | |
48 | * @param l List to add objects to | |
49 | */ | |
50 | virtual void Init(TList* l); | |
51 | /** | |
290052e7 | 52 | * @a what is a bit-wise or of |
53 | * | |
54 | * - kPt Weight according to transverse momentum | |
55 | * - kEta Weight according to Pseudo-rapidity | |
56 | * - kPID Weight according to particle type | |
57 | * - kCent Weight according to centrality | |
58 | * - kB Weight according to impact parameter. | |
59 | * | |
60 | * Note, that kCent and kB are mutually exclusive | |
61 | * | |
62 | * @a type can be one of | |
63 | * | |
64 | * - 0 No weighting | |
65 | * | |
66 | * - 1 Pt is weighted as mean of @f$v_2{2}@f$ and @f$v_2{4}@f$ from | |
67 | * 40-50% centrality, unity weight for p, other for @f$\pi@f$, | |
68 | * other particles fixed, and the width of the @f$\eta@f$ | |
69 | * Gaussian is 9 | |
70 | * | |
71 | * - 2 Pt is weighted by @f$v_2{2}@f$ from 40-50% centrality, fixed | |
72 | * PID weight, and the width of the @f$\eta@f$ Gaussian is 3 | |
73 | * | |
74 | * - 3 Pt is weighted by @f$v_2{4}@f$ from 30-40% centrality, unity | |
75 | * weight for p, other for @f$\pi@f$, other particles fixed, and | |
76 | * the width of the @f$\eta@f$ Gaussian is 15 | |
77 | * | |
78 | * - 4 Pt is weighted by @f$v_2{4}@f$ from 40-50% centrality, unity | |
79 | * weight for p, other for @f$\pi@f$, other particles fixed, and | |
80 | * the width of the @f$\eta@f$ Gaussian is 9 | |
936b0a6c | 81 | * |
82 | * | |
83 | * @param eta Pseudo-rapidity of particle (@f$\eta@f$) | |
84 | * @param pt Transverse momentum of particle (@f$p_T@f$) in GeV | |
85 | * @param phi Azimuthal angle of particle (@f$\phi@f$) in radians | |
86 | * @param id Particle type of particle | |
87 | * @param phiR Event plane angle (@f$\phi_R@f$) in radians | |
88 | * @param bOrC Impact paramter/Centrality of event (@f$b@f$) in fm | |
89 | * @param type Type of flow to add | |
90 | * @param order Order of flow weight | |
91 | * @param what Which effects to include | |
92 | * | |
93 | * @return | |
94 | */ | |
95 | Double_t CalcWeight(Double_t eta, | |
96 | Double_t pt, | |
97 | Double_t phi, | |
98 | Int_t id, | |
99 | Double_t phiR, | |
100 | Double_t bOrC, | |
101 | Int_t type, | |
102 | UShort_t order, | |
103 | UShort_t what) const; | |
104 | /** | |
105 | * Calculate the weights | |
106 | * | |
107 | * @param eta Pseudo-rapidity of particle (@f$\eta@f$) | |
108 | * @param pt Transverse momentum of particle (@f$p_T@f$) in GeV | |
109 | * @param phi Azimuthal angle of particle (@f$\phi@f$) in radians | |
110 | * @param id Particle type of particle | |
111 | * @param phiR Event plane angle (@f$\phi_R@f$) in radians | |
112 | * @param b Impact paramter of event (@f$b@f$) in fm | |
113 | * | |
114 | * @return | |
115 | */ | |
116 | virtual Double_t CalcWeight(Double_t eta, Double_t pt, | |
117 | Double_t phi, Int_t id, | |
118 | Double_t phiR, Double_t b) const; | |
119 | /** | |
120 | * Construct an object from objects found in list, or null | |
121 | * | |
122 | * @param l List to find objects in | |
123 | * | |
124 | * @return Newly created object, or null | |
125 | */ | |
126 | static AliForwardFlowWeights* FromList(TList* l); | |
127 | protected: | |
290052e7 | 128 | /** |
129 | * Calculate weight | |
130 | * | |
131 | * @param eta Psuedo-rapidity | |
132 | * @param type Parameterization type | |
133 | * | |
134 | * @return weight | |
135 | */ | |
936b0a6c | 136 | Double_t CalcEtaWeight(Double_t eta, Int_t type) const; |
290052e7 | 137 | /** |
138 | * Calculate weight | |
139 | * | |
140 | * @param id Particle (type) identifier | |
141 | * @param type Parameterization type | |
142 | * | |
143 | * @return weight | |
144 | */ | |
936b0a6c | 145 | Double_t CalcPidWeight(Int_t id, Int_t type) const; |
290052e7 | 146 | /** |
147 | * Calculate weight | |
148 | * | |
149 | * @param pt Transverse momentum (GeV) | |
150 | * @param type Parameterization type | |
151 | * | |
152 | * @return weight | |
153 | */ | |
936b0a6c | 154 | Double_t CalcPtWeight(Double_t pt, Int_t type) const; |
290052e7 | 155 | /** |
156 | * Calculate weight | |
157 | * | |
158 | * @param c Centrality | |
159 | * | |
160 | * @return weight | |
161 | */ | |
936b0a6c | 162 | Double_t CalcCentWeight(Double_t c) const; |
290052e7 | 163 | /** |
164 | * Calculate weight | |
165 | * | |
166 | * @param b Impact parameters (fm) | |
167 | * | |
168 | * @return weight | |
169 | */ | |
936b0a6c | 170 | Double_t CalcBWeight(Double_t b) const; |
171 | ||
172 | TGraph* fV22Pt; // Contribution from v2{2} as a function of pt | |
173 | TGraph* fV24Pt; // Contribution from v2{4} as a function of pt | |
174 | TGraph* fV24AltPt; // Contribution from v2{4} as a function of pt | |
175 | TGraph* fV2B; // Contribution from v2 as a function of b | |
176 | TGraph* fV2C; // Contribution from v2 as a function of centrality | |
177 | ||
5934a3e3 | 178 | ClassDef(AliForwardFlowWeights,2); |
936b0a6c | 179 | }; |
180 | ||
181 | #endif | |
182 | // | |
183 | // Local Variables: | |
184 | // mode: C++ | |
185 | // End: | |
186 | // |