]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnValue.h
Invert check for the case that there is no data left in the buffer
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnValue.h
CommitLineData
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
2dab9030 12#include "TArrayD.h"
13
b9bbd271 14class AliRsnPairDef;
2dab9030 15class AliRsnMother;
b9bbd271 16
17class AliRsnValue : public TObject
18{
19 public:
20
2dab9030 21 enum EValueType
b9bbd271 22 {
b9bbd271 23 kTrack1P,
24 kTrack2P,
25 kTrack1Pt,
26 kTrack2Pt,
27 kPairInvMass,
28 kPairInvMassMC,
29 kPairInvMassRes,
30 kPairPt,
31 kPairEta,
32 kPairMt,
33 kPairY,
34 kEventMult,
2dab9030 35 kValueTypes
b9bbd271 36 };
37
2dab9030 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);}
b9bbd271 43 virtual ~AliRsnValue() { }
2dab9030 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;}
b9bbd271 52
2dab9030 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);
b9bbd271 58
59 private:
60
2dab9030 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
b9bbd271 67 // ROOT dictionary
68 ClassDef(AliRsnValue, 1)
69};
70
71#endif