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