Public Member Functions | Public Attributes | Friends | List of all members
cmf::SystVar Struct Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/CovarianceMatrixFit/core/VarVals.h"

Public Member Functions

 SystVar (uint8_t type)
 
 SystVar (uint8_t type, float minus2, float minus1, float plus1, float plus2)
 
uint8_t Type () const
 
std::vector< float > SigmasAsVec () const
 
float SigmaWeight (uint8_t const &sigmaLevel) const
 
bool operator== (cmf::SystVar const &other) const
 
bool operator< (cmf::SystVar const &other) const
 

Public Attributes

uint8_t fType
 key for this parameter More...
 
float fMinus2Sigma
 weight associated with this change in the underlying parameter More...
 
float fMinus1Sigma
 weight associated with this change in the underlying parameter More...
 
float fPlus1Sigma
 weight associated with this change in the underlying parameter More...
 
float fPlus2Sigma
 weight associated with this change in the underlying parameter More...
 

Friends

std::ostream & operator<< (std::ostream &o, cmf::SystVar const &sv)
 

Detailed Description

Definition at line 164 of file VarVals.h.

Constructor & Destructor Documentation

cmf::SystVar::SystVar ( uint8_t  type)
inline

Definition at line 166 of file VarVals.h.

167  : fType(type)
168  , fMinus2Sigma(1.)
169  , fMinus1Sigma(1.)
170  , fPlus1Sigma(1.)
171  , fPlus2Sigma(1.)
172  {}
float fMinus2Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:196
float fPlus2Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:199
uint8_t fType
key for this parameter
Definition: VarVals.h:195
float fMinus1Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:197
float fPlus1Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:198
cmf::SystVar::SystVar ( uint8_t  type,
float  minus2,
float  minus1,
float  plus1,
float  plus2 
)
inline

Definition at line 174 of file VarVals.h.

179  : fType(type)
180  , fMinus2Sigma(minus2)
181  , fMinus1Sigma(minus1)
182  , fPlus1Sigma(plus1)
183  , fPlus2Sigma(plus2)
184  {}
float fMinus2Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:196
float fPlus2Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:199
uint8_t fType
key for this parameter
Definition: VarVals.h:195
float fMinus1Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:197
float fPlus1Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:198

Member Function Documentation

bool cmf::SystVar::operator< ( cmf::SystVar const &  other) const
inline

Definition at line 191 of file VarVals.h.

References msf_helper::o, cmf::operator<<(), and Type().

191 { return fType < other.Type(); }
uint8_t fType
key for this parameter
Definition: VarVals.h:195
bool cmf::SystVar::operator== ( cmf::SystVar const &  other) const
inline

Definition at line 190 of file VarVals.h.

References Type().

190 { return fType == other.Type(); }
uint8_t fType
key for this parameter
Definition: VarVals.h:195
std::vector< float > cmf::SystVar::SigmasAsVec ( ) const
inline

Definition at line 203 of file VarVals.h.

204  {
205  return std::move(std::vector<float>({fMinus2Sigma,
206  fMinus1Sigma,
207  fPlus1Sigma,
208  fPlus2Sigma}));
209  }
float fMinus2Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:196
float fPlus2Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:199
float fMinus1Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:197
float fPlus1Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:198
float cmf::SystVar::SigmaWeight ( uint8_t const &  sigmaLevel) const
inline

Definition at line 212 of file VarVals.h.

References cmf::kMinus1Sigma, cmf::kMinus2Sigma, cmf::kPlus1Sigma, and cmf::kPlus2Sigma.

213  {
214  if(sigmaLevel == cmf::kMinus2Sigma) return fMinus2Sigma;
215  else if(sigmaLevel == cmf::kMinus1Sigma) return fMinus1Sigma;
216  else if(sigmaLevel == cmf::kPlus1Sigma ) return fPlus1Sigma;
217  else if(sigmaLevel == cmf::kPlus2Sigma ) return fPlus2Sigma;
218 
219  // default to no change in weight
220  return 1.;
221  }
float fMinus2Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:196
float fPlus2Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:199
float fMinus1Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:197
float fPlus1Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:198
uint8_t cmf::SystVar::Type ( ) const
inline

Definition at line 186 of file VarVals.h.

Referenced by operator<(), and operator==().

186 { return fType; }
uint8_t fType
key for this parameter
Definition: VarVals.h:195

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
cmf::SystVar const &  sv 
)
friend

Definition at line 107 of file VarVals.cxx.

108  {
109  o << cmf::KeyToVarName(sv.fType)
110  << " | -2 sigma wgt: "
111  << sv.fMinus2Sigma
112  << " | -1 sigma wgt: "
113  << sv.fMinus1Sigma
114  << " | 1 sigma wgt: "
115  << sv.fPlus1Sigma
116  << " | 2 sigma wgt: "
117  << sv.fPlus2Sigma
118  << " | ";
119 
120  return o;
121  }
static std::string KeyToVarName(uint8_t const &key)
Definition: StaticFuncs.h:654

Member Data Documentation

float cmf::SystVar::fMinus1Sigma

weight associated with this change in the underlying parameter

Definition at line 197 of file VarVals.h.

Referenced by cmf::operator<<().

float cmf::SystVar::fMinus2Sigma

weight associated with this change in the underlying parameter

Definition at line 196 of file VarVals.h.

Referenced by cmf::operator<<().

float cmf::SystVar::fPlus1Sigma

weight associated with this change in the underlying parameter

Definition at line 198 of file VarVals.h.

Referenced by cmf::operator<<().

float cmf::SystVar::fPlus2Sigma

weight associated with this change in the underlying parameter

Definition at line 199 of file VarVals.h.

Referenced by cmf::operator<<().

uint8_t cmf::SystVar::fType

key for this parameter

Definition at line 195 of file VarVals.h.

Referenced by cmf::operator<<().


The documentation for this struct was generated from the following file: