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