]>
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 | |
7e4038b5 | 6 | #include <TNamed.h> |
7 | #include <TList.h> | |
8 | #include "AliForwardUtil.h" | |
7e4038b5 | 9 | class TH2D; |
10 | ||
11 | /** | |
219882ab | 12 | * @defgroup pwg2_forward_algo Algorithms |
13 | * | |
14 | * @ingroup pwg2_forward | |
15 | */ | |
16 | /** | |
17 | * This class calculates the exclusive charged particle density | |
7e4038b5 | 18 | * in each for the 5 FMD rings. |
19 | * | |
20 | * @par Input: | |
219882ab | 21 | * - 5 RingHistos objects - each with a number of vertex dependent |
22 | * 2D histograms of the inclusive charge particle density | |
7e4038b5 | 23 | * |
24 | * @par Output: | |
25 | * - 5 RingHistos objects - each with a number of vertex dependent | |
219882ab | 26 | * 2D histograms of the exclusive charge particle density |
7e4038b5 | 27 | * |
28 | * @par Corrections used: | |
219882ab | 29 | * - AliFMDCorrSecondaryMap; |
30 | * - AliFMDCorrVertexBias | |
31 | * - AliFMDCorrMergingEfficiency | |
7e4038b5 | 32 | * |
219882ab | 33 | * @ingroup pwg2_forward_algo |
7e4038b5 | 34 | */ |
72cc12cd | 35 | class AliFMDCorrector : public TNamed |
7e4038b5 | 36 | { |
37 | public: | |
38 | /** | |
39 | * Constructor | |
40 | */ | |
72cc12cd | 41 | AliFMDCorrector(); |
7e4038b5 | 42 | /** |
43 | * Constructor | |
44 | * | |
45 | * @param name Name of object | |
46 | */ | |
72cc12cd | 47 | AliFMDCorrector(const char* name); |
7e4038b5 | 48 | /** |
49 | * Copy constructor | |
50 | * | |
51 | * @param o Object to copy from | |
52 | */ | |
72cc12cd | 53 | AliFMDCorrector(const AliFMDCorrector& o); |
7e4038b5 | 54 | /** |
55 | * Destructor | |
56 | */ | |
72cc12cd | 57 | virtual ~AliFMDCorrector(); |
7e4038b5 | 58 | /** |
59 | * Assignement operator | |
60 | * | |
61 | * @param o Object to assign from | |
62 | * | |
63 | * @return Reference to this object | |
64 | */ | |
72cc12cd | 65 | AliFMDCorrector& operator=(const AliFMDCorrector&); |
7e4038b5 | 66 | /** |
67 | * Do the calculations | |
68 | * | |
69 | * @param hists Cache of histograms | |
70 | * @param vtxBin Vertex bin | |
71 | * | |
72 | * @return true on successs | |
73 | */ | |
0bd4b00f | 74 | virtual Bool_t Correct(AliForwardUtil::Histos& hists, UShort_t vtxBin); |
7e4038b5 | 75 | /** |
76 | * Scale the histograms to the total number of events | |
77 | * | |
c389303e | 78 | * @param dir Where the output is stored |
7e4038b5 | 79 | * @param nEvents Number of events |
80 | */ | |
219882ab | 81 | virtual void ScaleHistograms(TList* dir, Int_t nEvents); |
7e4038b5 | 82 | /** |
83 | * Output diagnostic histograms to directory | |
84 | * | |
85 | * @param dir List to write in | |
86 | */ | |
219882ab | 87 | virtual void DefineOutput(TList* dir); |
8dc20805 | 88 | /** |
89 | * Set the debug level. The higher the value the more output | |
90 | * | |
91 | * @param dbg Debug level | |
92 | */ | |
93 | void SetDebug(Int_t dbg=1) { fDebug = dbg; } | |
1174780f | 94 | /** |
95 | * Whether to use the merging efficiency correction | |
96 | * | |
97 | * @param use If true, use the merging efficiency correction | |
98 | */ | |
99 | void SetUseMergingEfficiency(Bool_t use=true) { fUseMergingEfficiency = use; } | |
100 | /** | |
101 | * Check | |
102 | * | |
103 | * @return true if the merging efficiency correction is used. | |
104 | */ | |
105 | Bool_t IsUseMergingEfficiency() const { return fUseMergingEfficiency; } | |
0bd4b00f | 106 | /** |
107 | * Print information | |
108 | * | |
109 | * @param option Not used | |
110 | */ | |
111 | void Print(Option_t* option="") const; | |
7e4038b5 | 112 | protected: |
113 | /** | |
114 | * Internal data structure to keep track of the histograms | |
115 | */ | |
9d99b0dd | 116 | struct RingHistos : public AliForwardUtil::RingHistos |
7e4038b5 | 117 | { |
118 | /** | |
119 | * Default CTOR | |
120 | */ | |
121 | RingHistos(); | |
122 | /** | |
123 | * Constructor | |
124 | * | |
125 | * @param d detector | |
126 | * @param r ring | |
127 | */ | |
128 | RingHistos(UShort_t d, Char_t r); | |
129 | /** | |
130 | * Copy constructor | |
131 | * | |
132 | * @param o Object to copy from | |
133 | */ | |
134 | RingHistos(const RingHistos& o); | |
135 | /** | |
136 | * Assignment operator | |
137 | * | |
138 | * @param o Object to assign from | |
139 | * | |
140 | * @return Reference to this | |
141 | */ | |
142 | RingHistos& operator=(const RingHistos& o); | |
143 | /** | |
144 | * Destructor | |
145 | */ | |
146 | ~RingHistos(); | |
c389303e | 147 | /** |
148 | * Make output | |
149 | * | |
150 | * @param dir Where to put it | |
151 | */ | |
7e4038b5 | 152 | void Output(TList* dir); |
9d99b0dd | 153 | /** |
154 | * Scale the histograms to the total number of events | |
155 | * | |
c389303e | 156 | * @param dir where the output is stored |
9d99b0dd | 157 | * @param nEvents Number of events |
158 | */ | |
159 | void ScaleHistograms(TList* dir, Int_t nEvents); | |
7e4038b5 | 160 | TH2D* fDensity; // Distribution primary Nch |
9d99b0dd | 161 | ClassDef(RingHistos,1); |
7e4038b5 | 162 | }; |
163 | /** | |
164 | * Get the ring histogram container | |
165 | * | |
166 | * @param d Detector | |
167 | * @param r Ring | |
168 | * | |
169 | * @return Ring histogram container | |
170 | */ | |
171 | RingHistos* GetRingHistos(UShort_t d, Char_t r) const; | |
172 | ||
81eda625 | 173 | TList fRingHistos; // List of histogram containers |
174 | Bool_t fUseMergingEfficiency; // Whether to use the merging efficiency | |
175 | Int_t fDebug; // Debug level | |
7e4038b5 | 176 | |
72cc12cd | 177 | ClassDef(AliFMDCorrector,2); // Calculate Nch density |
7e4038b5 | 178 | }; |
179 | ||
180 | #endif | |
181 | // Local Variables: | |
182 | // mode: C++ | |
183 | // End: | |
184 |