CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/Alignment/MillePedeAlignmentAlgorithm/src/MillePedeVariables.cc

Go to the documentation of this file.
00001 
00012 #include "Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeVariables.h"
00013 
00014 //__________________________________________________________________________________________________
00015 MillePedeVariables::MillePedeVariables(unsigned int nParams, unsigned int label)
00016   :  myIsValid(nParams), myDiffBefore(nParams), myGlobalCor(nParams), myPreSigma(nParams),
00017      myParameter(nParams), mySigma(nParams), myHitsX(0), myHitsY(0), myLabel(label)
00018 {
00019   for (unsigned int i = 0; i < nParams; ++i) {
00020     this->setAllDefault(i);
00021   }
00022 }
00023 
00024 //__________________________________________________________________________________________________
00025 bool MillePedeVariables::setAllDefault(unsigned int nParam)
00026 {
00027   if (nParam >= this->size()) return false;
00028 
00029   myIsValid[nParam] = true;
00030   myDiffBefore[nParam] = -999999.;
00031   myGlobalCor[nParam] = -.2; // -1. seems to occur also in pede output
00032   myPreSigma[nParam] = -11.; // -1 means fixed in pede
00033   myParameter[nParam] = -999999.;
00034   mySigma[nParam] = -1.;
00035 
00036   return true;
00037 }
00038 
00039 //__________________________________________________________________________________________________
00040 bool MillePedeVariables::isFixed(unsigned int nParam) const
00041 {
00042   if (nParam >= this->size()) return false;
00043   
00044   return (this->preSigma()[nParam] < 0.);
00045 }