]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnValue.h
Major upgrade to the package, in order to speed-up the execution and remove some...
[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 "TArrayD.h"
13
14 class AliRsnPairDef;
15 class AliRsnMother;
16
17 class AliRsnValue : public TObject
18 {
19   public:
20
21     enum EValueType
22     {
23       kTrack1P,
24       kTrack2P,
25       kTrack1Pt,
26       kTrack2Pt,
27       kPairInvMass,
28       kPairInvMassMC,
29       kPairInvMassRes,
30       kPairPt,
31       kPairEta,
32       kPairMt,
33       kPairY,
34       kEventMult,
35       kValueTypes
36     };
37
38     AliRsnValue();
39     AliRsnValue(EValueType type, Int_t n, Double_t min, Double_t max);
40     AliRsnValue(EValueType type, Double_t min, Double_t max, Double_t step);
41     AliRsnValue(const AliRsnValue& copy) : TObject(copy),fType(copy.fType),fNBins(copy.fNBins),fMin(copy.fMin),fMax(copy.fMax),fValue(copy.fValue) {}
42     AliRsnValue& operator=(const AliRsnValue& copy) {fType=copy.fType;fNBins=copy.fNBins;fMin=copy.fMin;fMax=copy.fMax;fValue=copy.fValue;return (*this);}
43     virtual ~AliRsnValue() { }
44     
45     const char* GetName() const;
46     Int_t       GetNBins() const {return fNBins;}
47     Double_t    GetMin() const {return fMin;}
48     Double_t    GetMax() const {return fMax;}
49     TArrayD     GetArray() const;
50     Double_t    GetValue() const {return fValue;}
51     EValueType  GetValueType() {return fType;}
52
53     void        SetValueType(EValueType type) {fType = type;}
54     void        SetBins(Int_t n, Double_t min, Double_t max);
55     void        SetBins(Double_t min, Double_t max, Double_t step);
56     
57     Bool_t      Eval(AliRsnMother *mother, const AliRsnPairDef *pairDef, AliRsnEvent *event);
58
59   private:
60
61     EValueType fType;    // value type
62     Int_t      fNBins;   // number of bins (when applicable)
63     Double_t   fMin;     // lower edge
64     Double_t   fMax;     // upper edge
65     Double_t   fValue;   // computed value
66     
67     // ROOT dictionary
68     ClassDef(AliRsnValue, 1)
69 };
70
71 #endif