]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnCutSet.h
Add some specific tasks for specific resonances and additional macros
[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 "AliRsnTarget.h"
19 #include "AliRsnCut.h"
20
21 class AliRsnDaughter;
22 class AliRsnExpression;
23 class AliRsnPairParticle;
24 class AliRsnEvent;
25
26 class AliRsnCutSet : public AliRsnTarget
27 {
28   public:
29
30     AliRsnCutSet();
31     AliRsnCutSet(const char *name, RSNTARGET target);
32     AliRsnCutSet(const AliRsnCutSet &copy);
33     AliRsnCutSet& operator=(const AliRsnCutSet& copy);
34     ~AliRsnCutSet();
35
36     void      AddCut(AliRsnCut* cut);
37
38     void      ShowCuts() const;
39     Int_t     GetIndexByCutName(TString s);
40     Bool_t    Passed();
41     Bool_t    IsValidScheme();
42     TString   ShowCutScheme();
43     Int_t     TestExpression(TString opt="short");
44     void      PrintSetInfo();
45
46     Bool_t    IsSelected(TObject *object);
47
48     void SetBoolValue(Bool_t theValue,Int_t index) { fBoolValues[index] = theValue; }
49     Bool_t GetBoolValue(Int_t index) const { return fBoolValues[index]; }
50
51     void SetCutScheme(const char *theValue);
52     TString GetCutScheme() const { return fCutScheme; }
53
54     void SetCutSchemeIndexed(TString theValue);
55     TString   GetCutSchemeIndexed();
56
57     TObjArray *GetCuts() { return &fCuts; }
58
59   private:
60
61     TObjArray     fCuts;                  // array of cuts
62     Int_t         fNumOfCuts;             // number of cuts
63     TString       fCutScheme;             // cut scheme
64     TString       fCutSchemeIndexed;      // cut scheme indexed
65
66     Bool_t       *fBoolValues;            //[fNumOfCuts]
67     Bool_t        fIsScheme;              // is scheme
68
69     AliRsnExpression  *fExpression;       // pointer to AliRsnExpression
70
71     ClassDef(AliRsnCutSet,1)    // ROOT dictionary
72 };
73
74 #endif