]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnFunctionAxis.h
Fixed some errors
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnFunctionAxis.h
1 //
2 // Class AliRsnFunctionAxis
3 //
4 // Histogram definition.
5 // Contains required informations to create a histogram
6 // with fixed bin size: number of bins, minimum and maximum.
7 // Variable bin sizes are not considered because they are
8 // not used as typical output of analysis in this package.
9 //
10
11 #ifndef ALIRSNFunctionAxis_H
12 #define ALIRSNFunctionAxis_H
13
14 class AliRsnPairDef;
15
16 class AliRsnFunctionAxis : public TObject
17 {
18   public:
19
20     enum EAxisType
21     {
22       kTrack1P,
23       kTrack2P,
24       kTrack1Pt,
25       kTrack2Pt,
26       kPairInvMass,
27       kPairInvMassMC,
28       kPairInvMassRes,
29       kPairPt,
30       kPairEta,
31       kEventMult,
32       kAxisTypes
33     };
34
35     enum EAxisObject
36     {
37       kParticle,
38       kPair,
39       kEvent,
40       kNone
41     };
42
43     AliRsnFunctionAxis();
44     AliRsnFunctionAxis(EAxisType type, Int_t n, Double_t min, Double_t max);
45     AliRsnFunctionAxis(EAxisType type, Double_t min, Double_t max, Double_t step);
46     virtual ~AliRsnFunctionAxis() { }
47
48     virtual const char* GetName() const;
49
50     Int_t       GetNBins() const {return fNBins;}
51     Double_t    GetMin() const {return fMin;}
52     Double_t    GetMax() const {return fMax;}
53     EAxisObject GetAxisObject();
54
55     void     SetType(EAxisType type) {fType = type;}
56     void     SetBins(Int_t n, Double_t min, Double_t max);
57     void     SetBins(Double_t min, Double_t max, Double_t step);
58
59     Double_t Eval(AliRsnDaughter *daughter);
60     Double_t Eval(AliRsnPairParticle *pair, AliRsnPairDef *pairDef);
61     Double_t Eval(AliRsnEvent *event);
62
63   private:
64
65     EAxisType fType;    // binning type
66
67     Int_t     fNBins;   // number of bins
68     Double_t  fMin;     // lower edge
69     Double_t  fMax;     // upper edge
70
71     // ROOT dictionary
72     ClassDef(AliRsnFunctionAxis, 1)
73 };
74
75 #endif