1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * See cxx source for full Copyright notice *
4 **************************************************************************/
6 //=========================================================================
9 // General implementation of a single cut strategy, which can be:
10 // - a value contained in a given interval [--> IsBetween()]
11 // - a value equal to a given reference [--> IsEqual() ]
12 // In all cases, the reference value(s) is (are) given as data members
13 // and each kind of cut requires a given value type (Int, UInt, Double),
14 // but the cut check procedure is then automatized and chosen thanks to
15 // an enumeration of the implemented cut types.
16 // At the end, the user (or any other point which uses this object) has
17 // to use the method IsSelected() to check if this cut has been passed.
19 // authors: Martin Vala (martin.vala@cern.ch)
20 // Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
21 //=========================================================================
29 class AliRsnPairParticle;
32 class AliRsnCut : public TNamed
73 AliRsnCut (const char *name, const char *title, ERsnCutType type);
74 AliRsnCut (const char *name, const char *title, ERsnCutType type, Double_t min, Double_t max = 1e-100);
75 AliRsnCut (const char *name, const char *title, ERsnCutType type, Int_t min, Int_t max = 32767);
76 AliRsnCut (const char *name, const char *title, ERsnCutType type, UInt_t min, UInt_t max = 65534);
80 void SetCutValues (ERsnCutType type, const Double_t& theValue, const Double_t& theValue2);
81 void SetCutValues (ERsnCutType type, const Int_t& theValue, const Int_t& theValue2);
82 void SetCutValues (ERsnCutType type, const UInt_t& theValue, const UInt_t& theValue2);
84 Bool_t IsSelected (ECutSetType type, AliRsnDaughter *daughter);
85 Bool_t IsSelected (ECutSetType type, AliRsnPairParticle *pair);
87 void PrintAllValues();
89 Bool_t IsBetween (const Double_t &theValue);
90 Bool_t MatchesValue (const Int_t &theValue);
91 Bool_t MatchesValue (const UInt_t &theValue);
92 Bool_t MatchesValue (const Double_t &theValue);
96 Bool_t CheckRestMomentum(AliRsnPairParticle *pair);
98 Double_t fDMin; // min. double value
99 Double_t fDMax; // max. double value
100 Int_t fIMin; // min. int value
101 Int_t fIMax; // max. int value
102 UInt_t fUIMin; // min. uint value
103 UInt_t fUIMax; // max. uint value
105 ERsnCutType fRsnCutType; // cut type
106 ERsnCutVarType fRsnCutVarType; // variable type
108 static const Double_t fgkDSmallNumber; // small double value
109 static const Double_t fgkDBigNumber; // big double value
110 static const Int_t fgkIBigNumber; // big int value
112 ClassDef (AliRsnCut, 1)