PandaRoot
PndMvaVariable.h
Go to the documentation of this file.
1
//****************************************************************************
2
//* This file is part of PandaRoot. *
3
//* *
4
//* PandaRoot is distributed under the terms of the *
5
//* GNU General Public License (GPL) version 3, *
6
//* copied verbatim in the file "LICENSE". *
7
//* *
8
//* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9
//* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10
//* The authors are listed in the file "AUTHORS". *
11
//****************************************************************************
12
13
/* ********************************************
14
* MVA variable class definition. *
15
* Author: M.Babai@rug.nl *
16
* LICENSE: *
17
* Version: *
18
* License: *
19
* *******************************************
20
*/
21
//#pragma once
22
#ifndef PND_MVA_VARIABLE_H
23
#define PND_MVA_VARIABLE_H
24
29
struct
PndMvaVariable
{
36
explicit
PndMvaVariable
(std::string
const
&name =
"UNKNOWN_VAR"
,
float
normFactor = 1.0,
float
mean = 0.0,
float
min
= 0.0,
float
max
= 0.0);
37
39
virtual
~PndMvaVariable
();
40
41
// Copy Const.
42
PndMvaVariable
(
PndMvaVariable
const
&oth);
43
44
// Assign.
45
PndMvaVariable
&
operator=
(
PndMvaVariable
const
&oth);
46
47
std::string
Name
;
52
float
NormFactor
;
// Sigma
53
float
Mean
;
// Mean value
54
float
Min
;
// Minimum value
55
float
Max
;
// Maximum value
56
57
private
:
58
bool
operator==(
PndMvaVariable
const
&oth)
const
;
59
bool
operator>(
PndMvaVariable
const
&oth)
const
;
60
bool
operator<(
PndMvaVariable
const
&oth)
const
;
61
};
// End of interface.
62
63
//_________________________ Implement. ___________________
65
inline
PndMvaVariable::PndMvaVariable
(std::string
const
&name,
float
normFactor,
float
mean,
float
min
,
float
max
)
66
:
Name
(name),
NormFactor
(normFactor),
Mean
(mean),
Min
(min),
Max
(max){};
67
69
inline
PndMvaVariable::~PndMvaVariable
(){};
70
72
inline
PndMvaVariable::PndMvaVariable
(
PndMvaVariable
const
&oth) :
Name
(oth.
Name
),
NormFactor
(oth.
NormFactor
),
Mean
(oth.
Mean
),
Min
(oth.
Min
),
Max
(oth.
Max
){};
73
75
inline
PndMvaVariable
&
PndMvaVariable::operator=
(
PndMvaVariable
const
&oth)
76
{
77
// check for self-assignment
78
if
(
this
!= &oth) {
// Not equal, thus deep copy
79
this->
Name
= oth.
Name
;
80
this->
NormFactor
= oth.
NormFactor
;
81
this->
Mean
= oth.
Mean
;
82
this->
Min
= oth.
Min
;
83
this->
Max
= oth.
Max
;
84
}
85
return
(*
this
);
86
}
// End of interface definition.
87
#endif
PndMvaVariable::operator=
PndMvaVariable & operator=(PndMvaVariable const &oth)
Assignment operator.
Definition:
PndMvaVariable.h:75
PndMvaVariable::Name
std::string Name
Definition:
PndMvaVariable.h:47
PndMvaVariable::Max
float Max
Definition:
PndMvaVariable.h:55
max
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition:
P4_F32vec4.h:37
PndMvaVariable
Definition:
PndMvaVariable.h:29
PndMvaVariable::~PndMvaVariable
virtual ~PndMvaVariable()
Destructor.
Definition:
PndMvaVariable.h:69
min
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
Definition:
P4_F32vec4.h:36
PndMvaVariable::NormFactor
float NormFactor
Definition:
PndMvaVariable.h:52
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:65
PndMvaVariable::Mean
float Mean
Definition:
PndMvaVariable.h:53
PndMvaVariable::Min
float Min
Definition:
PndMvaVariable.h:54
home
gitlab-runner
builds
Vxspf1vo
0
PandaRootGroup
PandaRoot
tools
MVA
PndMvaVariable.h
Generated on Fri Nov 29 2024 06:04:43 for PandaRoot by
1.8.13