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 pwglf_forward_aod
18 #include "AliForwardUtil.h"
22 * @defgroup pwglf_forward_algo Algorithms
24 * Various sub-algorithms used in the analysis
26 * @ingroup pwglf_forward
29 * This class calculates the exclusive charged particle density
30 * in each for the 5 FMD rings.
33 * - 5 RingHistos objects - each with a number of vertex dependent
34 * 2D histograms of the inclusive charge particle density
37 * - 5 RingHistos objects - each with a number of vertex dependent
38 * 2D histograms of the exclusive charge particle density
40 * @par Corrections used:
41 * - AliFMDCorrSecondaryMap;
42 * - AliFMDCorrVertexBias
43 * - AliFMDCorrMergingEfficiency
45 * @ingroup pwglf_forward_algo
46 * @ingroup pwglf_forward_aod
48 class AliFMDCorrector : public TNamed
58 * @param name Name of object
60 AliFMDCorrector(const char* name);
64 * @param o Object to copy from
66 AliFMDCorrector(const AliFMDCorrector& o);
70 virtual ~AliFMDCorrector();
72 * Assignement operator
74 * @param o Object to assign from
76 * @return Reference to this object
78 AliFMDCorrector& operator=(const AliFMDCorrector&);
80 * Initialize this object
82 * @param etaAxis Eta axis to use -- not used
84 virtual void Init(const TAxis& etaAxis);
88 * @param hists Cache of histograms
89 * @param vtxBin Vertex bin
91 * @return true on successs
93 virtual Bool_t Correct(AliForwardUtil::Histos& hists, UShort_t vtxBin);
95 * Scale the histograms to the total number of events
97 * @param dir Where the output is stored
98 * @param nEvents Number of events
100 virtual void ScaleHistograms(const TList* dir, Int_t nEvents);
102 * Output diagnostic histograms to directory
104 * @param dir List to write in
106 virtual void DefineOutput(TList* dir);
108 * Set the debug level. The higher the value the more output
110 * @param dbg Debug level
112 void SetDebug(Int_t dbg=1) { fDebug = dbg; }
115 * @name Enable/disable parts of the corrections
118 * Whether to do correction for secondaries
120 * @param use If true, use the secondary correction
122 void SetUseSecondaryMap(Bool_t use=true) { fUseSecondaryMap = use; }
126 * @return true if the correction for secondaries is done
128 Bool_t IsUseSecondaryMap() const { return fUseSecondaryMap; }
130 * Whether to do correction for vertex bias
132 * @param use If true, use the vertex bias correction
134 void SetUseVertexBias(Bool_t use=true) { fUseVertexBias = use; }
138 * @return true if the correction for vertex bias is done
140 Bool_t IsUseVertexBias() const { return fUseVertexBias; }
142 * Whether to do correction for dead-channel acceptance
144 * @param use If true, use the dead-channel acceptance correction
146 void SetUseAcceptance(Bool_t use=true) { fUseAcceptance = use; }
150 * @return true if the correction for dead-channel acceptance is done
152 Bool_t IsUseAcceptance() const { return fUseAcceptance; }
154 * Whether to use the merging efficiency correction
156 * @param use If true, use the merging efficiency correction
158 void SetUseMergingEfficiency(Bool_t use=true) { fUseMergingEfficiency = use; }
162 * @return true if the merging efficiency correction is used.
164 Bool_t IsUseMergingEfficiency() const { return fUseMergingEfficiency; }
170 * @param option Not used
172 virtual void Print(Option_t* option="") const;
175 * Internal data structure to keep track of the histograms
177 struct RingHistos : public AliForwardUtil::RingHistos
189 RingHistos(UShort_t d, Char_t r);
193 * @param o Object to copy from
195 RingHistos(const RingHistos& o);
197 * Assignment operator
199 * @param o Object to assign from
201 * @return Reference to this
203 RingHistos& operator=(const RingHistos& o);
211 * @param dir Where to put it
213 void Output(TList* dir);
215 * Scale the histograms to the total number of events
217 * @param dir where the output is stored
218 * @param nEvents Number of events
220 void ScaleHistograms(TList* dir, Int_t nEvents);
221 TH2D* fDensity; // Distribution primary Nch
222 ClassDef(RingHistos,1);
225 * Get the ring histogram container
230 * @return Ring histogram container
232 RingHistos* GetRingHistos(UShort_t d, Char_t r) const;
234 TList fRingHistos; // List of histogram containers
235 Bool_t fUseSecondaryMap; // Whether to do correction for secondaries
236 Bool_t fUseVertexBias; // Whether to do correction for vertex bias
237 Bool_t fUseAcceptance; // Whether to do correction for dead ch's.
238 Bool_t fUseMergingEfficiency; // Whether to use the merging efficiency
239 Int_t fDebug; // Debug level
241 ClassDef(AliFMDCorrector,2); // Correct the inclusive d2N/detadphi