2 // This class contains the acceptance correction due to dead channels
5 #ifndef ALIFMDCORRACCEPTANCE_H
6 #define ALIFMDCORRACCEPTANCE_H
8 * @file AliFMDCorrAcceptance.h
9 * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
10 * @date Wed Mar 23 14:00:40 2011
14 * @ingroup pwglf_forward_corr
18 #include <TObjArray.h>
23 * This class contains the acceptance correction due to dead channels
25 * These are generated from the on-line dead channel calculations
27 * @ingroup pwglf_forward_corr
29 class AliFMDCorrAcceptance : public TObject
35 AliFMDCorrAcceptance();
39 * @param o Object to copy from
41 AliFMDCorrAcceptance(const AliFMDCorrAcceptance& o);
46 virtual ~AliFMDCorrAcceptance();
49 * @name Get corrections and parameters
54 * @param o Object to assign from
56 * @return Reference to this object
58 AliFMDCorrAcceptance& operator=(const AliFMDCorrAcceptance& o);
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 v Primary interaction point @f$z@f$ coordinate
66 * @return The correction @f$ a_{r,v}@f$
68 TH2D* GetCorrection(UShort_t d, Char_t r, Double_t v) const;
70 * Get the acceptance correction @f$ a_{r,v}@f$
72 * @param d Detector number (1-3)
73 * @param r Ring identifier (I or O)
74 * @param b Bin corresponding to the primary interaction point
75 * @f$z@f$ coordinate (1 based)
77 * @return The correction @f$ a_{r,v}@f$
79 TH2D* GetCorrection(UShort_t d, Char_t r, UShort_t b) const;
81 * Get the vertex axis used
85 const TAxis& GetVertexAxis() const { return fVertexAxis; }
90 * @name Set corrections and parameters
93 * Set the acceptance correction @f$ a_{r,v}(\eta)@f$.
94 * Note, that the object takes ownership of the passed pointer.
96 * @param d Detector number (1-3)
97 * @param r Ring identifier (I or O)
98 * @param v Primary interaction point @f$z@f$ coordinate
99 * @param h @f$ a_{r,v}(\eta)@f$
101 * @return true if operation succeeded
103 Bool_t SetCorrection(UShort_t d, Char_t r, Double_t v, TH2D* h);
105 * Set the acceptance correction @f$ a_{r,v}(\eta)@f$
106 * Note, that the object takes ownership of the passed pointer.
108 * @param d Detector number (1-3)
109 * @param r Ring identifier (I or O)
110 * @param b Bin corresponding to the primary interaction point
111 * @f$z@f$ coordinate (1 based)
112 * @param h @f$ a_{r,v}(\eta)@f$
114 * @return true if operation succeeded
116 Bool_t SetCorrection(UShort_t d, Char_t r, UShort_t b, TH2D* h);
118 * Set the vertex axis to use
120 * @param axis Vertex axis
122 void SetVertexAxis(const TAxis& axis);
124 * Set the vertex axis to use
126 * @param nBins Number of bins
130 void SetVertexAxis(Int_t nBins, Double_t min, Double_t max);
135 * @name Auxiliary member functions
138 * Declare this as a folder
140 * @return Always true
142 Bool_t IsFolder() const { return true; }
144 * Browse this object in the browser
148 void Browse(TBrowser* b);
154 void Print(Option_t* option="R") const; //*MENU*
158 * Find the vertex bin that corresponds to the passed vertex
160 * @param vertex The interaction points @f$z@f$-coordinate
162 * @return Vertex bin in @f$[1,N_{\mbox{vertex}}]@f$ or negative if
165 Int_t FindVertexBin(Double_t vertex) const;
167 * Get the index corresponding to the given ring
172 * @return Index (0 based) or negative in case of errors
174 Int_t GetRingIndex(UShort_t d, Char_t r) const;
176 * Get the ring array corresponding to the specified ring
181 * @return Pointer to ring array, or null in case of problems
183 TObjArray* GetRingArray(UShort_t d, Char_t r) const;
185 * Get the ring array corresponding to the specified ring
190 * @return Pointer to ring array, or newly created container
192 TObjArray* GetOrMakeRingArray(UShort_t d, Char_t r);
194 TObjArray fRingArray; // Array of per-ring, per-vertex 2nd map
195 TAxis fVertexAxis; // The vertex axis
196 ClassDef(AliFMDCorrAcceptance,1); // Acceptance correction due to dead areas
199 //____________________________________________________________________
201 AliFMDCorrAcceptance::SetVertexAxis(Int_t nBins, Double_t min,
204 fVertexAxis.Set(nBins, min, max);
206 //____________________________________________________________________
208 AliFMDCorrAcceptance::SetVertexAxis(const TAxis& e)
210 fVertexAxis.Set(e.GetNbins(), e.GetXmin(), e.GetXmax());