Public Member Functions | Private Attributes | Friends | List of all members
cmf::Parameter Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-05-06/CovarianceMatrixFit/dataProducts/Parameter.h"

Public Member Functions

 Parameter ()
 
 Parameter (std::string const &name, cmf::DetType_t const &det, double const &val, bool const &fixed, float const &sigmaSize, float const &cv, float const &variance, bool const &nuisance, bool const &constrained, float const &lowerBound, float const &upperBound)
 
std::string const Name () const
 
cmf::ParType_t const ParType () const
 
double const & Value () const
 
uint8_t const & Key () const
 
cmf::DetType_t const Detector () const
 
float const & CentralValue () const
 
float const & Sigma () const
 
float const & Variance () const
 
bool const & IsFixed () const
 
bool IsOscPar () const
 
bool const & IsConstrained () const
 
bool const & IsNuisance () const
 
float const & LowerBound () const
 
float const & UpperBound () const
 
void SetValue (double const &val)
 
bool operator< (cmf::Parameter const &other) const
 
bool operator== (cmf::Parameter const &other) const
 

Private Attributes

uint8_t fKey
 key for this parameter More...
 
uint8_t fDetector
 which detector is this parameter for? More...
 
double fVal
 current value for the parameter in the fit More...
 
float fCentralVal
 central value for the parameter More...
 
float fSigmaSize
 size of 1 sigma More...
 
float fVariance
 amount parameter can vary when making random universes More...
 
bool fIsFixed
 is this parameter fixed during fits? More...
 
bool fIsNuisance
 is this parameter treated as a nuisance parameter? More...
 
bool fIsConstrained
 is this parameter constrained in allowed values? More...
 
float fLowerBound
 lower bound for the constrained parameter More...
 
float fUpperBound
 upper bound for the constrained parameter More...
 
uint8_t fParType
 type of paramter this is More...
 

Friends

std::ostream & operator<< (std::ostream &o, cmf::Parameter const &par)
 

Detailed Description

Definition at line 115 of file Parameter.h.

Constructor & Destructor Documentation

cmf::Parameter::Parameter ( )

Definition at line 97 of file Parameter.cxx.

101  , fSigmaSize (1.e-5 )
102  , fVariance (1.e-5 )
103  , fIsFixed (false )
104  , fIsNuisance (false )
105  , fIsConstrained(false )
109  {
110  }
float fSigmaSize
size of 1 sigma
Definition: Parameter.h:159
static const double kGarbageDouble
Definition: Constants.h:18
float fCentralVal
central value for the parameter
Definition: Parameter.h:158
bool fIsConstrained
is this parameter constrained in allowed values?
Definition: Parameter.h:163
float fUpperBound
upper bound for the constrained parameter
Definition: Parameter.h:165
float fLowerBound
lower bound for the constrained parameter
Definition: Parameter.h:164
static const float kGarbageFloat
Definition: Constants.h:19
uint8_t fDetector
which detector is this parameter for?
Definition: Parameter.h:156
bool fIsNuisance
is this parameter treated as a nuisance parameter?
Definition: Parameter.h:162
double fVal
current value for the parameter in the fit
Definition: Parameter.h:157
float fVariance
amount parameter can vary when making random universes
Definition: Parameter.h:160
bool fIsFixed
is this parameter fixed during fits?
Definition: Parameter.h:161
Float_t e
Definition: plot.C:35
uint8_t fParType
type of paramter this is
Definition: Parameter.h:166
cmf::Parameter::Parameter ( std::string const &  name,
cmf::DetType_t const &  det,
double const &  val,
bool const &  fixed,
float const &  sigmaSize,
float const &  cv,
float const &  variance,
bool const &  nuisance,
bool const &  constrained,
float const &  lowerBound,
float const &  upperBound 
)

Definition at line 113 of file Parameter.cxx.

References e, fIsFixed, fIsNuisance, fKey, fParType, fVariance, cmf::IsOscillationParameter(), cmf::kCalibSystPar, cmf::kCMFNormSystPar, cmf::kCMFSystPar, cmf::kCMFWeightPar, cmf::kEShiftSystPar, cmf::kFirstCalibrationVar, cmf::kFirstEShiftVar, cmf::kFirstNormalizationVar, cmf::kFirstSigmaVar, cmf::kLastCalibrationVar, cmf::kLastEShiftVar, cmf::kLastNormalizationVar, cmf::kLastSigmaVar, cmf::kOscPar, cmf::kOtherSystPar, cmf::kPPFXFluxCVWgt, cmf::kRPARES_Weight, cmf::kXSecCV2020Wgt, cmf::kXSecCVPPFX_Weight, MF_LOG_WARNING, cmf::StringToOscParmType(), and cmf::VarNameToKey().

124  : fDetector (det )
125  , fVal (val )
126  , fCentralVal (cv )
127  , fSigmaSize (sigmaSize )
128  , fVariance (variance )
129  , fIsFixed (fixed )
130  , fIsNuisance (nuisance )
131  , fIsConstrained(constrained )
132  , fLowerBound (lowerBound )
133  , fUpperBound (upperBound )
135  {
136  if(fVariance < 1.e-5) fVariance = 1.e-5;
137 
141  }
142  else{
150  else if (fKey >= kFirstEShiftVar && fKey <= cmf::kLastEShiftVar)
154  else
156  }
157 
158 
159  // sanity check warning - if the parameter is fixed and labeled as nuisance,
160  // tell the user that the fixed part wins
161  if(fIsFixed && fIsNuisance){
162  MF_LOG_WARNING("Parameter")
163  << name
164  << " is set to be fixed but is also set to be a nuisance parameter, "
165  << "assume that leaving it fixed is correct and set IsNuisance to "
166  << " false";
167 
168  fIsNuisance = false;
169  }
170 
171  }
const XML_Char * name
Definition: expat.h:151
float fSigmaSize
size of 1 sigma
Definition: Parameter.h:159
float fCentralVal
central value for the parameter
Definition: Parameter.h:158
bool fIsConstrained
is this parameter constrained in allowed values?
Definition: Parameter.h:163
float fUpperBound
upper bound for the constrained parameter
Definition: Parameter.h:165
static uint8_t VarNameToKey(std::string const &name)
Definition: StaticFuncs.h:395
float fLowerBound
lower bound for the constrained parameter
Definition: Parameter.h:164
const std::string cv[Ncv]
uint8_t fDetector
which detector is this parameter for?
Definition: Parameter.h:156
bool fIsNuisance
is this parameter treated as a nuisance parameter?
Definition: Parameter.h:162
double fVal
current value for the parameter in the fit
Definition: Parameter.h:157
static bool IsOscillationParameter(std::string const &str)
float fVariance
amount parameter can vary when making random universes
Definition: Parameter.h:160
bool fIsFixed
is this parameter fixed during fits?
Definition: Parameter.h:161
uint8_t fKey
key for this parameter
Definition: Parameter.h:155
#define MF_LOG_WARNING(category)
Float_t e
Definition: plot.C:35
static cmf::OscParm_t StringToOscParmType(std::string const &str)
uint8_t fParType
type of paramter this is
Definition: Parameter.h:166

Member Function Documentation

float const& cmf::Parameter::CentralValue ( ) const
inline

Definition at line 137 of file Parameter.h.

137 { return fCentralVal; }
float fCentralVal
central value for the parameter
Definition: Parameter.h:158
cmf::DetType_t const cmf::Parameter::Detector ( ) const
inline

Definition at line 136 of file Parameter.h.

References cmf::ParameterSpaceLoc::fDetector.

Referenced by cmf::ParameterSpaceLoc::InsertParameter(), and cmf::Location::InsertParameter().

136 { return (cmf::DetType_t)fDetector; }
enum cmf::det_type DetType_t
uint8_t fDetector
which detector is this parameter for?
Definition: Parameter.h:156
bool const& cmf::Parameter::IsConstrained ( ) const
inline

Definition at line 142 of file Parameter.h.

Referenced by cmf::CovarianceFitHelper::InitializeMinimizer(), and cmf::operator<<().

142 { return fIsConstrained; }
bool fIsConstrained
is this parameter constrained in allowed values?
Definition: Parameter.h:163
bool const& cmf::Parameter::IsFixed ( ) const
inline

Definition at line 140 of file Parameter.h.

Referenced by cmf::operator<<().

140 { return fIsFixed; }
bool fIsFixed
is this parameter fixed during fits?
Definition: Parameter.h:161
bool const& cmf::Parameter::IsNuisance ( ) const
inline

Definition at line 143 of file Parameter.h.

Referenced by cmf::ChiSqrCalculator::ChiSqrNuisance(), and cmf::operator<<().

143 { return fIsNuisance; }
bool fIsNuisance
is this parameter treated as a nuisance parameter?
Definition: Parameter.h:162
bool cmf::Parameter::IsOscPar ( ) const
inline

Definition at line 141 of file Parameter.h.

References cmf::kOscPar.

Referenced by cmf::operator<<().

141 { return (fParType == cmf::kOscPar); }
uint8_t fParType
type of paramter this is
Definition: Parameter.h:166
uint8_t const& cmf::Parameter::Key ( ) const
inline

Definition at line 135 of file Parameter.h.

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

135 { return fKey; }
uint8_t fKey
key for this parameter
Definition: Parameter.h:155
float const& cmf::Parameter::LowerBound ( ) const
inline

Definition at line 144 of file Parameter.h.

Referenced by cmf::operator<<().

144 { return fLowerBound; }
float fLowerBound
lower bound for the constrained parameter
Definition: Parameter.h:164
std::string const cmf::Parameter::Name ( ) const
inline

Definition at line 132 of file Parameter.h.

References cmf::cOscParams_Strings(), cmf::KeyToVarName(), and cmf::kOscPar.

Referenced by cmf::ParameterSpaceLoc::InsertParameter(), cmf::Location::InsertParameter(), and cmf::operator<<().

uint8_t fKey
key for this parameter
Definition: Parameter.h:155
static std::string KeyToVarName(uint8_t const &key)
Definition: StaticFuncs.h:410
uint8_t fParType
type of paramter this is
Definition: Parameter.h:166
const std::vector< std::string > cOscParams_Strings({"L","Rho","Dmsq21","Dmsq32","Th12","Th13","Th23","dCP","Th14","Th24","Th34","Dmsq41","d24","Eps_ee","Eps_emu","Eps_etau","Eps_mumu","Eps_mutau","Eps_tautau","Delta_emu","Delta_etau","Delta_mutau"})
bool cmf::Parameter::operator< ( cmf::Parameter const &  other) const

Definition at line 174 of file Parameter.cxx.

References fKey, and Key().

174  {
175  return fKey < other.Key();
176  }
uint8_t fKey
key for this parameter
Definition: Parameter.h:155
bool cmf::Parameter::operator== ( cmf::Parameter const &  other) const

Definition at line 179 of file Parameter.cxx.

References fKey, and Key().

179  {
180  return fKey == other.Key();
181  }
uint8_t fKey
key for this parameter
Definition: Parameter.h:155
cmf::ParType_t const cmf::Parameter::ParType ( ) const
inline

Definition at line 133 of file Parameter.h.

133 { return (cmf::ParType_t)fParType; }
enum cmf::par_type ParType_t
uint8_t fParType
type of paramter this is
Definition: Parameter.h:166
void cmf::Parameter::SetValue ( double const &  val)
inline

Definition at line 147 of file Parameter.h.

References msf_helper::o, ana::operator<(), cmf::operator<<(), operator==(), fhicl::other, par, and febshutoff_auto::val.

147 { fVal = val; }
double fVal
current value for the parameter in the fit
Definition: Parameter.h:157
float const& cmf::Parameter::Sigma ( ) const
inline

Definition at line 138 of file Parameter.h.

Referenced by cmf::ShifterAndWeighter::ShiftForParameter().

138 { return fSigmaSize; }
float fSigmaSize
size of 1 sigma
Definition: Parameter.h:159
float const& cmf::Parameter::UpperBound ( ) const
inline

Definition at line 145 of file Parameter.h.

Referenced by cmf::operator<<().

145 { return fUpperBound; }
float fUpperBound
upper bound for the constrained parameter
Definition: Parameter.h:165
double const& cmf::Parameter::Value ( ) const
inline

Definition at line 134 of file Parameter.h.

Referenced by cmf::ShifterAndWeighter::CurrentParameterValue(), cmf::Location::InsertParameter(), cmf::operator<<(), and cmf::CovarianceMatrixMaker::SetSystematicParameter().

134 { return fVal; }
double fVal
current value for the parameter in the fit
Definition: Parameter.h:157
float const& cmf::Parameter::Variance ( ) const
inline

Definition at line 139 of file Parameter.h.

139 { return fVariance; }
float fVariance
amount parameter can vary when making random universes
Definition: Parameter.h:160

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
cmf::Parameter const &  par 
)
friend

Definition at line 184 of file Parameter.cxx.

184  {
185 
186  o << "-- parameter: "
187  << std::setw(30) << par.Name() << std::setw(10)
188  << " val: " << par.Value()
189  << " fixed: " << par.IsFixed()
190  << " oscillation " << par.IsOscPar()
191  << " nuisance " << par.IsNuisance()
192  << " constrained " << par.IsConstrained()
193  << " lower: " << par.LowerBound()
194  << " upper: " << par.UpperBound()
195  << std::endl;
196 
197  return o;
198  }
Int_t par
Definition: SimpleIterate.C:24

Member Data Documentation

float cmf::Parameter::fCentralVal
private

central value for the parameter

Definition at line 158 of file Parameter.h.

uint8_t cmf::Parameter::fDetector
private

which detector is this parameter for?

Definition at line 156 of file Parameter.h.

bool cmf::Parameter::fIsConstrained
private

is this parameter constrained in allowed values?

Definition at line 163 of file Parameter.h.

bool cmf::Parameter::fIsFixed
private

is this parameter fixed during fits?

Definition at line 161 of file Parameter.h.

Referenced by Parameter().

bool cmf::Parameter::fIsNuisance
private

is this parameter treated as a nuisance parameter?

Definition at line 162 of file Parameter.h.

Referenced by Parameter().

uint8_t cmf::Parameter::fKey
private

key for this parameter

Definition at line 155 of file Parameter.h.

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

float cmf::Parameter::fLowerBound
private

lower bound for the constrained parameter

Definition at line 164 of file Parameter.h.

uint8_t cmf::Parameter::fParType
private

type of paramter this is

Definition at line 166 of file Parameter.h.

Referenced by Parameter().

float cmf::Parameter::fSigmaSize
private

size of 1 sigma

Definition at line 159 of file Parameter.h.

float cmf::Parameter::fUpperBound
private

upper bound for the constrained parameter

Definition at line 165 of file Parameter.h.

double cmf::Parameter::fVal
private

current value for the parameter in the fit

Definition at line 157 of file Parameter.h.

float cmf::Parameter::fVariance
private

amount parameter can vary when making random universes

Definition at line 160 of file Parameter.h.

Referenced by Parameter().


The documentation for this class was generated from the following files: