New values and cuts
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCutValue.h
CommitLineData
69fbb331 1//
32992791 2// *** Class AliRsnCutValue ***
69fbb331 3//
2a1c7696 4// This cut implementation can be used to cut generically on
32992791 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.
07d7c31d 9// It allows to customize the reference AliRsnValue object by
32992791 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
69fbb331 14//
32992791 15// author: Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
69fbb331 16//
17
18#ifndef ALIRSNCUTVALUE_H
19#define ALIRSNCUTVALUE_H
20
21#include "AliRsnCut.h"
32992791 22#include "AliRsnValue.h"
69fbb331 23
2a1c7696 24class AliRsnCutValue : public AliRsnCut {
25public:
26
27 AliRsnCutValue();
c865cb1d 28 AliRsnCutValue(const char *name, Double_t min, Double_t max, Bool_t isMC);
2a1c7696 29 AliRsnCutValue(const AliRsnCutValue& copy);
30 AliRsnCutValue& operator=(const AliRsnCutValue& copy);
31 virtual ~AliRsnCutValue() { }
32
c865cb1d 33 Double_t GetComputedValue() {if (fValue) return fValue->GetComputedValue(); return -1E20;}
34 AliRsnValue* GetValueObj() {return fValue;}
35 void SetValueObj(AliRsnValue *value) {fValue = value; SetTargetType(value->GetTargetType());}
36 Bool_t IsUsingMC() {return fUseMC;}
37 void UseMC(Bool_t yn = kTRUE) {fUseMC = yn;}
2a1c7696 38
39 virtual Bool_t IsSelected(TObject *object);
40 virtual void Print(const Option_t *option = "") const;
41
42protected:
43
c865cb1d 44 Bool_t fUseMC;
45 AliRsnValue *fValue;
2a1c7696 46
47 ClassDef(AliRsnCutValue, 1)
69fbb331 48};
49
50#endif