1 // This class calculates the exclusive charged particle density
2 // in each for the 5 FMD rings.
4 #ifndef ALIFMDCORRECTOR_H
5 #define ALIFMDCORRECTOR_H
7 * @file AliFMDCorrector.h
8 * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
9 * @date Wed Mar 23 14:01:02 2011
13 * @ingroup pwg2_forward_aod
18 #include "AliForwardUtil.h"
22 * @defgroup pwg2_forward_algo Algorithms
24 * @ingroup pwg2_forward
27 * This class calculates the exclusive charged particle density
28 * in each for the 5 FMD rings.
31 * - 5 RingHistos objects - each with a number of vertex dependent
32 * 2D histograms of the inclusive charge particle density
35 * - 5 RingHistos objects - each with a number of vertex dependent
36 * 2D histograms of the exclusive charge particle density
38 * @par Corrections used:
39 * - AliFMDCorrSecondaryMap;
40 * - AliFMDCorrVertexBias
41 * - AliFMDCorrMergingEfficiency
43 * @ingroup pwg2_forward_algo
44 * @ingroup pwg2_forward_aod
46 class AliFMDCorrector : public TNamed
56 * @param name Name of object
58 AliFMDCorrector(const char* name);
62 * @param o Object to copy from
64 AliFMDCorrector(const AliFMDCorrector& o);
68 virtual ~AliFMDCorrector();
70 * Assignement operator
72 * @param o Object to assign from
74 * @return Reference to this object
76 AliFMDCorrector& operator=(const AliFMDCorrector&);
78 * Initialize this object
80 * @param etaAxis Eta axis to use -- not used
82 virtual void Init(const TAxis& etaAxis);
86 * @param hists Cache of histograms
87 * @param vtxBin Vertex bin
89 * @return true on successs
91 virtual Bool_t Correct(AliForwardUtil::Histos& hists, UShort_t vtxBin);
93 * Scale the histograms to the total number of events
95 * @param dir Where the output is stored
96 * @param nEvents Number of events
98 virtual void ScaleHistograms(const TList* dir, Int_t nEvents);
100 * Output diagnostic histograms to directory
102 * @param dir List to write in
104 virtual void DefineOutput(TList* dir);
106 * Set the debug level. The higher the value the more output
108 * @param dbg Debug level
110 void SetDebug(Int_t dbg=1) { fDebug = dbg; }
113 * @name Enable/disable parts of the corrections
116 * Whether to do correction for secondaries
118 * @param use If true, use the secondary correction
120 void SetUseSecondaryMap(Bool_t use=true) { fUseSecondaryMap = use; }
124 * @return true if the correction for secondaries is done
126 Bool_t IsUseSecondaryMap() const { return fUseSecondaryMap; }
128 * Whether to do correction for vertex bias
130 * @param use If true, use the vertex bias correction
132 void SetUseVertexBias(Bool_t use=true) { fUseVertexBias = use; }
136 * @return true if the correction for vertex bias is done
138 Bool_t IsUseVertexBias() const { return fUseVertexBias; }
140 * Whether to do correction for dead-channel acceptance
142 * @param use If true, use the dead-channel acceptance correction
144 void SetUseAcceptance(Bool_t use=true) { fUseAcceptance = use; }
148 * @return true if the correction for dead-channel acceptance is done
150 Bool_t IsUseAcceptance() const { return fUseAcceptance; }
152 * Whether to use the merging efficiency correction
154 * @param use If true, use the merging efficiency correction
156 void SetUseMergingEfficiency(Bool_t use=true) { fUseMergingEfficiency = use; }
160 * @return true if the merging efficiency correction is used.
162 Bool_t IsUseMergingEfficiency() const { return fUseMergingEfficiency; }
168 * @param option Not used
170 void Print(Option_t* option="") const;
173 * Internal data structure to keep track of the histograms
175 struct RingHistos : public AliForwardUtil::RingHistos
187 RingHistos(UShort_t d, Char_t r);
191 * @param o Object to copy from
193 RingHistos(const RingHistos& o);
195 * Assignment operator
197 * @param o Object to assign from
199 * @return Reference to this
201 RingHistos& operator=(const RingHistos& o);
209 * @param dir Where to put it
211 void Output(TList* dir);
213 * Scale the histograms to the total number of events
215 * @param dir where the output is stored
216 * @param nEvents Number of events
218 void ScaleHistograms(TList* dir, Int_t nEvents);
219 TH2D* fDensity; // Distribution primary Nch
220 ClassDef(RingHistos,1);
223 * Get the ring histogram container
228 * @return Ring histogram container
230 RingHistos* GetRingHistos(UShort_t d, Char_t r) const;
232 TList fRingHistos; // List of histogram containers
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.
236 Bool_t fUseMergingEfficiency; // Whether to use the merging efficiency
237 Int_t fDebug; // Debug level
239 ClassDef(AliFMDCorrector,2); // Correct the inclusive d2N/detadphi