]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FORWARD/analysis2/AliFMDCorrector.h
Moved reading corrections into base class AliForwardMultiplicityBase.
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / AliFMDCorrector.h
CommitLineData
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 9class 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 35class AliFMDCorrector : public TNamed
7e4038b5 36{
37public:
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 /**
7ec4d843 67 * Initialize this object
68 *
69 * @param etaAxis Eta axis to use -- not used
70 */
71 virtual void Init(const TAxis& etaAxis);
72 /**
7e4038b5 73 * Do the calculations
74 *
75 * @param hists Cache of histograms
76 * @param vtxBin Vertex bin
77 *
78 * @return true on successs
79 */
0bd4b00f 80 virtual Bool_t Correct(AliForwardUtil::Histos& hists, UShort_t vtxBin);
7e4038b5 81 /**
82 * Scale the histograms to the total number of events
83 *
c389303e 84 * @param dir Where the output is stored
7e4038b5 85 * @param nEvents Number of events
86 */
219882ab 87 virtual void ScaleHistograms(TList* dir, Int_t nEvents);
7e4038b5 88 /**
89 * Output diagnostic histograms to directory
90 *
91 * @param dir List to write in
92 */
219882ab 93 virtual void DefineOutput(TList* dir);
8dc20805 94 /**
95 * Set the debug level. The higher the value the more output
96 *
97 * @param dbg Debug level
98 */
99 void SetDebug(Int_t dbg=1) { fDebug = dbg; }
1174780f 100 /**
7ec4d843 101 * @{
102 * @name Enable/disable parts of the corrections
103 */
104 /**
105 * Whether to do correction for secondaries
106 *
107 * @param use If true, use the secondary correction
108 */
109 void SetUseSecondaryMap(Bool_t use=true) { fUseSecondaryMap = use; }
110 /**
111 * Check
112 *
113 * @return true if the correction for secondaries is done
114 */
115 Bool_t IsUseSecondaryMap() const { return fUseSecondaryMap; }
116 /**
117 * Whether to do correction for vertex bias
118 *
119 * @param use If true, use the vertex bias correction
120 */
121 void SetUseVertexBias(Bool_t use=true) { fUseVertexBias = use; }
122 /**
123 * Check
124 *
125 * @return true if the correction for vertex bias is done
126 */
127 Bool_t IsUseVertexBias() const { return fUseVertexBias; }
128 /**
129 * Whether to do correction for dead-channel acceptance
130 *
131 * @param use If true, use the dead-channel acceptance correction
132 */
133 void SetUseAcceptance(Bool_t use=true) { fUseAcceptance = use; }
134 /**
135 * Check
136 *
137 * @return true if the correction for dead-channel acceptance is done
138 */
139 Bool_t IsUseAcceptance() const { return fUseAcceptance; }
140 /**
1174780f 141 * Whether to use the merging efficiency correction
7ec4d843 142 *
1174780f 143 * @param use If true, use the merging efficiency correction
144 */
145 void SetUseMergingEfficiency(Bool_t use=true) { fUseMergingEfficiency = use; }
7ec4d843 146 /**
147 * Check
148 *
1174780f 149 * @return true if the merging efficiency correction is used.
150 */
151 Bool_t IsUseMergingEfficiency() const { return fUseMergingEfficiency; }
7ec4d843 152 /* @} */
153
154 /**
0bd4b00f 155 * Print information
156 *
157 * @param option Not used
158 */
159 void Print(Option_t* option="") const;
7e4038b5 160protected:
161 /**
162 * Internal data structure to keep track of the histograms
163 */
9d99b0dd 164 struct RingHistos : public AliForwardUtil::RingHistos
7e4038b5 165 {
166 /**
167 * Default CTOR
168 */
169 RingHistos();
170 /**
171 * Constructor
172 *
173 * @param d detector
174 * @param r ring
175 */
176 RingHistos(UShort_t d, Char_t r);
177 /**
178 * Copy constructor
179 *
180 * @param o Object to copy from
181 */
182 RingHistos(const RingHistos& o);
183 /**
184 * Assignment operator
185 *
186 * @param o Object to assign from
187 *
188 * @return Reference to this
189 */
190 RingHistos& operator=(const RingHistos& o);
191 /**
192 * Destructor
193 */
194 ~RingHistos();
c389303e 195 /**
196 * Make output
197 *
198 * @param dir Where to put it
199 */
7e4038b5 200 void Output(TList* dir);
9d99b0dd 201 /**
202 * Scale the histograms to the total number of events
203 *
c389303e 204 * @param dir where the output is stored
9d99b0dd 205 * @param nEvents Number of events
206 */
207 void ScaleHistograms(TList* dir, Int_t nEvents);
7e4038b5 208 TH2D* fDensity; // Distribution primary Nch
9d99b0dd 209 ClassDef(RingHistos,1);
7e4038b5 210 };
211 /**
212 * Get the ring histogram container
213 *
214 * @param d Detector
215 * @param r Ring
216 *
217 * @return Ring histogram container
218 */
219 RingHistos* GetRingHistos(UShort_t d, Char_t r) const;
220
81eda625 221 TList fRingHistos; // List of histogram containers
7ec4d843 222 Bool_t fUseSecondaryMap; // Whether to do correction for secondaries
223 Bool_t fUseVertexBias; // Whether to do correction for vertex bias
224 Bool_t fUseAcceptance; // Whether to do correction for dead ch's.
81eda625 225 Bool_t fUseMergingEfficiency; // Whether to use the merging efficiency
226 Int_t fDebug; // Debug level
7e4038b5 227
7ec4d843 228 ClassDef(AliFMDCorrector,2); // Correct the inclusive d2N/detadphi
7e4038b5 229};
230
231#endif
232// Local Variables:
233// mode: C++
234// End:
235