]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnValue.h
Added the 'const' keyword to the pointer-returning getters in AliRsnCutESD2010 and...
[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 #include "AliESDtrackCuts.h"
15
16 class AliRsnPairDef;
17 class AliRsnMother;
18
19 class AliRsnValue : public TNamed
20 {
21   public:
22
23     enum EValueType
24     {
25       kTrack1P,
26       kTrack2P,
27       kTrack1Pt,
28       kTrack2Pt,
29       kTrack1Px,
30       kTrack1Py,
31       kTrack1Pz,
32       kTrack2Px,
33       kTrack2Py,
34       kTrack2Pz,
35       kPairInvMass,
36       kPairInvMassMC,
37       kPairInvMassRes,
38       kPairPt,
39       kPairEta,
40       kPairMt,
41       kPairY,
42       kPairPhi,
43       kPairPhiMC,
44       kPairPtRatio,
45       kPairDipAngle,
46       kPairCosThetaStar,
47       kPairCosThetaStar1,
48       kPairCosThetaStar2,
49       kPairCosThetaStarMC1,
50       kPairCosThetaStarMC2,
51       kAngleToLeading,
52       kLeadingPt,
53       kQInv,
54       kEventMult,
55       kEventMultESDcuts,
56       kValueTypes
57     };
58
59     AliRsnValue();
60     AliRsnValue(const char *name, EValueType type, Int_t n = 0, Double_t min = 0.0, Double_t max = 0.0);
61     AliRsnValue(const char *name, EValueType type, Double_t min, Double_t max, Double_t step);
62     AliRsnValue(const char *name, EValueType type, Int_t n, Double_t *array);
63     AliRsnValue(const AliRsnValue& copy);
64     AliRsnValue& operator=(const AliRsnValue& copy);
65     virtual ~AliRsnValue() { }
66     
67     TArrayD                GetArray() const {return fArray;}
68     Double_t               GetValue() const {return fValue;}
69     EValueType             GetValueType() const {return fType;}
70     const AliESDtrackCuts* GetCuts() const {return &fESDCuts;}
71
72     void        SetValueType(EValueType type) {fType = type;}
73     void        SetBins(Int_t n, Double_t min, Double_t max);
74     void        SetBins(Double_t min, Double_t max, Double_t step);
75     void        SetBins(Int_t n, Double_t *array);
76     void        Set(EValueType type, Int_t n = 0, Double_t min = 0.0, Double_t max = 0.0) {fType = type; SetBins(n, min, max);}
77     void        Set(EValueType type, Double_t min, Double_t max, Double_t step) {fType = type; SetBins(min, max, step);}
78     void        Set(EValueType type, Int_t n, Double_t *array) {fType = type; SetBins(n, array);}
79     
80     virtual Bool_t  Eval(AliRsnMother * const mother, AliRsnPairDef * const pairDef, AliRsnEvent * const event);
81     virtual Bool_t  Eval(AliRsnDaughter * const daughter, AliRsnEvent * const event);
82     virtual void    Print(Option_t *option = "") const;
83
84   protected:
85   
86     Double_t        fValue;   // computed value
87     EValueType      fType;    // value type
88     TArrayD         fArray;   // array of bins (when necessary)
89     AliESDtrackCuts fESDCuts; // ESD track cuts used for a way to compute multiplicity
90     
91     // ROOT dictionary
92     ClassDef(AliRsnValue, 1)
93 };
94
95 #endif