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.
9 // author: M. Vala (martin.vala@cern.ch)
12 #ifndef ALIRSNCUTSET_H
13 #define ALIRSNCUTSET_H
16 #include <TObjArray.h>
18 #include "AliRsnCut.h"
21 class AliRsnExpression;
22 class AliRsnPairParticle;
25 class AliRsnCutSet : public TNamed
30 AliRsnCutSet(TString name);
31 AliRsnCutSet(const AliRsnCutSet ©);
32 AliRsnCutSet& operator=(const AliRsnCutSet& /*copy*/) {return (*this);}
35 void AddCut(AliRsnCut* cut);
37 void ShowCuts() const;
38 Int_t GetIndexByCutName(TString s);
40 Bool_t IsValidScheme();
41 TString ShowCutScheme();
42 Int_t TestExpression(TString opt="short");
45 Bool_t IsSelected(AliRsnCut::ETarget type, AliRsnDaughter *daughter);
46 Bool_t IsSelected(AliRsnCut::ETarget type, AliRsnPairParticle *pair);
47 Bool_t IsSelected(AliRsnCut::ETarget type, AliRsnEvent *event);
48 Bool_t IsSelected(AliRsnCut::ETarget type, AliRsnEvent *ev1, AliRsnEvent *ev2);
50 void SetBoolValue(Bool_t theValue,Int_t index) { fBoolValues[index] = theValue; }
51 Bool_t GetBoolValue(Int_t index) const { return fBoolValues[index]; }
53 void SetCutScheme(const TString& theValue);
54 TString GetCutScheme() const { return fCutScheme; }
56 void SetCutSchemeIndexed(TString theValue);
57 TString GetCutSchemeIndexed();
59 TObjArray *GetCuts() { return &fCuts; }
61 void SetEvent(AliRsnEvent *event);
65 TObjArray fCuts; // array of cuts
66 Int_t fNumOfCuts; // number of cuts
67 TString fCutScheme; // cut scheme
68 TString fCutSchemeIndexed; // cut scheme indexed
70 Bool_t *fBoolValues; //[fNumOfCuts]
71 Bool_t fIsScheme; // is scheme
73 AliRsnExpression *fExpression; // pointer to AliRsnExpression
75 ClassDef(AliRsnCutSet,1) // ROOT dictionary