]>
Commit | Line | Data |
---|---|---|
e2bafbbc | 1 | // |
32992791 | 2 | // *** Class AliRsnCut *** |
06351446 | 3 | // |
32992791 | 4 | // Cut base class: all other cuts inherit from it. |
5 | // The 'core' of the class is the method "IsSelected()" which | |
6 | // must be overloaded by any specific cut implementation. | |
06351446 | 7 | // |
32992791 | 8 | // This class provides some default instruments to check values |
9 | // agains a reference or an allowed range, in order to permit | |
10 | // a unique way to execute such kind of checks. | |
11 | // | |
12 | // authors: Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it) | |
13 | // Martin Vala (martin.vala@cern.ch) | |
e2bafbbc | 14 | // |
06351446 | 15 | |
16 | #ifndef ALIRSNCUT_H | |
17 | #define ALIRSNCUT_H | |
18 | ||
32992791 | 19 | #include "AliRsnTarget.h" |
06351446 | 20 | |
e2bafbbc | 21 | class AliRsnEvent; |
06351446 | 22 | |
32992791 | 23 | class AliRsnCut : public AliRsnTarget |
06351446 | 24 | { |
5eb970a4 | 25 | public: |
26 | ||
32992791 | 27 | AliRsnCut(const char *name = "dummy", RSNTARGET target = AliRsnTarget::kTargetTypes); |
28 | AliRsnCut(const char *name, RSNTARGET target, Int_t imin, Int_t imax=0 , Double_t dmin=0., Double_t dmax=0.); | |
29 | AliRsnCut(const char *name, RSNTARGET target, Double_t dmin, Double_t dmax=0., Int_t imin=0 , Int_t imax=0 ); | |
413bbf44 | 30 | AliRsnCut(const AliRsnCut& copy); |
31 | AliRsnCut& operator=(const AliRsnCut& copy); | |
32992791 | 32 | virtual ~AliRsnCut() { fEvent = 0x0; }; |
69fbb331 | 33 | |
32992791 | 34 | Int_t GetMinI() {return fMinI;} |
35 | Int_t GetMaxI() {return fMaxI;} | |
36 | Double_t GetMinD() {return fMinD;} | |
37 | Double_t GetMaxD() {return fMaxD;} | |
38 | Int_t GetCutValueI() {return fCutValueI;} | |
39 | Double_t GetCutValueD() {return fCutValueD;} | |
40 | Bool_t GetCutResult() {return fCutResult;} | |
69fbb331 | 41 | |
32992791 | 42 | void SetRangeI(Int_t min, Int_t max) {fMinI = min; fMaxI = max;} |
43 | void SetRangeD(Double_t min, Double_t max) {fMinD = min; fMaxD = max;} | |
44 | ||
45 | void SetValueI(Int_t value) {fMinI = value;} | |
46 | void SetValueD(Double_t value) {fMinD = value;} | |
5eb970a4 | 47 | |
69fbb331 | 48 | Bool_t OkValueI(); |
49 | Bool_t OkRangeI(); | |
50 | Bool_t OkValueD(); | |
51 | Bool_t OkRangeD(); | |
5eb970a4 | 52 | |
2dab9030 | 53 | virtual void SetEvent(AliRsnEvent *event); |
69fbb331 | 54 | AliRsnEvent* GetEvent() {return fEvent;} |
2dab9030 | 55 | |
32992791 | 56 | virtual Bool_t IsSelected(TObject *object); |
2dab9030 | 57 | virtual void Print(Option_t *opt = "") const; |
5eb970a4 | 58 | |
4fbb2459 | 59 | protected: |
5eb970a4 | 60 | |
32992791 | 61 | Int_t fMinI; // lower edge of INT range or ref. value for INT CUT |
62 | Int_t fMaxI; // upper edge of INT range (not used for value cuts) | |
63 | Double_t fMinD; // lower edge of DOUBLE range or ref. value for DOUBLE CUT | |
64 | Double_t fMaxD; // upper edge of DOUBLE range (not used for value cuts) | |
5eb970a4 | 65 | |
32992791 | 66 | Int_t fCutValueI; // cut value INT |
67 | Double_t fCutValueD; // cut value DOUBLE | |
2dab9030 | 68 | |
32992791 | 69 | Bool_t fCutResult; // tells if the cut is passed or not |
5eb970a4 | 70 | |
69fbb331 | 71 | AliRsnEvent *fEvent; //! pointer to current event (can be needed sometimes, but never streamed) |
413bbf44 | 72 | |
5eb970a4 | 73 | ClassDef(AliRsnCut, 1) |
06351446 | 74 | }; |
75 | ||
76 | #endif |