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
8 #include "AliForwardUtil.h"
12 * @defgroup pwg2_forward_algo Algorithms
14 * @ingroup pwg2_forward
17 * This class calculates the exclusive charged particle density
18 * in each for the 5 FMD rings.
21 * - 5 RingHistos objects - each with a number of vertex dependent
22 * 2D histograms of the inclusive charge particle density
25 * - 5 RingHistos objects - each with a number of vertex dependent
26 * 2D histograms of the exclusive charge particle density
28 * @par Corrections used:
29 * - AliFMDCorrSecondaryMap;
30 * - AliFMDCorrVertexBias
31 * - AliFMDCorrMergingEfficiency
33 * @ingroup pwg2_forward_algo
35 class AliFMDCorrector : public TNamed
45 * @param name Name of object
47 AliFMDCorrector(const char* name);
51 * @param o Object to copy from
53 AliFMDCorrector(const AliFMDCorrector& o);
57 virtual ~AliFMDCorrector();
59 * Assignement operator
61 * @param o Object to assign from
63 * @return Reference to this object
65 AliFMDCorrector& operator=(const AliFMDCorrector&);
69 * @param hists Cache of histograms
70 * @param vtxBin Vertex bin
72 * @return true on successs
74 virtual Bool_t Correct(AliForwardUtil::Histos& hists, UShort_t vtxBin);
76 * Scale the histograms to the total number of events
78 * @param dir Where the output is stored
79 * @param nEvents Number of events
81 virtual void ScaleHistograms(TList* dir, Int_t nEvents);
83 * Output diagnostic histograms to directory
85 * @param dir List to write in
87 virtual void DefineOutput(TList* dir);
89 * Set the debug level. The higher the value the more output
91 * @param dbg Debug level
93 void SetDebug(Int_t dbg=1) { fDebug = dbg; }
95 * Whether to use the merging efficiency correction
97 * @param use If true, use the merging efficiency correction
99 void SetUseMergingEfficiency(Bool_t use=true) { fUseMergingEfficiency = use; }
103 * @return true if the merging efficiency correction is used.
105 Bool_t IsUseMergingEfficiency() const { return fUseMergingEfficiency; }
109 * @param option Not used
111 void Print(Option_t* option="") const;
114 * Internal data structure to keep track of the histograms
116 struct RingHistos : public AliForwardUtil::RingHistos
128 RingHistos(UShort_t d, Char_t r);
132 * @param o Object to copy from
134 RingHistos(const RingHistos& o);
136 * Assignment operator
138 * @param o Object to assign from
140 * @return Reference to this
142 RingHistos& operator=(const RingHistos& o);
150 * @param dir Where to put it
152 void Output(TList* dir);
154 * Scale the histograms to the total number of events
156 * @param dir where the output is stored
157 * @param nEvents Number of events
159 void ScaleHistograms(TList* dir, Int_t nEvents);
160 TH2D* fDensity; // Distribution primary Nch
161 ClassDef(RingHistos,1);
164 * Get the ring histogram container
169 * @return Ring histogram container
171 RingHistos* GetRingHistos(UShort_t d, Char_t r) const;
173 TList fRingHistos; // List of histogram containers
174 Bool_t fUseMergingEfficiency; // Whether to use the merging efficiency
175 Int_t fDebug; // Debug level
177 ClassDef(AliFMDCorrector,2); // Calculate Nch density