PandaRoot
PndMvaVariable.h
Go to the documentation of this file.
1
/* ********************************************
2
* MVA variable class definition. *
3
* Author: M.Babai@rug.nl *
4
* LICENSE: *
5
* Version: *
6
* License: *
7
* *******************************************
8
*/
9
//#pragma once
10
#ifndef PND_MVA_VARIABLE_H
11
#define PND_MVA_VARIABLE_H
12
17
struct
PndMvaVariable
{
24
explicit
PndMvaVariable
(std::string
const
&name =
"UNKNOWN_VAR"
,
float
normFactor = 1.0,
float
mean = 0.0,
float
min
= 0.0,
float
max
= 0.0);
25
27
virtual
~PndMvaVariable
();
28
29
// Copy Const.
30
PndMvaVariable
(
PndMvaVariable
const
&oth);
31
32
// Assign.
33
PndMvaVariable
&
operator=
(
PndMvaVariable
const
&oth);
34
35
std::string
Name
;
40
float
NormFactor
;
// Sigma
41
float
Mean
;
// Mean value
42
float
Min
;
// Minimum value
43
float
Max
;
// Maximum value
44
45
private
:
46
bool
operator==(
PndMvaVariable
const
&oth)
const
;
47
bool
operator>(
PndMvaVariable
const
&oth)
const
;
48
bool
operator<(
PndMvaVariable
const
&oth)
const
;
49
};
// End of interface.
50
51
//_________________________ Implement. ___________________
53
inline
PndMvaVariable::PndMvaVariable
(std::string
const
&name,
float
normFactor,
float
mean,
float
min
,
float
max
)
54
:
Name
(name),
NormFactor
(normFactor),
Mean
(mean),
Min
(min),
Max
(max){};
55
57
inline
PndMvaVariable::~PndMvaVariable
(){};
58
60
inline
PndMvaVariable::PndMvaVariable
(
PndMvaVariable
const
&oth) :
Name
(oth.
Name
),
NormFactor
(oth.
NormFactor
),
Mean
(oth.
Mean
),
Min
(oth.
Min
),
Max
(oth.
Max
){};
61
63
inline
PndMvaVariable
&
PndMvaVariable::operator=
(
PndMvaVariable
const
&oth)
64
{
65
// check for self-assignment
66
if
(
this
!= &oth) {
// Not equal, thus deep copy
67
this->
Name
= oth.
Name
;
68
this->
NormFactor
= oth.
NormFactor
;
69
this->
Mean
= oth.
Mean
;
70
this->
Min
= oth.
Min
;
71
this->
Max
= oth.
Max
;
72
}
73
return
(*
this
);
74
}
// End of interface definition.
75
#endif
PndMvaVariable::operator=
PndMvaVariable & operator=(PndMvaVariable const &oth)
Assignment operator.
Definition:
PndMvaVariable.h:63
PndMvaVariable::Name
std::string Name
Definition:
PndMvaVariable.h:35
PndMvaVariable::Max
float Max
Definition:
PndMvaVariable.h:43
max
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition:
P4_F32vec4.h:25
PndMvaVariable
Definition:
PndMvaVariable.h:17
PndMvaVariable::~PndMvaVariable
virtual ~PndMvaVariable()
Destructor.
Definition:
PndMvaVariable.h:57
min
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
Definition:
P4_F32vec4.h:24
PndMvaVariable::NormFactor
float NormFactor
Definition:
PndMvaVariable.h:40
PndMvaVariable::PndMvaVariable
PndMvaVariable(std::string const &name="UNKNOWN_VAR", float normFactor=1.0, float mean=0.0, float min=0.0, float max=0.0)
Constructor implementation.
Definition:
PndMvaVariable.h:53
PndMvaVariable::Mean
float Mean
Definition:
PndMvaVariable.h:41
PndMvaVariable::Min
float Min
Definition:
PndMvaVariable.h:42
home
gitlab-runner
builds
LYZoAKaU
0
PandaRootGroup
PandaRoot
tools
MVA
PndMvaVariable.h
Generated on Fri Oct 21 2022 07:03:59 for PandaRoot by
1.8.13