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 axis Vertex axis
137 void SetVertexAxis(Int_t nBins, Double_t min, Double_t max);
139 * Set the eta axis to use
141 * @param axis Eta axis
143 void SetEtaAxis(const TAxis& axis);
145 * Set the eta axis to use
147 * @param axis Eta axis
149 void SetEtaAxis(Int_t nBins, Double_t min, Double_t max);
154 * @name Auxiliary member functions
157 * Declare this as a folder
159 * @return Always true
161 Bool_t IsFolder() const { return true; }
163 * Browse this object in the browser
167 void Browse(TBrowser* b);
173 void Print(Option_t* option="R") const; //*MENU*
177 * Find the vertex bin that corresponds to the passed vertex
179 * @param vertex The interaction points @f$z@f$-coordinate
181 * @return Vertex bin in @f$[1,N_{\box{vertex}}]@f$ or negative if
184 Int_t FindVertexBin(Double_t vertex) const;
186 * Get the index corresponding to the given ring
191 * @return Index (0 based) or negative in case of errors
193 Int_t GetRingIndex(UShort_t d, Char_t r) const;
195 * Get the ring array corresponding to the specified ring
200 * @return Pointer to ring array, or null in case of problems
202 TObjArray* GetRingArray(UShort_t d, Char_t r) const;
204 * Get the ring array corresponding to the specified ring
209 * @return Pointer to ring array, or newly created container
211 TObjArray* GetOrMakeRingArray(UShort_t d, Char_t r);
213 TObjArray fRingArray; // Array of per-ring, per-vertex 2nd map
214 TAxis fVertexAxis; // The vertex axis
215 TAxis fEtaAxis; // The eta axis
216 ClassDef(AliFMDCorrSecondaryMap,1); //
219 //____________________________________________________________________
221 AliFMDCorrSecondaryMap::SetVertexAxis(Int_t nBins, Double_t min, Double_t max)
223 fVertexAxis.Set(nBins, min, max);
225 //____________________________________________________________________
227 AliFMDCorrSecondaryMap::SetVertexAxis(const TAxis& e)
229 fVertexAxis.Set(e.GetNbins(), e.GetXmin(), e.GetXmax());
231 //____________________________________________________________________
233 AliFMDCorrSecondaryMap::SetEtaAxis(Int_t nBins, Double_t min, Double_t max)
235 fEtaAxis.Set(nBins, min, max);
237 //____________________________________________________________________
239 AliFMDCorrSecondaryMap::SetEtaAxis(const TAxis& e)
241 fEtaAxis.Set(e.GetNbins(), e.GetXmin(), e.GetXmax());