]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/RESONANCES/AliRsnCut.h
Update in cuts for Sigma* and update for lego_train macros (M.Vala)
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnCut.h
CommitLineData
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
eaa44581 9// against a reference or an allowed range, in order to permit
32992791 10// a unique way to execute such kind of checks.
eaa44581 11// Moreover, if one checks values and ranges using default methods
12// a debug message can be printed on request.
32992791 13//
14// authors: Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
15// Martin Vala (martin.vala@cern.ch)
e2bafbbc 16//
06351446 17
18#ifndef ALIRSNCUT_H
19#define ALIRSNCUT_H
20
32992791 21#include "AliRsnTarget.h"
06351446 22
2a1c7696 23class AliRsnCut : public AliRsnTarget {
24public:
25
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);
61f275d1 29 AliRsnCut(const AliRsnCut &copy);
30 AliRsnCut &operator=(const AliRsnCut &copy);
2a1c7696 31 virtual ~AliRsnCut() { };
32
b63357a0 33 Int_t GetMinI() const {return fMinI;}
34 Int_t GetMaxI() const {return fMaxI;}
35 Double_t GetMinD() const {return fMinD;}
36 Double_t GetMaxD() const {return fMaxD;}
37 Int_t GetCutValueI() const {return fCutValueI;}
38 Double_t GetCutValueD() const {return fCutValueD;}
39 Bool_t GetCutResult() const {return fCutResult;}
2a1c7696 40
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;}
43
44 void SetValueI(Int_t value) {fMinI = value;}
45 void SetValueD(Double_t value) {fMinD = value;}
46
47 Bool_t OkValueI();
48 Bool_t OkRangeI();
49 Bool_t OkValueD();
50 Bool_t OkRangeD();
51
52 virtual Bool_t IsSelected(TObject *object);
53 virtual void Print(Option_t *opt = "") const;
54
55protected:
56
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)
61
62 Int_t fCutValueI; // cut value INT
63 Double_t fCutValueD; // cut value DOUBLE
64
65 Bool_t fCutResult; // tells if the cut is passed or not
66
67 ClassDef(AliRsnCut, 1)
06351446 68};
69
70#endif