]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnValue.h
Added the possibility to compute theta* of a pair
[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       kPairCosThetaStar1,
36       kPairCosThetaStar2,
37       kPairCosThetaStarMC1,
38       kPairCosThetaStarMC2,
39       kEventMult,
40       kValueTypes
41     };
42
43     AliRsnValue();
44     AliRsnValue(const char *name, EValueType type, Int_t n, Double_t min, Double_t max);
45     AliRsnValue(const char *name, EValueType type, Double_t min, Double_t max, Double_t step);
46     AliRsnValue(const AliRsnValue& copy) : TNamed(copy),fType(copy.fType),fNBins(copy.fNBins),fMin(copy.fMin),fMax(copy.fMax),fValue(copy.fValue) {}
47     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);}
48     virtual ~AliRsnValue() { }
49     
50     //const char* GetName() const;
51     Int_t       GetNBins() const {return fNBins;}
52     Double_t    GetMin() const {return fMin;}
53     Double_t    GetMax() const {return fMax;}
54     TArrayD     GetArray() const;
55     Double_t    GetValue() const {return fValue;}
56     EValueType  GetValueType() {return fType;}
57
58     void        SetValueType(EValueType type) {fType = type;}
59     void        SetBins(Int_t n, Double_t min, Double_t max);
60     void        SetBins(Double_t min, Double_t max, Double_t step);
61     
62     Bool_t      Eval(AliRsnMother *mother, const AliRsnPairDef *pairDef, AliRsnEvent *event);
63
64   private:
65
66     EValueType fType;    // value type
67     Int_t      fNBins;   // number of bins (when applicable)
68     Double_t   fMin;     // lower edge
69     Double_t   fMax;     // upper edge
70     Double_t   fValue;   // computed value
71     
72     // ROOT dictionary
73     ClassDef(AliRsnValue, 1)
74 };
75
76 #endif