2 // This class contains the acceptance correction due to dead channels
5 #ifndef ALICENTRALCORRACCEPTANCE_H
6 #define ALICENTRALCORRACCEPTANCE_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 AliCentralCorrAcceptance : public TObject
25 AliCentralCorrAcceptance();
29 * @param o Object to copy from
31 AliCentralCorrAcceptance(const AliCentralCorrAcceptance& o);
36 virtual ~AliCentralCorrAcceptance();
39 * @name Get corrections and parameters
44 * @param o Object to assign from
46 * @return Reference to this object
48 AliCentralCorrAcceptance& operator=(const AliCentralCorrAcceptance& 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 TH1D* GetCorrection(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 TH1D* GetCorrection(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(Double_t v, TH1D* 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 b, TH1D* 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 TObjArray fArray; // Array of per-vertex acceptance corr
158 TAxis fVertexAxis; // The vertex axis
159 ClassDef(AliCentralCorrAcceptance,1); // Acceptance correction due to dead areas
162 //____________________________________________________________________
164 AliCentralCorrAcceptance::SetVertexAxis(Int_t nBins, Double_t min,
167 fVertexAxis.Set(nBins, min, max);
169 //____________________________________________________________________
171 AliCentralCorrAcceptance::SetVertexAxis(const TAxis& e)
173 fVertexAxis.Set(e.GetNbins(), e.GetXmin(), e.GetXmax());