4 // General implementation of a single cut strategy, which can be:
5 // - a value contained in a given interval [--> IsBetween()]
6 // - a value equal to a given reference [--> IsEqual() ]
7 // In all cases, the reference value(s) is (are) given as data members
8 // and each kind of cut requires a given value type (Int, UInt, Double),
9 // but the cut check procedure is then automatized and chosen thanks to
10 // an enumeration of the implemented cut types.
11 // At the end, the user (or any other point which uses this object) has
12 // to use the method IsSelected() to check if this cut has been passed.
14 // authors: Martin Vala (martin.vala@cern.ch)
15 // Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
24 class AliRsnPairParticle;
28 class AliRsnCut : public TNamed
32 // available cut types
33 // some ones work both for pairs and single tracks
56 // types of cut variables
64 // possible targets for a cut
75 AliRsnCut (const char *name, const char *title, EType type);
76 AliRsnCut (const char *name, const char *title, EType type, Double_t min, Double_t max = 1e-100);
77 AliRsnCut (const char *name, const char *title, EType type, Int_t min, Int_t max = 32767);
78 AliRsnCut (const char *name, const char *title, EType type, UInt_t min, UInt_t max = 65534);
82 void SetCutValues (EType type, const Double_t& theValue, const Double_t& theValue2);
83 void SetCutValues (EType type, const Int_t& theValue, const Int_t& theValue2);
84 void SetCutValues (EType type, const UInt_t& theValue, const UInt_t& theValue2);
86 Bool_t IsSelected (ETarget tgt, AliRsnDaughter *daughter);
87 Bool_t IsSelected (ETarget tgt, AliRsnPairParticle *pair);
88 Bool_t IsSelected (ETarget tgt, AliRsnEvent *event);
90 void PrintAllValues();
92 Bool_t IsBetween (const Double_t &theValue);
93 Bool_t IsBetween (const Int_t &theValue);
94 Bool_t MatchesValue (const Int_t &theValue);
95 Bool_t MatchesValue (const UInt_t &theValue);
96 Bool_t MatchesValue (const Double_t &theValue);
100 Double_t fDMin; // min. double value
101 Double_t fDMax; // max. double value
102 Int_t fIMin; // min. int value
103 Int_t fIMax; // max. int value
104 UInt_t fUIMin; // min. uint value
105 UInt_t fUIMax; // max. uint value
107 EType fType; // cut type
108 EVarType fVarType; // variable type
110 static const Double_t fgkDSmallNumber; // small double value
111 static const Double_t fgkDBigNumber; // big double value
112 static const Int_t fgkIBigNumber; // big int value
114 ClassDef (AliRsnCut, 1)