1 |
// Dear emacs, this is -*- c++ -*-
|
2 |
#ifndef Selection_H
|
3 |
#define Selection_H
|
4 |
|
5 |
#include <TString.h>
|
6 |
#include "Objects.h"
|
7 |
#include "BaseCycleContainer.h"
|
8 |
#include "ObjectHandler.h"
|
9 |
#include "../../core/include/SLogger.h"
|
10 |
|
11 |
class SelectionModule{
|
12 |
public:
|
13 |
SelectionModule(){};
|
14 |
virtual ~SelectionModule(){};
|
15 |
|
16 |
virtual bool pass(BaseCycleContainer*)=0;
|
17 |
virtual std::string description()=0;
|
18 |
};
|
19 |
|
20 |
|
21 |
class Selection{
|
22 |
public:
|
23 |
|
24 |
//Selection(){};
|
25 |
Selection(std::string name);
|
26 |
~Selection(){};
|
27 |
|
28 |
void addSelectionModule(SelectionModule*);
|
29 |
void clearSelectionModulesList();
|
30 |
bool passSelection(BaseCycleContainer *bcc);
|
31 |
bool passInvertedSelection(BaseCycleContainer *bcc);
|
32 |
bool passSelection();
|
33 |
bool passInvertedSelection();
|
34 |
|
35 |
void printCutFlow();
|
36 |
|
37 |
TString GetName() {return m_name;}
|
38 |
void SetName(TString name) { m_name = name;}
|
39 |
|
40 |
private:
|
41 |
TString m_name;
|
42 |
mutable SLogger m_logger;
|
43 |
std::vector<SelectionModule*> m_cuts;
|
44 |
std::vector<int> m_cutflow;
|
45 |
int Ntotal;
|
46 |
|
47 |
};
|
48 |
|
49 |
|
50 |
|
51 |
#endif // Selection_H
|