Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:39:33

0001 /**
0002  * \file MillePedeVariables.cc
0003  *
0004  *
0005  *  \author    : Gero Flucke
0006  *  date       : November 2006
0007  *  $Revision: 1.4 $
0008  *  $Date: 2007/08/17 17:20:05 $
0009  *  (last update by $Author: flucke $)
0010  */
0011 
0012 #include "Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeVariables.h"
0013 
0014 //__________________________________________________________________________________________________
0015 MillePedeVariables::MillePedeVariables(unsigned int nParams, unsigned int label, const std::string& name)
0016     : myIsValid(nParams),
0017       myDiffBefore(nParams),
0018       myGlobalCor(nParams),
0019       myPreSigma(nParams),
0020       myParameter(nParams),
0021       mySigma(nParams),
0022       myHitsX(0),
0023       myHitsY(0),
0024       myLabel(label),
0025       myName(name) {
0026   for (unsigned int i = 0; i < nParams; ++i) {
0027     this->setAllDefault(i);
0028   }
0029 }
0030 
0031 //__________________________________________________________________________________________________
0032 bool MillePedeVariables::setAllDefault(unsigned int nParam) {
0033   if (nParam >= this->size())
0034     return false;
0035 
0036   myIsValid[nParam] = true;
0037   myDiffBefore[nParam] = -999999.;
0038   myGlobalCor[nParam] = -.2;  // -1. seems to occur also in pede output
0039   myPreSigma[nParam] = -11.;  // -1 means fixed in pede
0040   myParameter[nParam] = -999999.;
0041   mySigma[nParam] = -1.;
0042 
0043   return true;
0044 }
0045 
0046 //__________________________________________________________________________________________________
0047 bool MillePedeVariables::isFixed(unsigned int nParam) const {
0048   if (nParam >= this->size())
0049     return false;
0050 
0051   return (this->preSigma()[nParam] < 0.);
0052 }