2 // This class contains the acceptance correction due to dead channels
5 #ifndef ALIFMDCORRACCEPTANCE_H
6 #define ALIFMDCORRACCEPTANCE_H
13 * This class contains the acceptance correction due to dead channels
15 * These are generated from the on-line dead channel calculations
17 * @ingroup pwg2_forward_corr
19 class AliFMDCorrAcceptance : public TObject
25 AliFMDCorrAcceptance();
29 * @param o Object to copy from
31 AliFMDCorrAcceptance(const AliFMDCorrAcceptance& o);
36 virtual ~AliFMDCorrAcceptance();
39 * @name Get corrections and parameters
44 * @param o Object to assign from
46 * @return Reference to this object
48 AliFMDCorrAcceptance& operator=(const AliFMDCorrAcceptance& o);
50 * Get the acceptance correction @f$ a_{r,v}@f$
52 * @param d Detector number (1-3)
53 * @param r Ring identifier (I or O)
54 * @param v Primary interaction point @f$z@f$ coordinate
56 * @return The correction @f$ a_{r,v}@f$
58 TH2D* GetCorrection(UShort_t d, Char_t r, Double_t v) const;
60 * Get the acceptance correction @f$ a_{r,v}@f$
62 * @param d Detector number (1-3)
63 * @param r Ring identifier (I or O)
64 * @param b Bin corresponding to the primary interaction point
65 * @f$z@f$ coordinate (1 based)
67 * @return The correction @f$ a_{r,v}@f$
69 TH2D* GetCorrection(UShort_t d, Char_t r, UShort_t b) const;
71 * Get the vertex axis used
75 const TAxis& GetVertexAxis() const { return fVertexAxis; }
80 * @name Set corrections and parameters
83 * Set the acceptance correction @f$ a_{r,v}(\eta)@f$.
84 * Note, that the object takes ownership of the passed pointer.
86 * @param d Detector number (1-3)
87 * @param r Ring identifier (I or O)
88 * @param v Primary interaction point @f$z@f$ coordinate
89 * @param h @f$ a_{r,v}(\eta)@f$
91 * @return true if operation succeeded
93 Bool_t SetCorrection(UShort_t d, Char_t r, Double_t v, TH2D* h);
95 * Set the acceptance correction @f$ a_{r,v}(\eta)@f$
96 * Note, that the object takes ownership of the passed pointer.
98 * @param d Detector number (1-3)
99 * @param r Ring identifier (I or O)
100 * @param b Bin corresponding to the primary interaction point
101 * @f$z@f$ coordinate (1 based)
102 * @param h @f$ a_{r,v}(\eta)@f$
104 * @return true if operation succeeded
106 Bool_t SetCorrection(UShort_t d, Char_t r, UShort_t b, TH2D* h);
108 * Set the vertex axis to use
110 * @param axis Vertex axis
112 void SetVertexAxis(const TAxis& axis);
114 * Set the vertex axis to use
116 * @param nBins Number of bins
120 void SetVertexAxis(Int_t nBins, Double_t min, Double_t max);
125 * @name Auxiliary member functions
128 * Declare this as a folder
130 * @return Always true
132 Bool_t IsFolder() const { return true; }
134 * Browse this object in the browser
138 void Browse(TBrowser* b);
144 void Print(Option_t* option="R") const; //*MENU*
148 * Find the vertex bin that corresponds to the passed vertex
150 * @param vertex The interaction points @f$z@f$-coordinate
152 * @return Vertex bin in @f$[1,N_{\mbox{vertex}}]@f$ or negative if
155 Int_t FindVertexBin(Double_t vertex) const;
157 * Get the index corresponding to the given ring
162 * @return Index (0 based) or negative in case of errors
164 Int_t GetRingIndex(UShort_t d, Char_t r) const;
166 * Get the ring array corresponding to the specified ring
171 * @return Pointer to ring array, or null in case of problems
173 TObjArray* GetRingArray(UShort_t d, Char_t r) const;
175 * Get the ring array corresponding to the specified ring
180 * @return Pointer to ring array, or newly created container
182 TObjArray* GetOrMakeRingArray(UShort_t d, Char_t r);
184 TObjArray fRingArray; // Array of per-ring, per-vertex 2nd map
185 TAxis fVertexAxis; // The vertex axis
186 ClassDef(AliFMDCorrAcceptance,1); // Acceptance correction due to dead areas
189 //____________________________________________________________________
191 AliFMDCorrAcceptance::SetVertexAxis(Int_t nBins, Double_t min,
194 fVertexAxis.Set(nBins, min, max);
196 //____________________________________________________________________
198 AliFMDCorrAcceptance::SetVertexAxis(const TAxis& e)
200 fVertexAxis.Set(e.GetNbins(), e.GetXmin(), e.GetXmax());