]>
Commit | Line | Data |
---|---|---|
7984e5f7 | 1 | // This class calculates the inclusive charged particle density |
2 | // in each for the 5 FMD rings. | |
3 | // | |
4 | #ifndef ALIFMDDENSITYCALCULATOR_H | |
5 | #define ALIFMDDENSITYCALCULATOR_H | |
7e4038b5 | 6 | #include <TNamed.h> |
7 | #include <TList.h> | |
8 | #include "AliForwardUtil.h" | |
9 | class AliESDFMD; | |
10 | class TH2D; | |
dd497217 | 11 | class TH1D; |
0bd4b00f | 12 | class TProfile; |
7e4038b5 | 13 | |
14 | /** | |
15 | * This class calculates the inclusive charged particle density | |
16 | * in each for the 5 FMD rings. | |
17 | * | |
18 | * @par Input: | |
19 | * - AliESDFMD object possibly corrected for sharing | |
20 | * | |
21 | * @par Output: | |
22 | * - 5 RingHistos objects - each with a number of vertex dependent | |
23 | * 2D histograms of the inclusive charge particle density | |
24 | * | |
25 | * @par Corrections used: | |
26 | * - AliFMDAnaCalibEnergyDistribution | |
27 | * - AliFMDDoubleHitCorrection | |
28 | * - AliFMDDeadCorrection | |
29 | * | |
8eb443e1 | 30 | * @ingroup pwg2_forward_algo |
7e4038b5 | 31 | */ |
32 | class AliFMDDensityCalculator : public TNamed | |
33 | { | |
34 | public: | |
35 | /** | |
36 | * Constructor | |
37 | */ | |
38 | AliFMDDensityCalculator(); | |
39 | /** | |
40 | * Constructor | |
41 | * | |
42 | * @param name Name of object | |
43 | */ | |
44 | AliFMDDensityCalculator(const char* name); | |
45 | /** | |
46 | * Copy constructor | |
47 | * | |
48 | * @param o Object to copy from | |
49 | */ | |
50 | AliFMDDensityCalculator(const AliFMDDensityCalculator& o); | |
51 | /** | |
52 | * Destructor | |
53 | */ | |
54 | virtual ~AliFMDDensityCalculator(); | |
55 | /** | |
56 | * Assignement operator | |
57 | * | |
58 | * @param o Object to assign from | |
59 | * | |
60 | * @return Reference to this object | |
61 | */ | |
7c1a1f1d | 62 | AliFMDDensityCalculator& operator=(const AliFMDDensityCalculator& o); |
7e4038b5 | 63 | /** |
64 | * Do the calculations | |
65 | * | |
66 | * @param fmd AliESDFMD object (possibly) corrected for sharing | |
67 | * @param hists Histogram cache | |
68 | * @param vtxBin Vertex bin | |
69 | * @param lowFlux Low flux flag. | |
70 | * | |
71 | * @return true on successs | |
72 | */ | |
73 | virtual Bool_t Calculate(const AliESDFMD& fmd, | |
74 | AliForwardUtil::Histos& hists, | |
0bd4b00f | 75 | UShort_t vtxBin, Bool_t lowFlux); |
7e4038b5 | 76 | /** |
77 | * Scale the histograms to the total number of events | |
78 | * | |
c389303e | 79 | * @param dir where to put the output |
7e4038b5 | 80 | * @param nEvents Number of events |
81 | */ | |
8eb443e1 | 82 | virtual void ScaleHistograms(TList* dir, Int_t nEvents); |
7e4038b5 | 83 | /** |
84 | * Output diagnostic histograms to directory | |
85 | * | |
86 | * @param dir List to write in | |
87 | */ | |
8eb443e1 | 88 | virtual void DefineOutput(TList* dir); |
ea3e5d95 | 89 | /** |
90 | * Set the debug level. The higher the value the more output | |
91 | * | |
92 | * @param dbg Debug level | |
93 | */ | |
94 | void SetDebug(Int_t dbg=1) { fDebug = dbg; } | |
0bd4b00f | 95 | /** |
96 | * Maximum particle weight to use | |
97 | * | |
98 | * @param m | |
99 | */ | |
100 | void SetMaxParticles(UShort_t m) { fMaxParticles = m; } | |
101 | /** | |
102 | * Set the lower multiplicity cut. This overrides the setting in | |
103 | * the energy loss fits. | |
104 | * | |
105 | * @param cut Cut to use | |
106 | */ | |
107 | void SetMultCut(Double_t cut) { fMultCut = cut; } | |
108 | /** | |
109 | * Get the multiplicity cut. If the user has set fMultCut (via | |
110 | * SetMultCut) then that value is used. If not, then the lower | |
111 | * value of the fit range for the enery loss fits is returned. | |
112 | * | |
113 | * @return Lower cut on multiplicity | |
114 | */ | |
115 | Double_t GetMultCut() const; | |
116 | /** | |
117 | * Print information | |
118 | * | |
119 | * @param option Not used | |
120 | */ | |
121 | void Print(Option_t* option="") const; | |
7e4038b5 | 122 | protected: |
123 | /** | |
124 | * Get the number of particles corresponding to the signal mult | |
125 | * | |
126 | * @param mult Signal | |
127 | * @param d Detector | |
128 | * @param r Ring | |
129 | * @param s Sector | |
130 | * @param t Strip (not used) | |
131 | * @param v Vertex bin | |
132 | * @param eta Pseudo-rapidity | |
133 | * @param lowFlux Low-flux flag | |
134 | * | |
135 | * @return The number of particles | |
136 | */ | |
137 | virtual Float_t NParticles(Float_t mult, | |
138 | UShort_t d, Char_t r, UShort_t s, UShort_t t, | |
0bd4b00f | 139 | UShort_t v, Float_t eta, Bool_t lowFlux) const; |
7e4038b5 | 140 | /** |
141 | * Get the inverse correction factor. This consist of | |
142 | * | |
143 | * - acceptance correction (corners of sensors) | |
144 | * - double hit correction (for low-flux events) | |
145 | * - dead strip correction | |
146 | * | |
147 | * @param d Detector | |
148 | * @param r Ring | |
149 | * @param s Sector | |
150 | * @param t Strip (not used) | |
151 | * @param v Vertex bin | |
152 | * @param eta Pseudo-rapidity | |
153 | * @param lowFlux Low-flux flag | |
154 | * | |
155 | * @return | |
156 | */ | |
157 | virtual Float_t Correction(UShort_t d, Char_t r, UShort_t s, UShort_t t, | |
0bd4b00f | 158 | UShort_t v, Float_t eta, Bool_t lowFlux) const; |
7e4038b5 | 159 | /** |
160 | * Get the acceptance correction for strip @a t in an ring of type @a r | |
161 | * | |
162 | * @param r Ring type ('I' or 'O') | |
163 | * @param t Strip number | |
164 | * | |
165 | * @return Inverse acceptance correction | |
166 | */ | |
167 | virtual Float_t AcceptanceCorrection(Char_t r, UShort_t t) const; | |
0bd4b00f | 168 | /** |
169 | * Generate the acceptance corrections | |
170 | * | |
171 | * @param r Ring to generate for | |
172 | * | |
173 | * @return Newly allocated histogram of acceptance corrections | |
174 | */ | |
175 | virtual TH1D* GenerateAcceptanceCorrection(Char_t r) const; | |
7e4038b5 | 176 | /** |
177 | * Internal data structure to keep track of the histograms | |
178 | */ | |
9d99b0dd | 179 | struct RingHistos : public AliForwardUtil::RingHistos |
7e4038b5 | 180 | { |
181 | /** | |
182 | * Default CTOR | |
183 | */ | |
184 | RingHistos(); | |
185 | /** | |
186 | * Constructor | |
187 | * | |
188 | * @param d detector | |
189 | * @param r ring | |
190 | */ | |
191 | RingHistos(UShort_t d, Char_t r); | |
192 | /** | |
193 | * Copy constructor | |
194 | * | |
195 | * @param o Object to copy from | |
196 | */ | |
197 | RingHistos(const RingHistos& o); | |
198 | /** | |
199 | * Assignment operator | |
200 | * | |
201 | * @param o Object to assign from | |
202 | * | |
203 | * @return Reference to this | |
204 | */ | |
205 | RingHistos& operator=(const RingHistos& o); | |
206 | /** | |
207 | * Destructor | |
208 | */ | |
209 | ~RingHistos(); | |
c389303e | 210 | /** |
211 | * Make output | |
212 | * | |
213 | * @param dir Where to put it | |
214 | */ | |
7e4038b5 | 215 | void Output(TList* dir); |
9d99b0dd | 216 | /** |
217 | * Scale the histograms to the total number of events | |
218 | * | |
c389303e | 219 | * @param dir Where the output is |
9d99b0dd | 220 | * @param nEvents Number of events |
221 | */ | |
222 | void ScaleHistograms(TList* dir, Int_t nEvents); | |
7e4038b5 | 223 | TH2D* fEvsN; // Correlation of Eloss vs uncorrected Nch |
224 | TH2D* fEvsM; // Correlation of Eloss vs corrected Nch | |
0bd4b00f | 225 | TProfile* fEtaVsN; // Average uncorrected Nch vs eta |
226 | TProfile* fEtaVsM; // Average corrected Nch vs eta | |
227 | TProfile* fCorr; // Average correction vs eta | |
7e4038b5 | 228 | TH2D* fDensity; // Distribution inclusive Nch |
9d99b0dd | 229 | ClassDef(RingHistos,1); |
7e4038b5 | 230 | }; |
231 | /** | |
232 | * Get the ring histogram container | |
233 | * | |
234 | * @param d Detector | |
235 | * @param r Ring | |
236 | * | |
237 | * @return Ring histogram container | |
238 | */ | |
239 | RingHistos* GetRingHistos(UShort_t d, Char_t r) const; | |
240 | ||
ea3e5d95 | 241 | TList fRingHistos; // List of histogram containers |
242 | Double_t fMultCut; // Low cut on scaled energy loss | |
243 | TH1D* fSumOfWeights; //! Histogram | |
244 | TH1D* fWeightedSum; //! Histogram | |
245 | TH1D* fCorrections; //! Histogram | |
0bd4b00f | 246 | UShort_t fMaxParticles; // Maximum particle weight to use |
247 | TH1D* fAccI; // Acceptance correction for inner rings | |
248 | TH1D* fAccO; // Acceptance correction for outer rings | |
ea3e5d95 | 249 | Int_t fDebug; // Debug level |
7e4038b5 | 250 | |
251 | ClassDef(AliFMDDensityCalculator,1); // Calculate Nch density | |
252 | }; | |
253 | ||
254 | #endif | |
255 | // Local Variables: | |
256 | // mode: C++ | |
257 | // End: | |
258 |