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