AliPhysics  ebc57ae (ebc57ae)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliFMDCorrAcceptance.h
Go to the documentation of this file.
1 //
2 // This class contains the acceptance correction due to dead channels
3 //
4 //
5 #ifndef ALIFMDCORRACCEPTANCE_H
6 #define ALIFMDCORRACCEPTANCE_H
7 
17 #include <TObject.h>
18 #include <TObjArray.h>
19 #include <TAxis.h>
20 class TH2D;
21 class TH1D;
22 
31 {
32 public:
47  virtual ~AliFMDCorrAcceptance();
69  TH2D* GetCorrection(UShort_t d, Char_t r, Double_t v) const;
80  TH2D* GetCorrection(UShort_t d, Char_t r, UShort_t b) const;
100  TH1D* GetPhiAcceptance(UShort_t d, Char_t r, UShort_t b) const;
106  const TAxis& GetVertexAxis() const { return fVertexAxis; }
111  Bool_t HasOverflow() const { return fHasOverflow; }
112  /* @} */
113 
148  void SetVertexAxis(const TAxis& axis);
156  void SetVertexAxis(Int_t nBins, Double_t min, Double_t max);
162  void SetHasOverflow(Bool_t present=true) { fHasOverflow = present; }
163  /* @} */
164 
174  Bool_t IsFolder() const { return true; }
180  void Browse(TBrowser* b);
186  void Print(Option_t* option="R") const; //*MENU*
187  void ls(Option_t* option="") const; //*MENU*
188  // void Draw(Option_t* option="");
189  // void SaveAs(const Char_t* filename, Option_t* option="colz") const;
190  /* @} */
191 protected:
200  Int_t FindVertexBin(Double_t vertex) const;
209  Int_t GetRingIndex(UShort_t d, Char_t r) const;
219  TObjArray* GetRingArray(const TObjArray& m, UShort_t d, Char_t r) const;
230  TObject* GetObject(const TObjArray& m, UShort_t d,
231  Char_t r, UShort_t b) const;
232 
233  void FillCache() const;
234 
235  TObjArray fRingArray; // Array of per-ring, per-vertex 2d map
236  mutable TObjArray* fCache;
237  TAxis fVertexAxis; // The vertex axis
238  Bool_t fHasOverflow; // Whether we have the overflow bin set
239  ClassDef(AliFMDCorrAcceptance,2); // Acceptance correction due to dead areas
240 };
241 
242 //____________________________________________________________________
243 inline void
245  Double_t max)
246 {
247  fVertexAxis.Set(nBins, min, max);
248 }
249 //____________________________________________________________________
250 inline void
252 {
253  fVertexAxis.Set(e.GetNbins(), e.GetXmin(), e.GetXmax());
254 }
255 #endif
256 // Local Variables:
257 // mode: C++
258 // End:
TH2D * GetCorrection(UShort_t d, Char_t r, Double_t v) const
double Double_t
Definition: External.C:58
Int_t GetRingIndex(UShort_t d, Char_t r) const
void ls(Option_t *option="") const
char Char_t
Definition: External.C:18
AliFMDCorrAcceptance & operator=(const AliFMDCorrAcceptance &o)
TAxis fVertexAxis
Array of per-ring, per-vertex 1d factors.
TH1D * GetPhiAcceptance(UShort_t d, Char_t r, Double_t v) const
TObjArray * GetRingArray(const TObjArray &m, UShort_t d, Char_t r) const
void SetVertexAxis(const TAxis &axis)
int Int_t
Definition: External.C:63
TObject * GetObject(const TObjArray &m, UShort_t d, Char_t r, UShort_t b) const
ClassDef(AliFMDCorrAcceptance, 2)
Definition: External.C:228
Definition: External.C:212
void SetHasOverflow(Bool_t present=true)
const TAxis & GetVertexAxis() const
void Print(Option_t *option="R") const
unsigned short UShort_t
Definition: External.C:28
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
Int_t FindVertexBin(Double_t vertex) const
TObjArray * GetOrMakeRingArray(TObjArray &m, UShort_t d, Char_t r) const
Bool_t SetCorrection(UShort_t d, Char_t r, Double_t v, TH2D *h)