]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnValue.h
Added new possible values and removed non physical primaries from MC analysis
[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       kTrack1Px,
29       kTrack1Py,
30       kTrack1Pz,
31       kTrack2Px,
32       kTrack2Py,
33       kTrack2Pz,
34       kPairInvMass,
35       kPairInvMassMC,
36       kPairInvMassRes,
37       kPairPt,
38       kPairEta,
39       kPairMt,
40       kPairY,
41       kPairCosThetaStar,
42       kPairCosThetaStar1,
43       kPairCosThetaStar2,
44       kPairCosThetaStarMC1,
45       kPairCosThetaStarMC2,
46       kEventMult,
47       kValueTypes
48     };
49
50     AliRsnValue();
51     AliRsnValue(const char *name, EValueType type, Int_t n = 0, Double_t min = 0.0, Double_t max = 0.0);
52     AliRsnValue(const char *name, EValueType type, Double_t min, Double_t max, Double_t step);
53     AliRsnValue(const char *name, EValueType type, Int_t n, Double_t *array);
54     AliRsnValue(const AliRsnValue& copy) : TNamed(copy),fType(copy.fType),fValue(copy.fValue),fArray(copy.fArray) {}
55     AliRsnValue& operator=(const AliRsnValue& copy) {SetName(copy.GetName());fType=copy.fType;fValue=copy.fValue;fArray=copy.fArray;return (*this);}
56     virtual ~AliRsnValue() { }
57     
58     TArrayD     GetArray() const {return fArray;}
59     Double_t    GetValue() const {return fValue;}
60     EValueType  GetValueType() {return fType;}
61
62     void        SetValueType(EValueType type) {fType = type;}
63     void        SetBins(Int_t n, Double_t min, Double_t max);
64     void        SetBins(Double_t min, Double_t max, Double_t step);
65     void        SetBins(Int_t n, Double_t *array);
66     
67     Bool_t      Eval(AliRsnMother * const mother, AliRsnPairDef * const pairDef, AliRsnEvent * const event);
68
69   private:
70
71     EValueType fType;    // value type
72     Double_t   fValue;   // computed value
73     TArrayD    fArray;   // array of bins (when necessary)
74     
75     // ROOT dictionary
76     ClassDef(AliRsnValue, 1)
77 };
78
79 #endif