]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnCutSet.h
Class version updated.
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCutSet.h
1 //
2 // Class AliRsnCutSet
3 //
4 // This is the front-end for cut management and checking.
5 // It must be prepared by adding all required single cuts,
6 // and then with a logical expression which combines all cuts
7 // with the "AND", "OR" and "NOT" operators.
8 //
9 // author: M. Vala (martin.vala@cern.ch)
10 //
11
12 #ifndef ALIRSNCUTSET_H
13 #define ALIRSNCUTSET_H
14
15 #include <TNamed.h>
16 #include <TObjArray.h>
17
18 #include "AliRsnCut.h"
19
20 class AliRsnDaughter;
21 class AliRsnExpression;
22 class AliRsnPairParticle;
23 class AliRsnEvent;
24
25 class AliRsnCutSet : public TNamed
26 {
27   public:
28
29     AliRsnCutSet();
30     AliRsnCutSet(TString name);
31     AliRsnCutSet(const AliRsnCutSet &copy);
32     ~AliRsnCutSet();
33
34     void      AddCut(AliRsnCut* cut);
35
36     void      ShowCuts();
37     Int_t     GetIndexByCutName(TString s);
38     Bool_t    Passed();
39     Bool_t    IsValidScheme();
40     TString   ShowCutScheme();
41     Int_t     TestExpression(TString opt="short");
42     void      PrintSetInfo();
43
44     Bool_t    IsSelected(AliRsnCut::ETarget type, AliRsnDaughter *daughter);
45     Bool_t    IsSelected(AliRsnCut::ETarget type, AliRsnPairParticle *pair);
46     Bool_t    IsSelected(AliRsnCut::ETarget type, AliRsnEvent *event);
47     Bool_t    IsSelected(AliRsnCut::ETarget type, AliRsnEvent *ev1, AliRsnEvent *ev2);
48
49     void SetBoolValue(Bool_t theValue,Int_t index) { fBoolValues[index] = theValue; }
50     Bool_t GetBoolValue(Int_t index) const { return fBoolValues[index]; }
51
52     void SetCutScheme(const TString& theValue);
53     TString GetCutScheme() const { return fCutScheme; }
54
55     void SetCutSchemeIndexed(TString theValue);
56     TString   GetCutSchemeIndexed();
57
58     TObjArray *GetCuts() { return &fCuts; }
59
60   private:
61
62     AliRsnCutSet& operator=(const AliRsnCutSet& /*copy*/) {return (*this);}
63
64     TObjArray     fCuts;                  // array of cuts
65     Int_t         fNumOfCuts;             // number of cuts
66     TString       fCutScheme;             // cut scheme
67     TString       fCutSchemeIndexed;      // cut scheme indexed
68
69     Bool_t       *fBoolValues;            //[fNumOfCuts]
70     Bool_t        fIsScheme;              // is scheme
71
72     AliRsnExpression  *fExpression;       // pointer to AliRsnExpression
73
74     ClassDef(AliRsnCutSet,1)    // ROOT dictionary
75 };
76
77 #endif