]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FORWARD/analysis2/AliCentralCorrSecondaryMap.h
Mostly documentation changes.
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / AliCentralCorrSecondaryMap.h
CommitLineData
6f791cc3 1//
2// This class contains the secondary correction
3// for the central region
4//
5#ifndef ALICENTRALCORRSECONDARYMAP_H
6#define ALICENTRALCORRSECONDARYMAP_H
ffca499d 7/**
8 * @file AliCentralCorrSecondaryMap.h
9 * @author Hans Hjersing Dalsgaard
10 * @date Wed Mar 23 13:59:03 2011
11 *
12 * @brief
13 *
14 *
15 * @ingroup pwg2_forward_corr
16 */
6f791cc3 17#include <TObject.h>
18#include <TObjArray.h>
19#include <TAxis.h>
20class TH2D;
21
22/**
23 * This class contains the acceptance correction due to dead channels
24 *
25 * These are generated from the on-line dead channel calculations
26 *
27 * @ingroup pwg2_forward_corr
28 */
29class AliCentralCorrSecondaryMap : public TObject
30{
31public:
32 /**
33 * Default constructor
34 */
35 AliCentralCorrSecondaryMap();
36 /**
37 * Copy constructor
38 *
39 * @param o Object to copy from
40 */
41 AliCentralCorrSecondaryMap(const AliCentralCorrSecondaryMap& o);
42 /**
43 * Destructor
44 *
45 */
46 virtual ~AliCentralCorrSecondaryMap();
47 /**
48 * @{
49 * @name Get corrections and parameters
50 */
51 /**
52 * Assignment operator
53 *
54 * @param o Object to assign from
55 *
56 * @return Reference to this object
57 */
58 AliCentralCorrSecondaryMap& operator=(const AliCentralCorrSecondaryMap& o);
59 /**
60 * Get the acceptance correction @f$ a_{r,v}@f$
61 *
6f791cc3 62 * @param v Primary interaction point @f$z@f$ coordinate
63 *
64 * @return The correction @f$ a_{r,v}@f$
65 */
66 TH2D* GetCorrection(Double_t v) const;
67 /**
68 * Get the acceptance correction @f$ a_{r,v}@f$
69 *
6f791cc3 70 * @param b Bin corresponding to the primary interaction point
71 * @f$z@f$ coordinate (1 based)
72 *
73 * @return The correction @f$ a_{r,v}@f$
74 */
75 TH2D* GetCorrection(UShort_t b) const;
76 /**
77 * Get the vertex axis used
78 *
79 * @return vertex axis
80 */
81 const TAxis& GetVertexAxis() const { return fVertexAxis; }
82 /* @} */
83
84 /**
85 * @{
86 * @name Set corrections and parameters
87 */
88 /**
89 * Set the acceptance correction @f$ a_{r,v}(\eta)@f$.
90 * Note, that the object takes ownership of the passed pointer.
91 *
6f791cc3 92 * @param v Primary interaction point @f$z@f$ coordinate
93 * @param h @f$ a_{r,v}(\eta)@f$
94 *
95 * @return true if operation succeeded
96 */
97 Bool_t SetCorrection(Double_t v, TH2D* h);
98 /**
99 * Set the acceptance correction @f$ a_{r,v}(\eta)@f$
100 * Note, that the object takes ownership of the passed pointer.
101 *
6f791cc3 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$
105 *
106 * @return true if operation succeeded
107 */
108 Bool_t SetCorrection(UShort_t b, TH2D* h);
109 /**
110 * Set the vertex axis to use
111 *
112 * @param axis Vertex axis
113 */
114 void SetVertexAxis(const TAxis& axis);
115 /**
116 * Set the vertex axis to use
117 *
118 * @param nBins Number of bins
119 * @param min Minimum
120 * @param max Maximum
121 */
122 void SetVertexAxis(Int_t nBins, Double_t min, Double_t max);
123 /* @} */
124
125 /**
126 * @{
127 * @name Auxiliary member functions
128 */
129 /**
130 * Declare this as a folder
131 *
132 * @return Always true
133 */
134 Bool_t IsFolder() const { return true; }
135 /**
136 * Browse this object in the browser
137 *
138 * @param b
139 */
140 void Browse(TBrowser* b);
141 /**
142 * Print this object
143 *
144 * @param option
145 */
146 void Print(Option_t* option="R") const; //*MENU*
147 /* @} */
148protected:
149 /**
150 * Find the vertex bin that corresponds to the passed vertex
151 *
152 * @param vertex The interaction points @f$z@f$-coordinate
153 *
154 * @return Vertex bin in @f$[1,N_{\mbox{vertex}}]@f$ or negative if
155 * out of range
156 */
157 Int_t FindVertexBin(Double_t vertex) const;
158 /**
159 * Get the index corresponding to the given ring
160 *
161 * @param d Detector
162 * @param r Ring
163 *
164 * @return Index (0 based) or negative in case of errors
165 */
166
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
170};
171
172//____________________________________________________________________
173inline void
174AliCentralCorrSecondaryMap::SetVertexAxis(Int_t nBins, Double_t min,
175 Double_t max)
176{
177 fVertexAxis.Set(nBins, min, max);
178}
179//____________________________________________________________________
180inline void
181AliCentralCorrSecondaryMap::SetVertexAxis(const TAxis& e)
182{
183 fVertexAxis.Set(e.GetNbins(), e.GetXmin(), e.GetXmax());
184}
185#endif
186// Local Variables:
187// mode: C++
188// End: