2 // This class contains the secondary correction and the double hit
3 // correction used in low-flux events.
5 #ifndef ALIFMDCORRMERGINGEFFICIENCY_H
6 #define ALIFMDCORRMERGINGEFFICIENCY_H
8 * @file AliFMDCorrMergingEfficiency.h
9 * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
10 * @date Wed Mar 23 14:01:28 2011
15 * @ingroup pwglf_forward_corr
18 #include <TObjArray.h>
23 * This class contains the merging efficiency correction.
25 * The secondary correction is given by
30 * These are generated from Monte-Carlo truth and ESD information.
32 * @ingroup pwglf_forward_corr
34 class AliFMDCorrMergingEfficiency : public TObject
40 AliFMDCorrMergingEfficiency();
44 * @param o Object to copy from
46 AliFMDCorrMergingEfficiency(const AliFMDCorrMergingEfficiency& o);
51 virtual ~AliFMDCorrMergingEfficiency();
54 * @name Get corrections and parameters
59 * @param o Object to assign from
61 * @return Reference to this object
63 AliFMDCorrMergingEfficiency& operator=(const AliFMDCorrMergingEfficiency& o);
65 * Get the secondary correction @f$ c_{r,v}@f$
67 * @param d Detector number (1-3)
68 * @param r Ring identifier (I or O)
69 * @param v Primary interaction point @f$z@f$ coordinate
71 * @return The correction @f$ c_{r,v}@f$
73 TH1D* GetCorrection(UShort_t d, Char_t r, Double_t v) const;
75 * Get the secondary correction @f$ c_{r,v}@f$
77 * @param d Detector number (1-3)
78 * @param r Ring identifier (I or O)
79 * @param b Bin corresponding to the primary interaction point
80 * @f$z@f$ coordinate (1 based)
82 * @return The correction @f$ c_{r,v}@f$
84 TH1D* GetCorrection(UShort_t d, Char_t r, UShort_t b) const;
86 * Get the vertex axis used
90 const TAxis& GetVertexAxis() const { return fVertexAxis; }
95 * @name Set corrections and parameters
98 * Set the secondary map correction @f$ m_{r,v}(\eta)@f$.
99 * Note, that the object takes ownership of the passed pointer.
101 * @param d Detector number (1-3)
102 * @param r Ring identifier (I or O)
103 * @param v Primary interaction point @f$z@f$ coordinate
104 * @param h @f$ m_{r,v}(\eta)@f$
106 * @return true if operation succeeded
108 Bool_t SetCorrection(UShort_t d, Char_t r, Double_t v, TH1D* h);
110 * Set the secondary map correction @f$ m_{r,v}(\eta)@f$
111 * Note, that the object takes ownership of the passed pointer.
113 * @param d Detector number (1-3)
114 * @param r Ring identifier (I or O)
115 * @param b Bin corresponding to the primary interaction point
116 * @f$z@f$ coordinate (1 based)
117 * @param h @f$ m_{r,v}(\eta)@f$
119 * @return true if operation succeeded
121 Bool_t SetCorrection(UShort_t d, Char_t r, UShort_t b, TH1D* h);
123 * Set the vertex axis to use
125 * @param axis Vertex axis
127 void SetVertexAxis(const TAxis& axis);
129 * Set the vertex axis to use
131 * @param nBins Number of bins
135 void SetVertexAxis(Int_t nBins, Double_t min, Double_t max);
140 * @name Auxiliary member functions
143 * Declare this as a folder
145 * @return Always true
147 Bool_t IsFolder() const { return true; }
149 * Browse this object in the browser
153 void Browse(TBrowser* b);
159 void Print(Option_t* option="R") const; //*MENU*
163 * Find the vertex bin that corresponds to the passed vertex
165 * @param vertex The interaction points @f$z@f$-coordinate
167 * @return Vertex bin in @f$[1,N_{\mbox{vertex}}]@f$ or negative if
170 Int_t FindVertexBin(Double_t vertex) const;
172 * Get the index corresponding to the given ring
177 * @return Index (0 based) or negative in case of errors
179 Int_t GetRingIndex(UShort_t d, Char_t r) const;
181 * Get the ring array corresponding to the specified ring
186 * @return Pointer to ring array, or null in case of problems
188 TObjArray* GetRingArray(UShort_t d, Char_t r) const;
190 * Get the ring array corresponding to the specified ring
195 * @return Pointer to ring array, or newly created container
197 TObjArray* GetOrMakeRingArray(UShort_t d, Char_t r);
199 TObjArray fRingArray; // Array of per-ring, per-vertex 2nd map
200 TAxis fVertexAxis; // The vertex axis
201 ClassDef(AliFMDCorrMergingEfficiency,1); //
204 //____________________________________________________________________
206 AliFMDCorrMergingEfficiency::SetVertexAxis(Int_t nBins, Double_t min,
209 fVertexAxis.Set(nBins, min, max);
211 //____________________________________________________________________
213 AliFMDCorrMergingEfficiency::SetVertexAxis(const TAxis& e)
215 fVertexAxis.Set(e.GetNbins(), e.GetXmin(), e.GetXmax());