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