CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MillePedeVariables.cc
Go to the documentation of this file.
1 
13 
14 //__________________________________________________________________________________________________
15 MillePedeVariables::MillePedeVariables(unsigned int nParams, unsigned int label, const std::string& name)
16  : myIsValid(nParams),
17  myDiffBefore(nParams),
18  myGlobalCor(nParams),
19  myPreSigma(nParams),
20  myParameter(nParams),
21  mySigma(nParams),
22  myHitsX(0),
23  myHitsY(0),
24  myLabel(label),
25  myName(name) {
26  for (unsigned int i = 0; i < nParams; ++i) {
27  this->setAllDefault(i);
28  }
29 }
30 
31 //__________________________________________________________________________________________________
32 bool MillePedeVariables::setAllDefault(unsigned int nParam) {
33  if (nParam >= this->size())
34  return false;
35 
36  myIsValid[nParam] = true;
37  myDiffBefore[nParam] = -999999.;
38  myGlobalCor[nParam] = -.2; // -1. seems to occur also in pede output
39  myPreSigma[nParam] = -11.; // -1 means fixed in pede
40  myParameter[nParam] = -999999.;
41  mySigma[nParam] = -1.;
42 
43  return true;
44 }
45 
46 //__________________________________________________________________________________________________
47 bool MillePedeVariables::isFixed(unsigned int nParam) const {
48  if (nParam >= this->size())
49  return false;
50 
51  return (this->preSigma()[nParam] < 0.);
52 }
unsigned int size() const
number of parameters
bool isFixed(unsigned int nParam) const
true if parameter is fixed
std::vector< bool > myIsValid
char const * label
const std::vector< float > & preSigma() const
get array of presigmas (&lt;= 0: means fixed)
std::vector< float > myDiffBefore
std::vector< float > myParameter
&lt;= 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)