]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/RESONANCES/AliRsnCutValue.h
Added optimal cuts on vertex position for pPb analyses
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnCutValue.h
1 //
2 // *** Class AliRsnCutValue ***
3 //
4 // This cut implementation can be used to cut generically on
5 // any value which can be computed from AliRsnValue class.
6 // Since that value is implemented always as a Double_t one,
7 // then this cut operates only with the Double_t data members
8 // of the AliRsnCut base class.
9 // It allows to customize the reference AliRsnValue object by
10 // means of a getter that returns a pointer to it.
11 // This cut can apply to any kind of object, but the type of
12 // target must be one of those for which the chosen value type
13 // makes sense to be computed
14 //
15 // author: Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
16 //
17
18 #ifndef ALIRSNCUTVALUE_H
19 #define ALIRSNCUTVALUE_H
20
21 #include "AliRsnCut.h"
22
23 class AliRsnValue;
24
25 class AliRsnCutValue : public AliRsnCut {
26 public:
27
28    AliRsnCutValue();
29    AliRsnCutValue(const char *name, Double_t min, Double_t max);
30    AliRsnCutValue(const AliRsnCutValue &copy);
31    AliRsnCutValue &operator=(const AliRsnCutValue &copy);
32    virtual ~AliRsnCutValue() { }
33
34    Double_t       GetComputedValue()              {if (fValue) return fValue->GetComputedValue(); return -1E20;}
35    AliRsnValue   *GetValueObj()                   {return fValue;}
36    void           SetValueObj(AliRsnValue *value) {fValue = value; SetTargetType(value->GetTargetType());}
37
38    virtual Bool_t IsSelected(TObject *object);
39    virtual void   Print(const Option_t *option = "") const;
40
41 protected:
42
43    AliRsnValue *fValue;   // value object used for cuts
44
45    ClassDef(AliRsnCutValue, 1)
46 };
47
48 #endif