]>
Commit | Line | Data |
---|---|---|
c5e33610 | 1 | // |
2 | // Class AliMixEventCutObj | |
3 | // | |
4 | // AliMixEventCutObj object contains information about one cut on for event mixing | |
5 | // used by AliMixEventPool class | |
6 | // | |
b425275c | 7 | // authors: |
c5e33610 | 8 | // Martin Vala (martin.vala@cern.ch) |
9 | // | |
10 | ||
11 | #ifndef ALIMIXEVENTCUTOBJ_H | |
12 | #define ALIMIXEVENTCUTOBJ_H | |
13 | ||
14 | #include <TObject.h> | |
15 | class AliVEvent; | |
16 | class AliAODEvent; | |
17 | class AliESDEvent; | |
b425275c | 18 | class AliMixEventCutObj : public TObject { |
c5e33610 | 19 | public: |
b425275c | 20 | enum EEPAxis_t {kMultiplicity = 0, kZVertex = 1, kNumberV0s = 2, kNumberTracklets = 3, kAllEventAxis = 4}; |
21 | ||
22 | AliMixEventCutObj(EEPAxis_t type = kMultiplicity, Float_t min = 0.0, Float_t max = 0.0, Float_t step = 1.0); | |
23 | AliMixEventCutObj(const AliMixEventCutObj &obj); | |
24 | AliMixEventCutObj &operator=(const AliMixEventCutObj &obj); | |
25 | ||
26 | virtual void Print(const Option_t *) const; | |
27 | void PrintCurrentInterval(); | |
24dc85b1 | 28 | void PrintValues(AliVEvent *main, AliVEvent* mix); |
b425275c | 29 | void Reset(); |
30 | void AddStep(); | |
31 | ||
32 | Bool_t HasMore() const; | |
c5e33610 | 33 | |
b425275c | 34 | Int_t GetNumberOfBins() const; |
35 | Float_t GetMin() const { return fCurrentVal; } | |
36 | Float_t GetMax() const { return fCurrentVal + fCutStep - fCutSmallVal; } | |
37 | Float_t GetStep() const { return fCutStep; } | |
38 | Short_t GetType() const { return fCutType; } | |
39 | Int_t GetBinNumber(Float_t num) const; | |
40 | Int_t GetIndex(AliVEvent *ev); | |
24dc85b1 | 41 | Double_t GetValue(AliVEvent *ev); |
42 | Double_t GetValue(AliESDEvent *ev); | |
43 | Double_t GetValue(AliAODEvent *ev); | |
44 | ||
b425275c | 45 | const char *GetCutName(Int_t index = -1) const; |
46 | ||
47 | void SetCurrentValueToIndex(Int_t index); | |
48 | ||
49 | private: | |
50 | Int_t fCutType; // cut type | |
51 | Float_t fCutMin; // cut min | |
52 | Float_t fCutMax; // cut max | |
53 | Float_t fCutStep; // cut step | |
54 | Float_t fCutSmallVal; // small value | |
c5e33610 | 55 | |
b425275c | 56 | Float_t fCurrentVal; // current value |
c5e33610 | 57 | |
b425275c | 58 | ClassDef(AliMixEventCutObj, 1) |
c5e33610 | 59 | }; |
60 | ||
61 | #endif |