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 
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.
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 
70 
72 inline PndMvaVariable::PndMvaVariable(PndMvaVariable const &oth) : Name(oth.Name), NormFactor(oth.NormFactor), Mean(oth.Mean), Min(oth.Min), Max(oth.Max){};
73 
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 const &oth)
Assignment operator.
std::string Name
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:37
virtual ~PndMvaVariable()
Destructor.
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:36
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.