2 // This class contains the acceptance correction due to dead channels
5 #ifndef ALICENTRALCORRACCEPTANCE_H
6 #define ALICENTRALCORRACCEPTANCE_H
8 * @file AliCentralCorrAcceptance.h
9 * @author Hans Hjersing Dalsgaard
10 * @date Wed Mar 23 13:58:33 2011
15 * @ingroup pwg2_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 pwg2_forward_corr
29 class AliCentralCorrAcceptance : public TObject
35 AliCentralCorrAcceptance();
39 * @param o Object to copy from
41 AliCentralCorrAcceptance(const AliCentralCorrAcceptance& o);
46 virtual ~AliCentralCorrAcceptance();
49 * @name Get corrections and parameters
54 * @param o Object to assign from
56 * @return Reference to this object
58 AliCentralCorrAcceptance& operator=(const AliCentralCorrAcceptance& o);
60 * Get the acceptance correction @f$ a_{r,v}@f$
62 * @param v Primary interaction point @f$z@f$ coordinate
64 * @return The correction @f$ a_{r,v}@f$
66 TH1D* GetCorrection(Double_t v) const;
68 * Get the acceptance correction @f$ a_{r,v}@f$
70 * @param b Bin corresponding to the primary interaction point
71 * @f$z@f$ coordinate (1 based)
73 * @return The correction @f$ a_{r,v}@f$
75 TH1D* GetCorrection(UShort_t b) const;
77 * Get the vertex axis used
81 const TAxis& GetVertexAxis() const { return fVertexAxis; }
86 * @name Set corrections and parameters
89 * Set the acceptance correction @f$ a_{r,v}(\eta)@f$.
90 * Note, that the object takes ownership of the passed pointer.
92 * @param v Primary interaction point @f$z@f$ coordinate
93 * @param h @f$ a_{r,v}(\eta)@f$
95 * @return true if operation succeeded
97 Bool_t SetCorrection(Double_t v, TH1D* h);
99 * Set the acceptance correction @f$ a_{r,v}(\eta)@f$
100 * Note, that the object takes ownership of the passed pointer.
102 * @param b Bin corresponding to the primary interaction point
103 * @f$z@f$ coordinate (1 based)
104 * @param h @f$ a_{r,v}(\eta)@f$
106 * @return true if operation succeeded
108 Bool_t SetCorrection(UShort_t b, TH1D* h);
110 * Set the vertex axis to use
112 * @param axis Vertex axis
114 void SetVertexAxis(const TAxis& axis);
116 * Set the vertex axis to use
118 * @param nBins Number of bins
122 void SetVertexAxis(Int_t nBins, Double_t min, Double_t max);
127 * @name Auxiliary member functions
130 * Declare this as a folder
132 * @return Always true
134 Bool_t IsFolder() const { return true; }
136 * Browse this object in the browser
140 void Browse(TBrowser* b);
146 void Print(Option_t* option="R") const; //*MENU*
150 * Find the vertex bin that corresponds to the passed vertex
152 * @param vertex The interaction points @f$z@f$-coordinate
154 * @return Vertex bin in @f$[1,N_{\mbox{vertex}}]@f$ or negative if
157 Int_t FindVertexBin(Double_t vertex) const;
159 TObjArray fArray; // Array of per-vertex acceptance corr
160 TAxis fVertexAxis; // The vertex axis
161 ClassDef(AliCentralCorrAcceptance,1); // Acceptance correction due to dead areas
164 //____________________________________________________________________
166 AliCentralCorrAcceptance::SetVertexAxis(Int_t nBins, Double_t min,
169 fVertexAxis.Set(nBins, min, max);
171 //____________________________________________________________________
173 AliCentralCorrAcceptance::SetVertexAxis(const TAxis& e)
175 fVertexAxis.Set(e.GetNbins(), e.GetXmin(), e.GetXmax());