]>
Commit | Line | Data |
---|---|---|
7984e5f7 | 1 | // This class calculates the exclusive charged particle density |
2 | // in each for the 5 FMD rings. | |
3 | // | |
72cc12cd | 4 | #ifndef ALIFMDCORRECTOR_H |
5 | #define ALIFMDCORRECTOR_H | |
ffca499d | 6 | /** |
7 | * @file AliFMDCorrector.h | |
8 | * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk> | |
9 | * @date Wed Mar 23 14:01:02 2011 | |
10 | * | |
11 | * @brief | |
12 | * | |
13 | * @ingroup pwg2_forward_aod | |
14 | * | |
15 | */ | |
7e4038b5 | 16 | #include <TNamed.h> |
17 | #include <TList.h> | |
18 | #include "AliForwardUtil.h" | |
7e4038b5 | 19 | class TH2D; |
20 | ||
21 | /** | |
219882ab | 22 | * @defgroup pwg2_forward_algo Algorithms |
23 | * | |
24 | * @ingroup pwg2_forward | |
25 | */ | |
26 | /** | |
27 | * This class calculates the exclusive charged particle density | |
7e4038b5 | 28 | * in each for the 5 FMD rings. |
29 | * | |
30 | * @par Input: | |
219882ab | 31 | * - 5 RingHistos objects - each with a number of vertex dependent |
32 | * 2D histograms of the inclusive charge particle density | |
7e4038b5 | 33 | * |
34 | * @par Output: | |
35 | * - 5 RingHistos objects - each with a number of vertex dependent | |
219882ab | 36 | * 2D histograms of the exclusive charge particle density |
7e4038b5 | 37 | * |
38 | * @par Corrections used: | |
219882ab | 39 | * - AliFMDCorrSecondaryMap; |
40 | * - AliFMDCorrVertexBias | |
41 | * - AliFMDCorrMergingEfficiency | |
7e4038b5 | 42 | * |
219882ab | 43 | * @ingroup pwg2_forward_algo |
ffca499d | 44 | * @ingroup pwg2_forward_aod |
7e4038b5 | 45 | */ |
72cc12cd | 46 | class AliFMDCorrector : public TNamed |
7e4038b5 | 47 | { |
48 | public: | |
49 | /** | |
50 | * Constructor | |
51 | */ | |
72cc12cd | 52 | AliFMDCorrector(); |
7e4038b5 | 53 | /** |
54 | * Constructor | |
55 | * | |
56 | * @param name Name of object | |
57 | */ | |
72cc12cd | 58 | AliFMDCorrector(const char* name); |
7e4038b5 | 59 | /** |
60 | * Copy constructor | |
61 | * | |
62 | * @param o Object to copy from | |
63 | */ | |
72cc12cd | 64 | AliFMDCorrector(const AliFMDCorrector& o); |
7e4038b5 | 65 | /** |
66 | * Destructor | |
67 | */ | |
72cc12cd | 68 | virtual ~AliFMDCorrector(); |
7e4038b5 | 69 | /** |
70 | * Assignement operator | |
71 | * | |
72 | * @param o Object to assign from | |
73 | * | |
74 | * @return Reference to this object | |
75 | */ | |
72cc12cd | 76 | AliFMDCorrector& operator=(const AliFMDCorrector&); |
7e4038b5 | 77 | /** |
7ec4d843 | 78 | * Initialize this object |
79 | * | |
80 | * @param etaAxis Eta axis to use -- not used | |
81 | */ | |
82 | virtual void Init(const TAxis& etaAxis); | |
83 | /** | |
7e4038b5 | 84 | * Do the calculations |
85 | * | |
86 | * @param hists Cache of histograms | |
87 | * @param vtxBin Vertex bin | |
88 | * | |
89 | * @return true on successs | |
90 | */ | |
0bd4b00f | 91 | virtual Bool_t Correct(AliForwardUtil::Histos& hists, UShort_t vtxBin); |
7e4038b5 | 92 | /** |
93 | * Scale the histograms to the total number of events | |
94 | * | |
c389303e | 95 | * @param dir Where the output is stored |
7e4038b5 | 96 | * @param nEvents Number of events |
97 | */ | |
fb3430ac | 98 | virtual void ScaleHistograms(const TList* dir, Int_t nEvents); |
7e4038b5 | 99 | /** |
100 | * Output diagnostic histograms to directory | |
101 | * | |
102 | * @param dir List to write in | |
103 | */ | |
219882ab | 104 | virtual void DefineOutput(TList* dir); |
8dc20805 | 105 | /** |
106 | * Set the debug level. The higher the value the more output | |
107 | * | |
108 | * @param dbg Debug level | |
109 | */ | |
110 | void SetDebug(Int_t dbg=1) { fDebug = dbg; } | |
1174780f | 111 | /** |
7ec4d843 | 112 | * @{ |
113 | * @name Enable/disable parts of the corrections | |
114 | */ | |
115 | /** | |
116 | * Whether to do correction for secondaries | |
117 | * | |
118 | * @param use If true, use the secondary correction | |
119 | */ | |
120 | void SetUseSecondaryMap(Bool_t use=true) { fUseSecondaryMap = use; } | |
121 | /** | |
122 | * Check | |
123 | * | |
124 | * @return true if the correction for secondaries is done | |
125 | */ | |
126 | Bool_t IsUseSecondaryMap() const { return fUseSecondaryMap; } | |
127 | /** | |
128 | * Whether to do correction for vertex bias | |
129 | * | |
130 | * @param use If true, use the vertex bias correction | |
131 | */ | |
132 | void SetUseVertexBias(Bool_t use=true) { fUseVertexBias = use; } | |
133 | /** | |
134 | * Check | |
135 | * | |
136 | * @return true if the correction for vertex bias is done | |
137 | */ | |
138 | Bool_t IsUseVertexBias() const { return fUseVertexBias; } | |
139 | /** | |
140 | * Whether to do correction for dead-channel acceptance | |
141 | * | |
142 | * @param use If true, use the dead-channel acceptance correction | |
143 | */ | |
144 | void SetUseAcceptance(Bool_t use=true) { fUseAcceptance = use; } | |
145 | /** | |
146 | * Check | |
147 | * | |
148 | * @return true if the correction for dead-channel acceptance is done | |
149 | */ | |
150 | Bool_t IsUseAcceptance() const { return fUseAcceptance; } | |
151 | /** | |
1174780f | 152 | * Whether to use the merging efficiency correction |
7ec4d843 | 153 | * |
1174780f | 154 | * @param use If true, use the merging efficiency correction |
155 | */ | |
156 | void SetUseMergingEfficiency(Bool_t use=true) { fUseMergingEfficiency = use; } | |
7ec4d843 | 157 | /** |
158 | * Check | |
159 | * | |
1174780f | 160 | * @return true if the merging efficiency correction is used. |
161 | */ | |
162 | Bool_t IsUseMergingEfficiency() const { return fUseMergingEfficiency; } | |
7ec4d843 | 163 | /* @} */ |
164 | ||
165 | /** | |
0bd4b00f | 166 | * Print information |
167 | * | |
168 | * @param option Not used | |
169 | */ | |
5bb5d1f6 | 170 | virtual void Print(Option_t* option="") const; |
7e4038b5 | 171 | protected: |
172 | /** | |
173 | * Internal data structure to keep track of the histograms | |
174 | */ | |
9d99b0dd | 175 | struct RingHistos : public AliForwardUtil::RingHistos |
7e4038b5 | 176 | { |
177 | /** | |
178 | * Default CTOR | |
179 | */ | |
180 | RingHistos(); | |
181 | /** | |
182 | * Constructor | |
183 | * | |
184 | * @param d detector | |
185 | * @param r ring | |
186 | */ | |
187 | RingHistos(UShort_t d, Char_t r); | |
188 | /** | |
189 | * Copy constructor | |
190 | * | |
191 | * @param o Object to copy from | |
192 | */ | |
193 | RingHistos(const RingHistos& o); | |
194 | /** | |
195 | * Assignment operator | |
196 | * | |
197 | * @param o Object to assign from | |
198 | * | |
199 | * @return Reference to this | |
200 | */ | |
201 | RingHistos& operator=(const RingHistos& o); | |
202 | /** | |
203 | * Destructor | |
204 | */ | |
205 | ~RingHistos(); | |
c389303e | 206 | /** |
207 | * Make output | |
208 | * | |
209 | * @param dir Where to put it | |
210 | */ | |
7e4038b5 | 211 | void Output(TList* dir); |
9d99b0dd | 212 | /** |
213 | * Scale the histograms to the total number of events | |
214 | * | |
c389303e | 215 | * @param dir where the output is stored |
9d99b0dd | 216 | * @param nEvents Number of events |
217 | */ | |
218 | void ScaleHistograms(TList* dir, Int_t nEvents); | |
7e4038b5 | 219 | TH2D* fDensity; // Distribution primary Nch |
9d99b0dd | 220 | ClassDef(RingHistos,1); |
7e4038b5 | 221 | }; |
222 | /** | |
223 | * Get the ring histogram container | |
224 | * | |
225 | * @param d Detector | |
226 | * @param r Ring | |
227 | * | |
228 | * @return Ring histogram container | |
229 | */ | |
230 | RingHistos* GetRingHistos(UShort_t d, Char_t r) const; | |
231 | ||
81eda625 | 232 | TList fRingHistos; // List of histogram containers |
7ec4d843 | 233 | Bool_t fUseSecondaryMap; // Whether to do correction for secondaries |
234 | Bool_t fUseVertexBias; // Whether to do correction for vertex bias | |
235 | Bool_t fUseAcceptance; // Whether to do correction for dead ch's. | |
81eda625 | 236 | Bool_t fUseMergingEfficiency; // Whether to use the merging efficiency |
237 | Int_t fDebug; // Debug level | |
7e4038b5 | 238 | |
7ec4d843 | 239 | ClassDef(AliFMDCorrector,2); // Correct the inclusive d2N/detadphi |
7e4038b5 | 240 | }; |
241 | ||
242 | #endif | |
243 | // Local Variables: | |
244 | // mode: C++ | |
245 | // End: | |
246 |