]>
Commit | Line | Data |
---|---|---|
b9bbd271 | 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 | ||
0d73200d | 12 | #include "TNamed.h" |
2dab9030 | 13 | #include "TArrayD.h" |
14 | ||
b9bbd271 | 15 | class AliRsnPairDef; |
2dab9030 | 16 | class AliRsnMother; |
b9bbd271 | 17 | |
0d73200d | 18 | class AliRsnValue : public TNamed |
b9bbd271 | 19 | { |
20 | public: | |
21 | ||
2dab9030 | 22 | enum EValueType |
b9bbd271 | 23 | { |
b9bbd271 | 24 | kTrack1P, |
25 | kTrack2P, | |
26 | kTrack1Pt, | |
27 | kTrack2Pt, | |
3c07ce75 | 28 | kTrack1Px, |
29 | kTrack1Py, | |
30 | kTrack1Pz, | |
31 | kTrack2Px, | |
32 | kTrack2Py, | |
33 | kTrack2Pz, | |
b9bbd271 | 34 | kPairInvMass, |
35 | kPairInvMassMC, | |
36 | kPairInvMassRes, | |
37 | kPairPt, | |
38 | kPairEta, | |
39 | kPairMt, | |
40 | kPairY, | |
2e521c29 | 41 | kPairCosThetaStar, |
cadcd9e0 | 42 | kPairCosThetaStar1, |
43 | kPairCosThetaStar2, | |
44 | kPairCosThetaStarMC1, | |
45 | kPairCosThetaStarMC2, | |
11ba7ebc | 46 | kAngleToLeading, |
47 | kLeadingPt, | |
2467e7c3 | 48 | kQInv, |
b9bbd271 | 49 | kEventMult, |
2dab9030 | 50 | kValueTypes |
b9bbd271 | 51 | }; |
52 | ||
2dab9030 | 53 | AliRsnValue(); |
b2b08ca2 | 54 | AliRsnValue(const char *name, EValueType type, Int_t n = 0, Double_t min = 0.0, Double_t max = 0.0); |
0d73200d | 55 | AliRsnValue(const char *name, EValueType type, Double_t min, Double_t max, Double_t step); |
b2b08ca2 | 56 | AliRsnValue(const char *name, EValueType type, Int_t n, Double_t *array); |
63a2738c | 57 | AliRsnValue(const AliRsnValue& copy) : TNamed(copy),fValue(copy.fValue),fType(copy.fType),fArray(copy.fArray) {} |
b2b08ca2 | 58 | AliRsnValue& operator=(const AliRsnValue& copy) {SetName(copy.GetName());fType=copy.fType;fValue=copy.fValue;fArray=copy.fArray;return (*this);} |
b9bbd271 | 59 | virtual ~AliRsnValue() { } |
2dab9030 | 60 | |
b2b08ca2 | 61 | TArrayD GetArray() const {return fArray;} |
2dab9030 | 62 | Double_t GetValue() const {return fValue;} |
63 | EValueType GetValueType() {return fType;} | |
b9bbd271 | 64 | |
2dab9030 | 65 | void SetValueType(EValueType type) {fType = type;} |
66 | void SetBins(Int_t n, Double_t min, Double_t max); | |
67 | void SetBins(Double_t min, Double_t max, Double_t step); | |
b2b08ca2 | 68 | void SetBins(Int_t n, Double_t *array); |
69fbb331 | 69 | void Set(EValueType type, Int_t n = 0, Double_t min = 0.0, Double_t max = 0.0) {fType = type; SetBins(n, min, max);} |
70 | void Set(EValueType type, Double_t min, Double_t max, Double_t step) {fType = type; SetBins(min, max, step);} | |
71 | void Set(EValueType type, Int_t n, Double_t *array) {fType = type; SetBins(n, array);} | |
2dab9030 | 72 | |
2e521c29 | 73 | Bool_t Eval(AliRsnMother * const mother, AliRsnPairDef * const pairDef, AliRsnEvent * const event); |
69fbb331 | 74 | Bool_t Eval(AliRsnDaughter * const daughter, AliRsnEvent * const event); |
c18b1218 | 75 | void Print(Option_t *option = "") const; |
b9bbd271 | 76 | |
63a2738c | 77 | protected: |
78 | ||
79 | Double_t fValue; // computed value | |
80 | ||
b9bbd271 | 81 | private: |
82 | ||
2dab9030 | 83 | EValueType fType; // value type |
b2b08ca2 | 84 | TArrayD fArray; // array of bins (when necessary) |
2dab9030 | 85 | |
b9bbd271 | 86 | // ROOT dictionary |
87 | ClassDef(AliRsnValue, 1) | |
88 | }; | |
89 | ||
90 | #endif |