2 // *** Class AliRsnCut ***
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.
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.
12 // authors: Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
13 // Martin Vala (martin.vala@cern.ch)
19 #include "AliRsnTarget.h"
23 class AliRsnCut : public AliRsnTarget {
26 AliRsnCut(const char *name = "dummy", RSNTARGET target = AliRsnTarget::kTargetTypes);
27 AliRsnCut(const char *name, RSNTARGET target, Int_t imin, Int_t imax = 0 , Double_t dmin = 0., Double_t dmax = 0.);
28 AliRsnCut(const char *name, RSNTARGET target, Double_t dmin, Double_t dmax = 0., Int_t imin = 0 , Int_t imax = 0);
29 AliRsnCut(const AliRsnCut& copy);
30 AliRsnCut& operator=(const AliRsnCut& copy);
31 virtual ~AliRsnCut() { };
33 Int_t GetMinI() {return fMinI;}
34 Int_t GetMaxI() {return fMaxI;}
35 Double_t GetMinD() {return fMinD;}
36 Double_t GetMaxD() {return fMaxD;}
37 Int_t GetCutValueI() {return fCutValueI;}
38 Double_t GetCutValueD() {return fCutValueD;}
39 Bool_t GetCutResult() {return fCutResult;}
41 void SetRangeI(Int_t min, Int_t max) {fMinI = min; fMaxI = max;}
42 void SetRangeD(Double_t min, Double_t max) {fMinD = min; fMaxD = max;}
44 void SetValueI(Int_t value) {fMinI = value;}
45 void SetValueD(Double_t value) {fMinD = value;}
52 virtual Bool_t IsSelected(TObject *object);
53 virtual void Print(Option_t *opt = "") const;
57 Int_t fMinI; // lower edge of INT range or ref. value for INT CUT
58 Int_t fMaxI; // upper edge of INT range (not used for value cuts)
59 Double_t fMinD; // lower edge of DOUBLE range or ref. value for DOUBLE CUT
60 Double_t fMaxD; // upper edge of DOUBLE range (not used for value cuts)
62 Int_t fCutValueI; // cut value INT
63 Double_t fCutValueD; // cut value DOUBLE
65 Bool_t fCutResult; // tells if the cut is passed or not
67 ClassDef(AliRsnCut, 1)