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
13 * This class contains the merging efficiency correction.
15 * The secondary correction is given by
20 * These are generated from Monte-Carlo truth and ESD information.
22 * @ingroup pwg2_forward_corr
24 class AliFMDCorrMergingEfficiency : public TObject
30 AliFMDCorrMergingEfficiency();
34 * @param o Object to copy from
36 AliFMDCorrMergingEfficiency(const AliFMDCorrMergingEfficiency& o);
41 virtual ~AliFMDCorrMergingEfficiency();
44 * @name Get corrections and parameters
49 * @param o Object to assign from
51 * @return Reference to this object
53 AliFMDCorrMergingEfficiency& operator=(const AliFMDCorrMergingEfficiency& o);
55 * Get the secondary correction @f$ c_{r,v}@f$
57 * @param d Detector number (1-3)
58 * @param r Ring identifier (I or O)
59 * @param v Primary interaction point @f$z@f$ coordinate
61 * @return The correction @f$ c_{r,v}@f$
63 TH1D* GetCorrection(UShort_t d, Char_t r, Double_t v) const;
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 b Bin corresponding to the primary interaction point
70 * @f$z@f$ coordinate (1 based)
72 * @return The correction @f$ c_{r,v}@f$
74 TH1D* GetCorrection(UShort_t d, Char_t r, UShort_t b) const;
76 * Get the vertex axis used
80 const TAxis& GetVertexAxis() const { return fVertexAxis; }
85 * @name Set corrections and parameters
88 * Set the secondary map correction @f$ m_{r,v}(\eta)@f$.
89 * Note, that the object takes ownership of the passed pointer.
91 * @param d Detector number (1-3)
92 * @param r Ring identifier (I or O)
93 * @param v Primary interaction point @f$z@f$ coordinate
94 * @param h @f$ m_{r,v}(\eta)@f$
96 * @return true if operation succeeded
98 Bool_t SetCorrection(UShort_t d, Char_t r, Double_t v, TH1D* h);
100 * Set the secondary map correction @f$ m_{r,v}(\eta)@f$
101 * Note, that the object takes ownership of the passed pointer.
103 * @param d Detector number (1-3)
104 * @param r Ring identifier (I or O)
105 * @param b Bin corresponding to the primary interaction point
106 * @f$z@f$ coordinate (1 based)
107 * @param h @f$ m_{r,v}(\eta)@f$
109 * @return true if operation succeeded
111 Bool_t SetCorrection(UShort_t d, Char_t r, UShort_t b, TH1D* h);
113 * Set the vertex axis to use
115 * @param axis Vertex axis
117 void SetVertexAxis(const TAxis& axis);
119 * Set the vertex axis to use
121 * @param nBins Number of bins
125 void SetVertexAxis(Int_t nBins, Double_t min, Double_t max);
130 * @name Auxiliary member functions
133 * Declare this as a folder
135 * @return Always true
137 Bool_t IsFolder() const { return true; }
139 * Browse this object in the browser
143 void Browse(TBrowser* b);
149 void Print(Option_t* option="R") const; //*MENU*
153 * Find the vertex bin that corresponds to the passed vertex
155 * @param vertex The interaction points @f$z@f$-coordinate
157 * @return Vertex bin in @f$[1,N_{\mbox{vertex}}]@f$ or negative if
160 Int_t FindVertexBin(Double_t vertex) const;
162 * Get the index corresponding to the given ring
167 * @return Index (0 based) or negative in case of errors
169 Int_t GetRingIndex(UShort_t d, Char_t r) const;
171 * Get the ring array corresponding to the specified ring
176 * @return Pointer to ring array, or null in case of problems
178 TObjArray* GetRingArray(UShort_t d, Char_t r) const;
180 * Get the ring array corresponding to the specified ring
185 * @return Pointer to ring array, or newly created container
187 TObjArray* GetOrMakeRingArray(UShort_t d, Char_t r);
189 TObjArray fRingArray; // Array of per-ring, per-vertex 2nd map
190 TAxis fVertexAxis; // The vertex axis
191 ClassDef(AliFMDCorrMergingEfficiency,1); //
194 //____________________________________________________________________
196 AliFMDCorrMergingEfficiency::SetVertexAxis(Int_t nBins, Double_t min,
199 fVertexAxis.Set(nBins, min, max);
201 //____________________________________________________________________
203 AliFMDCorrMergingEfficiency::SetVertexAxis(const TAxis& e)
205 fVertexAxis.Set(e.GetNbins(), e.GetXmin(), e.GetXmax());