CbmRoot
PairAnalysisCutCombi.h
Go to the documentation of this file.
1 #ifndef PAIRANALYSISCUTCOMBI_H
2 #define PAIRANALYSISCUTCOMBI_H
3 //#############################################################
4 //# #
5 //# Class PairAnalysisCutCombi #
6 //# #
7 //# Authors: #
8 //# Julian Book, Uni Ffm / Julian.Book@cern.ch #
9 //# #
10 //#############################################################
11 
12 #include <TBits.h>
13 #include <TString.h>
14 
15 #include <AnalysisCuts.h>
16 
17 class TList;
19 
21 public:
22  // Whether all cut criteria have to be fulfilled of just any
23  enum CutType { kAll = 0, kAny };
24 
26  PairAnalysisCutCombi(const char* name, const char* title);
27  virtual ~PairAnalysisCutCombi();
28 
29  void AddCut(AnalysisCuts* cuts, AnalysisCuts* range);
30 
31  // setters
32  void SetCutType(CutType type) { fCutType = type; }
33 
34  // getters
35  CutType GetCutType() const { return fCutType; }
36  Int_t GetNCuts() { return fNActiveCuts; }
37 
38  //
39  //Analysis cuts interface
40  //
41  virtual Bool_t IsSelected(Double_t* const values);
42  virtual Bool_t IsSelected(TObject* track);
43  virtual Bool_t IsSelected(TList* /* list */) { return kFALSE; }
44 
45  //
46  // Cut information
47  //
48  virtual UInt_t GetSelectedCutsMask() const { return fSelectedCutsMask; }
49  virtual void Print(const Option_t* option = "") const;
50 
51 
52 private:
53  enum { kNmaxCuts = 30 };
54 
55  UShort_t fNActiveCuts; // number of acive cuts
56  UInt_t fActiveCutsMask; // mask of active cuts
57 
58  UInt_t
59  fSelectedCutsMask; // Maks of selected cuts, is available after calling IsSelected
60  CutType fCutType; // type of the cut: any, all
61 
62  AnalysisCuts* fRangeCuts[kNmaxCuts]; // cuts to select a range
63  AnalysisCuts* fCuts[kNmaxCuts]; // where these cuts are applied
64 
67 
68  ClassDef(PairAnalysisCutCombi, 1) // Apply cuts for certain conditions/ranges
69 };
70 
71 #endif
PairAnalysisCutCombi::kNmaxCuts
@ kNmaxCuts
Definition: PairAnalysisCutCombi.h:53
PairAnalysisCutCombi::~PairAnalysisCutCombi
virtual ~PairAnalysisCutCombi()
Definition: PairAnalysisCutCombi.cxx:69
PairAnalysisCutCombi::kAll
@ kAll
Definition: PairAnalysisCutCombi.h:23
PairAnalysisCutCombi::IsSelected
virtual Bool_t IsSelected(Double_t *const values)
Definition: PairAnalysisCutCombi.cxx:113
PairAnalysisCutCombi::fActiveCutsMask
UInt_t fActiveCutsMask
Definition: PairAnalysisCutCombi.h:56
PairAnalysisCutCombi::PairAnalysisCutCombi
PairAnalysisCutCombi()
PairAnalysisVarManager
Definition: PairAnalysisVarManager.h:68
PairAnalysisCutCombi::fNActiveCuts
UShort_t fNActiveCuts
Definition: PairAnalysisCutCombi.h:55
AnalysisCuts::ClassDef
ClassDef(AnalysisCuts, 1)
PairAnalysisCutCombi::PairAnalysisCutCombi
PairAnalysisCutCombi(const PairAnalysisCutCombi &c)
PairAnalysisCutCombi::GetSelectedCutsMask
virtual UInt_t GetSelectedCutsMask() const
Definition: PairAnalysisCutCombi.h:48
PairAnalysisCutCombi::CutType
CutType
Definition: PairAnalysisCutCombi.h:23
PairAnalysisCutCombi::GetCutType
CutType GetCutType() const
Definition: PairAnalysisCutCombi.h:35
PairAnalysisCutCombi::fCutType
CutType fCutType
Definition: PairAnalysisCutCombi.h:60
PairAnalysisCutCombi::GetNCuts
Int_t GetNCuts()
Definition: PairAnalysisCutCombi.h:36
PairAnalysisCutCombi::fCuts
AnalysisCuts * fCuts[kNmaxCuts]
Definition: PairAnalysisCutCombi.h:63
PairAnalysisCutCombi::SetCutType
void SetCutType(CutType type)
Definition: PairAnalysisCutCombi.h:32
PairAnalysisCutCombi
Definition: PairAnalysisCutCombi.h:20
PairAnalysisCutCombi::AddCut
void AddCut(AnalysisCuts *cuts, AnalysisCuts *range)
Definition: PairAnalysisCutCombi.cxx:80
PairAnalysisCutCombi::fRangeCuts
AnalysisCuts * fRangeCuts[kNmaxCuts]
Definition: PairAnalysisCutCombi.h:62
PairAnalysisCutCombi::Print
virtual void Print(const Option_t *option="") const
Definition: PairAnalysisCutCombi.cxx:146
PairAnalysisCutCombi::IsSelected
virtual Bool_t IsSelected(TList *)
Definition: PairAnalysisCutCombi.h:43
PairAnalysisCutCombi::kAny
@ kAny
Definition: PairAnalysisCutCombi.h:23
PairAnalysisCutCombi::fSelectedCutsMask
UInt_t fSelectedCutsMask
Definition: PairAnalysisCutCombi.h:59
AnalysisCuts
Definition: AnalysisCuts.h:12
AnalysisCuts.h
PairAnalysisCutCombi::operator=
PairAnalysisCutCombi & operator=(const PairAnalysisCutCombi &c)