FairRoot/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 
18 {
25  explicit PndMvaVariable(std::string const& name = "UNKNOWN_VAR",
26  float normFactor = 1.0, float mean = 0.0,
27  float min = 0.0, float max = 0.0);
28 
30  virtual ~PndMvaVariable();
31 
32  // Copy Const.
33  PndMvaVariable(PndMvaVariable const& oth);
34 
35  // Assign.
37 
38  std::string Name;
43  float NormFactor;// Sigma
44  float Mean; // Mean value
45  float Min; // Minimum value
46  float Max; // Maximum value
47 
48 private:
49  bool operator== (PndMvaVariable const& oth) const;
50  bool operator> (PndMvaVariable const& oth) const;
51  bool operator< (PndMvaVariable const& oth) const;
52 };// End of interface.
53 
54 //_________________________ Implement. ___________________
56 inline PndMvaVariable::PndMvaVariable(std::string const& name,
57  float normFactor, float mean,
58  float min, float max)
59  : Name(name),
60  NormFactor(normFactor),
61  Mean(mean),
62  Min(min),
63  Max(max)
64 {};
65 
68 {};
69 
72  : Name(oth.Name),
73  NormFactor(oth.NormFactor),
74  Mean(oth.Mean),
75  Min(oth.Min),
76  Max(oth.Max)
77 {};
78 
81 {
82  // check for self-assignment
83  if (this != &oth)
84  {// Not equal, thus deep copy
85  this->Name = oth.Name;
86  this->NormFactor = oth.NormFactor;
87  this->Mean = oth.Mean;
88  this->Min = oth.Min;
89  this->Max = oth.Max;
90  }
91  return (*this);
92 }// End of interface definition.
93 #endif
PndMvaVariable & operator=(PndMvaVariable const &oth)
Assignment operator.
std::string Name
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:26
virtual ~PndMvaVariable()
Destructor.
bool operator==(PndMvaVariable const &oth) const
static T Min(const T &x, const T &y)
Definition: PndCAMath.h:35
bool operator>(PndMvaVariable const &oth) const
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:25
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.
TString name
bool operator<(PndMvaVariable const &oth) const
static T Max(const T &x, const T &y)
Definition: PndCAMath.h:36
Double_t mean[nsteps]
Definition: dedx_bands.C:65