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
62 kMultiplicityDifference,
69 // types of cut variables
76 // possible targets for a cut
86 AliRsnCut(const char *name, const char *title, EType type);
87 AliRsnCut(const char *name, const char *title, EType type, Double_t min, Double_t max = 1e-100);
88 AliRsnCut(const char *name, const char *title, EType type, Int_t min, Int_t max = 32767);
89 AliRsnCut(const char *name, const char *title, EType type, UInt_t min, UInt_t max = 65534);
90 AliRsnCut(const char *name, const char *title, EType type, ULong_t min, ULong_t max = 65534);
94 void SetCutValues(EType type, const Double_t& theValue, const Double_t& theValue2);
95 void SetCutValues(EType type, const Int_t& theValue, const Int_t& theValue2);
96 void SetCutValues(EType type, const UInt_t& theValue, const UInt_t& theValue2);
97 void SetCutValues(EType type, const ULong_t& theValue, const ULong_t& theValue2);
99 Bool_t IsSelected(ETarget tgt, AliRsnDaughter *daughter);
100 Bool_t IsSelected(ETarget tgt, AliRsnPairParticle *pair);
101 Bool_t IsSelected(ETarget tgt, AliRsnEvent *event);
102 Bool_t IsSelected(ETarget tgt, AliRsnEvent *ev1, AliRsnEvent *ev2);
104 void PrintAllValues();
106 Bool_t IsBetween(const Double_t &theValue);
107 Bool_t IsBetween(const Int_t &theValue);
108 Bool_t MatchesValue(const Int_t &theValue);
109 Bool_t MatchesValue(const UInt_t &theValue);
110 Bool_t MatchesValue(const ULong_t &theValue);
111 Bool_t MatchesValue(const Double_t &theValue);
115 Double_t fDMin; // min. double value
116 Double_t fDMax; // max. double value
117 Int_t fIMin; // min. int value
118 Int_t fIMax; // max. int value
119 UInt_t fUIMin; // min. uint value
120 UInt_t fUIMax; // max. uint value
121 ULong_t fULMin; // min. ulong value
122 ULong_t fULMax; // max. ulong value
124 EType fType; // cut type
125 EVarType fVarType; // variable type
127 static const Double_t fgkDSmallNumber; // small double value
128 static const Double_t fgkDBigNumber; // big double value
129 static const Int_t fgkIBigNumber; // big int value
131 ClassDef(AliRsnCut, 1)