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