CMS 3D CMS Logo

MillePedeVariables.cc
Go to the documentation of this file.
1 
13 
14 //__________________________________________________________________________________________________
15 MillePedeVariables::MillePedeVariables(unsigned int nParams, unsigned int label)
16  : myIsValid(nParams), myDiffBefore(nParams), myGlobalCor(nParams), myPreSigma(nParams),
17  myParameter(nParams), mySigma(nParams), myHitsX(0), myHitsY(0), myLabel(label)
18 {
19  for (unsigned int i = 0; i < nParams; ++i) {
20  this->setAllDefault(i);
21  }
22 }
23 
24 //__________________________________________________________________________________________________
25 bool MillePedeVariables::setAllDefault(unsigned int nParam)
26 {
27  if (nParam >= this->size()) return false;
28 
29  myIsValid[nParam] = true;
30  myDiffBefore[nParam] = -999999.;
31  myGlobalCor[nParam] = -.2; // -1. seems to occur also in pede output
32  myPreSigma[nParam] = -11.; // -1 means fixed in pede
33  myParameter[nParam] = -999999.;
34  mySigma[nParam] = -1.;
35 
36  return true;
37 }
38 
39 //__________________________________________________________________________________________________
40 bool MillePedeVariables::isFixed(unsigned int nParam) const
41 {
42  if (nParam >= this->size()) return false;
43 
44  return (this->preSigma()[nParam] < 0.);
45 }
int i
Definition: DBlmapReader.cc:9
unsigned int size() const
number of parameters
bool isFixed(unsigned int nParam) const
true if parameter is fixed
std::vector< bool > myIsValid
const std::vector< float > & preSigma() const
get array of presigmas (<= 0: means fixed)
std::vector< float > myDiffBefore
std::vector< float > myParameter
<= 0 means fixed
std::vector< float > mySigma
std::vector< float > myPreSigma
std::vector< float > myGlobalCor
bool setAllDefault(unsigned int nParam)
set default values for all data concerning nParam (false if nParam out of range)