]>
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> | |
298831c0 | 15 | #include <TString.h> |
16 | ||
c5e33610 | 17 | class AliVEvent; |
18 | class AliAODEvent; | |
19 | class AliESDEvent; | |
b425275c | 20 | class AliMixEventCutObj : public TObject { |
c5e33610 | 21 | public: |
f6817f48 | 22 | enum EEPAxis_t {kMultiplicity = 0, kZVertex = 1, kNumberV0s = 2, kNumberTracklets = 3, kCentrality = 4, kEventPlane = 5, |
dce94be0 | 23 | kEventPlaneV0A=6 , kEventPlaneV0C=7 , kAllEventAxis = 8 |
24 | }; | |
b425275c | 25 | |
35e08f92 | 26 | AliMixEventCutObj(AliMixEventCutObj::EEPAxis_t type = kMultiplicity, Float_t min = 0.0, Float_t max = 0.0, Float_t step = 1.0, const char *opt = ""); |
b425275c | 27 | AliMixEventCutObj(const AliMixEventCutObj &obj); |
28 | AliMixEventCutObj &operator=(const AliMixEventCutObj &obj); | |
29 | ||
30 | virtual void Print(const Option_t *) const; | |
31 | void PrintCurrentInterval(); | |
35e08f92 | 32 | void PrintValues(AliVEvent *main, AliVEvent *mix); |
b425275c | 33 | void Reset(); |
34 | void AddStep(); | |
35 | ||
36 | Bool_t HasMore() const; | |
c5e33610 | 37 | |
b425275c | 38 | Int_t GetNumberOfBins() const; |
286cc142 | 39 | Float_t GetCurrentMin() const { return fCurrentVal; } |
40 | Float_t GetCurrentMax() const { return fCurrentVal + fCutStep - fCutSmallVal; } | |
41 | Float_t GetMin() const { return fCutMin; } | |
42 | Float_t GetMax() const { return fCutMax; } | |
b425275c | 43 | Float_t GetStep() const { return fCutStep; } |
44 | Short_t GetType() const { return fCutType; } | |
45 | Int_t GetBinNumber(Float_t num) const; | |
46 | Int_t GetIndex(AliVEvent *ev); | |
24dc85b1 | 47 | Double_t GetValue(AliVEvent *ev); |
48 | Double_t GetValue(AliESDEvent *ev); | |
49 | Double_t GetValue(AliAODEvent *ev); | |
50 | ||
b425275c | 51 | const char *GetCutName(Int_t index = -1) const; |
52 | ||
53 | void SetCurrentValueToIndex(Int_t index); | |
54 | ||
f6817f48 | 55 | Bool_t IsValid(); |
56 | ||
b425275c | 57 | private: |
58 | Int_t fCutType; // cut type | |
298831c0 | 59 | TString fCutOpt; // cut option string |
b425275c | 60 | Float_t fCutMin; // cut min |
61 | Float_t fCutMax; // cut max | |
62 | Float_t fCutStep; // cut step | |
63 | Float_t fCutSmallVal; // small value | |
c5e33610 | 64 | |
b425275c | 65 | Float_t fCurrentVal; // current value |
c5e33610 | 66 | |
f6817f48 | 67 | ClassDef(AliMixEventCutObj, 3) |
c5e33610 | 68 | }; |
69 | ||
70 | #endif |