forked from ikrav/ElectronID
-
Notifications
You must be signed in to change notification settings - Fork 2
/
VarCut.hh
47 lines (34 loc) · 1.26 KB
/
VarCut.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef VARCUT_HH
#define VARCUT_HH
#include "TCut.h"
#include <TObject.h>
#include "Variables.hh"
class VarCut :public TObject {
public:
VarCut();
// Set value of the variable in the internal array based on its name,
// using the regular name or the name known to TMVA (may include abs())
void setCutValue(TString varName, float val);
void setConstantValue(TString varName, float val);
// Look up cut value for given variable (regular name)
float getCutValue(TString var);
float getConstantValue(TString var);
// Get the full TCut object with cuts on all variables
// Get the TCut for a given variable if selectVar is specified
TCut* getCut(TString selectVar = "");
// Get index of the variable in the internal array from its name,
// using the regular name or the name known to TMVA (may include abs())
int getVariableIndex(TString var);
int getConstantIndex(TString var);
// Does the cut involve abs()? i.e., is the cut symmetric wrt 0?
bool isSymmetric(TString variable);
// Input/output
void printCuts(); // print to stdout
private:
// The actual list of variables for which cuts are stored here
// is found in Variables.hh
float _cuts[Vars::nVariables];
float _constants[Vars::nConstants];
ClassDef(VarCut,2)
};
#endif