]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/RESONANCES/AliRsnMiniAxis.h
Added quantities for V0 daughters + modified cuts for V0 + modified cuts and train...
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnMiniAxis.h
1 #ifndef ALIRSNMINIAXIS_H
2 #define ALIRSNMINIAXIS_H
3
4 //
5 // All implementations related to definition of an axis
6 // which is used in the output histogams.
7 // Simpler than TAxis, it defines an array of edges
8 // which is then ported to the output histogram definition.
9 // currently ported only in mini-package, but it could
10 // become a default also for general package.
11 //
12
13 #include "TObject.h"
14 #include "TArrayD.h"
15
16 class AliRsnMiniAxis : public TObject {
17
18 public:
19
20    AliRsnMiniAxis(Int_t valID = -1)                                       : fValueID(valID), fBins(0) { }
21    AliRsnMiniAxis(Int_t valID, Int_t nbins, Double_t min, Double_t max)   : fValueID(valID), fBins(0) {Set(nbins, min, max);}
22    AliRsnMiniAxis(Int_t valID, Double_t min, Double_t max, Double_t step) : fValueID(valID), fBins(0) {Set(min, max, step);}
23    AliRsnMiniAxis(Int_t valID, Int_t nbins, Double_t *bins)               : fValueID(valID), fBins(0) {Set(nbins, bins);}
24    AliRsnMiniAxis(const AliRsnMiniAxis &copy) : TObject(copy), fValueID(copy.fValueID), fBins(copy.fBins) { }
25    AliRsnMiniAxis &operator=(const AliRsnMiniAxis &copy) {if (this==&copy) return *this; fValueID = copy.fValueID; fBins = copy.fBins; return (*this);}
26
27    void      SetValueID(Int_t id)     {fValueID = id;}
28    Int_t     GetValueID() const       {return fValueID;}
29
30    Int_t     NBins()     {return  fBins.GetSize() - 1;}
31    TArrayD  *Bins()      {return &fBins;}
32    Double_t *BinArray()  {return  fBins.GetArray();}
33
34    void      Set(Int_t nbins, Double_t min, Double_t max);
35    void      Set(Int_t nbins, Double_t *bins);
36    void      Set(Double_t min, Double_t max, Double_t step);
37
38 private:
39
40    Int_t    fValueID;  // index of used value in task collection
41    TArrayD  fBins;     // bins
42
43    ClassDef(AliRsnMiniAxis,1)
44 };
45
46 #endif