2 // This class contains the secondary correction and the double hit
3 // correction used in low-flux events.
5 #ifndef ALIROOT_PWG2_FORWARD_ANALYSIS_ALIFMDCORRSECONDARYMAP_H
6 #define ALIROOT_PWG2_FORWARD_ANALYSIS_ALIFMDCORRSECONDARYMAP_H
13 * This class contains the secondary correction.
15 * The secondary correction is given by
17 * c_{r,v}(\eta,\varphi) =
18 * \frac{\sum_i N_{ch,i,v,\mbox{primary}}(\eta,\varphi)}{
19 * \sum_i N_{ch,i,r,v,\mbox{FMD}}(\eta,\varphi)}
21 * where @f$N_{ch,i,v,\mbox{primary}}(\eta,\varphi)@f$ is the
22 * is the number of primary charged particles that fall within
23 * the @f$(\eta,\varphi)@f$ bin in event @f$i@f$ with vertex @f$v@f$,
24 * and is the total (primary <i>and</i> secondary) charged particles
25 * that hit ring @f$r@f$ within @f$(\eta,\varphi)@f$ bin in event
26 * @f$i@f$ with vertex @f$v@f$.
28 * These are generated from Monte-Carlo truth information.
30 * @ingroup pwg2_forward_corr
32 class AliFMDCorrSecondaryMap : public TObject
38 AliFMDCorrSecondaryMap();
42 * @param o Object to copy from
44 AliFMDCorrSecondaryMap(const AliFMDCorrSecondaryMap& o);
49 virtual ~AliFMDCorrSecondaryMap();
52 * @name Get corrections and parameters
57 * @param o Object to assign from
59 * @return Reference to this object
61 AliFMDCorrSecondaryMap& operator=(const AliFMDCorrSecondaryMap& o);
63 * Get the secondary correction @f$ c_{r,v}@f$
65 * @param d Detector number (1-3)
66 * @param r Ring identifier (I or O)
67 * @param v Primary interaction point @f$z@f$ coordinate
69 * @return The correction @f$ c_{r,v}@f$
71 TH2D* GetCorrection(UShort_t d, Char_t r, Double_t v) const;
73 * Get the secondary correction @f$ c_{r,v}@f$
75 * @param d Detector number (1-3)
76 * @param r Ring identifier (I or O)
77 * @param b Bin corresponding to the primary interaction point
78 * @f$z@f$ coordinate (1 based)
80 * @return The correction @f$ c_{r,v}@f$
82 TH2D* GetCorrection(UShort_t d, Char_t r, UShort_t b) const;
84 * Get the vertex axis used
88 const TAxis& GetVertexAxis() const { return fVertexAxis; }
90 * Get the eta axis used
94 const TAxis& GetEtaAxis() const { return fEtaAxis; }
99 * @name Set corrections and parameters
102 * Set the secondary map correction @f$ c_{r,v}(\eta,\varphi)@f$.
103 * Note, that the object takes ownership of the passed pointer.
105 * @param d Detector number (1-3)
106 * @param r Ring identifier (I or O)
107 * @param v Primary interaction point @f$z@f$ coordinate
108 * @param h @f$ c_{r,v}(\eta,\varphi)@f$
110 * @return true if operation succeeded
112 Bool_t SetCorrection(UShort_t d, Char_t r, Double_t v, TH2D* h);
114 * Set the secondary map correction @f$ c_{r,v}(\eta,\varphi)@f$
115 * Note, that the object takes ownership of the passed pointer.
117 * @param d Detector number (1-3)
118 * @param r Ring identifier (I or O)
119 * @param b Bin corresponding to the primary interaction point
120 * @f$z@f$ coordinate (1 based)
121 * @param h @f$ c_{r,v}(\eta,\varphi)@f$
123 * @return true if operation succeeded
125 Bool_t SetCorrection(UShort_t d, Char_t r, UShort_t b, TH2D* h);
127 * Set the vertex axis to use
129 * @param axis Vertex axis
131 void SetVertexAxis(const TAxis& axis);
133 * Set the vertex axis to use
135 * @param nBins Number of bins
139 void SetVertexAxis(Int_t nBins, Double_t min, Double_t max);
141 * Set the eta axis to use
143 * @param axis Eta axis
145 void SetEtaAxis(const TAxis& axis);
147 * Set the eta axis to use
149 * @param nBins Number of bins
153 void SetEtaAxis(Int_t nBins, Double_t min, Double_t max);
158 * @name Auxiliary member functions
161 * Declare this as a folder
163 * @return Always true
165 Bool_t IsFolder() const { return true; }
167 * Browse this object in the browser
171 void Browse(TBrowser* b);
177 void Print(Option_t* option="R") const; //*MENU*
181 * Find the vertex bin that corresponds to the passed vertex
183 * @param vertex The interaction points @f$z@f$-coordinate
185 * @return Vertex bin in @f$[1,N_{\mbox{vertex}}]@f$ or negative if
188 Int_t FindVertexBin(Double_t vertex) const;
190 * Get the index corresponding to the given ring
195 * @return Index (0 based) or negative in case of errors
197 Int_t GetRingIndex(UShort_t d, Char_t r) const;
199 * Get the ring array corresponding to the specified ring
204 * @return Pointer to ring array, or null in case of problems
206 TObjArray* GetRingArray(UShort_t d, Char_t r) const;
208 * Get the ring array corresponding to the specified ring
213 * @return Pointer to ring array, or newly created container
215 TObjArray* GetOrMakeRingArray(UShort_t d, Char_t r);
217 TObjArray fRingArray; // Array of per-ring, per-vertex 2nd map
218 TAxis fVertexAxis; // The vertex axis
219 TAxis fEtaAxis; // The eta axis
220 ClassDef(AliFMDCorrSecondaryMap,1); //
223 //____________________________________________________________________
225 AliFMDCorrSecondaryMap::SetVertexAxis(Int_t nBins, Double_t min, Double_t max)
227 fVertexAxis.Set(nBins, min, max);
229 //____________________________________________________________________
231 AliFMDCorrSecondaryMap::SetVertexAxis(const TAxis& e)
233 fVertexAxis.Set(e.GetNbins(), e.GetXmin(), e.GetXmax());
235 //____________________________________________________________________
237 AliFMDCorrSecondaryMap::SetEtaAxis(Int_t nBins, Double_t min, Double_t max)
239 fEtaAxis.Set(nBins, min, max);
241 //____________________________________________________________________
243 AliFMDCorrSecondaryMap::SetEtaAxis(const TAxis& e)
245 fEtaAxis.Set(e.GetNbins(), e.GetXmin(), e.GetXmax());