]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnValue.h
Update to the analysis on MC data only.
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnValue.h
1 //
2 // Class AliRsnValue
3 //
4 // Definition of a single value which can be computed
5 // from any of the defined input objects implemented
6 // in the resonance package.
7 //
8
9 #ifndef ALIRSNVALUE_H
10 #define ALIRSNVALUE_H
11
12 #include "TNamed.h"
13 #include "TArrayD.h"
14
15 class AliRsnPairDef;
16 class AliRsnMother;
17
18 class AliRsnValue : public TNamed
19 {
20   public:
21
22     enum EValueType
23     {
24       kTrack1P,
25       kTrack2P,
26       kTrack1Pt,
27       kTrack2Pt,
28       kPairInvMass,
29       kPairInvMassMC,
30       kPairInvMassRes,
31       kPairPt,
32       kPairEta,
33       kPairMt,
34       kPairY,
35       kPairCosThetaStar,
36       kPairCosThetaStar1,
37       kPairCosThetaStar2,
38       kPairCosThetaStarMC1,
39       kPairCosThetaStarMC2,
40       kEventMult,
41       kValueTypes
42     };
43
44     AliRsnValue();
45     AliRsnValue(const char *name, EValueType type, Int_t n, Double_t min, Double_t max);
46     AliRsnValue(const char *name, EValueType type, Double_t min, Double_t max, Double_t step);
47     AliRsnValue(const AliRsnValue& copy) : TNamed(copy),fType(copy.fType),fNBins(copy.fNBins),fMin(copy.fMin),fMax(copy.fMax),fValue(copy.fValue) {}
48     AliRsnValue& operator=(const AliRsnValue& copy) {SetName(copy.GetName());fType=copy.fType;fNBins=copy.fNBins;fMin=copy.fMin;fMax=copy.fMax;fValue=copy.fValue;return (*this);}
49     virtual ~AliRsnValue() { }
50     
51     //const char* GetName() const;
52     Int_t       GetNBins() const {return fNBins;}
53     Double_t    GetMin() const {return fMin;}
54     Double_t    GetMax() const {return fMax;}
55     TArrayD     GetArray() const;
56     Double_t    GetValue() const {return fValue;}
57     EValueType  GetValueType() {return fType;}
58
59     void        SetValueType(EValueType type) {fType = type;}
60     void        SetBins(Int_t n, Double_t min, Double_t max);
61     void        SetBins(Double_t min, Double_t max, Double_t step);
62     
63     Bool_t      Eval(AliRsnMother * const mother, AliRsnPairDef * const pairDef, AliRsnEvent * const event);
64
65   private:
66
67     EValueType fType;    // value type
68     Int_t      fNBins;   // number of bins (when applicable)
69     Double_t   fMin;     // lower edge
70     Double_t   fMax;     // upper edge
71     Double_t   fValue;   // computed value
72     
73     // ROOT dictionary
74     ClassDef(AliRsnValue, 1)
75 };
76
77 #endif