2 // This class contains the secondary correction
3 // for the central region
5 #ifndef ALICENTRALCORRSECONDARYMAP_H
6 #define ALICENTRALCORRSECONDARYMAP_H
8 * @file AliCentralCorrSecondaryMap.h
9 * @author Hans Hjersing Dalsgaard
10 * @date Wed Mar 23 13:59:03 2011
15 * @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 AliCentralCorrSecondaryMap : public TObject
35 AliCentralCorrSecondaryMap();
39 * @param o Object to copy from
41 AliCentralCorrSecondaryMap(const AliCentralCorrSecondaryMap& o);
46 virtual ~AliCentralCorrSecondaryMap();
49 * @name Get corrections and parameters
54 * @param o Object to assign from
56 * @return Reference to this object
58 AliCentralCorrSecondaryMap& operator=(const AliCentralCorrSecondaryMap& 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 TH2D* 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 TH2D* 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, TH2D* 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, TH2D* 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 * Get the index corresponding to the given ring
164 * @return Index (0 based) or negative in case of errors
167 TObjArray fArray; // Array of per-ring, per-vertex 2nd map
168 TAxis fVertexAxis; // The vertex axis
169 ClassDef(AliCentralCorrSecondaryMap,1); // SecondaryMap correction due to dead areas
172 //____________________________________________________________________
174 AliCentralCorrSecondaryMap::SetVertexAxis(Int_t nBins, Double_t min,
177 fVertexAxis.Set(nBins, min, max);
179 //____________________________________________________________________
181 AliCentralCorrSecondaryMap::SetVertexAxis(const TAxis& e)
183 fVertexAxis.Set(e.GetNbins(), e.GetXmin(), e.GetXmax());