CMS 3D CMS Logo

MillePedeVariables Class Reference

container for millepede specific variables attached to AlignmentParameters More...

#include <Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeVariables.h>

Inheritance diagram for MillePedeVariables:

AlignmentUserVariables

List of all members.

Public Member Functions

virtual MillePedeVariablesclone () const
 clone method (using copy constructor)
std::vector< float > & diffBefore ()
 get array of differences to start value for changing it
const std::vector< float > & diffBefore () const
 get array of differences to start value
std::vector< float > & globalCor ()
 get global correlation array for changing it
const std::vector< float > & globalCor () const
 get global correlation array
unsigned int hitsX () const
 get number of hits for x-measurement
unsigned int hitsY () const
 get number of hits for y-measurement
void increaseHitsX (unsigned int add=1)
 increase hits for x-measurement
void increaseHitsY (unsigned int add=1)
 increase hits for y-measurement
bool isFixed (unsigned int nParam) const
 true if parameter is fixed
std::vector< bool > & isValid ()
 get valid flag array for changing it
const std::vector< bool > & isValid () const
 get valid flag array
unsigned int label () const
 get alignable label as used by pede
 MillePedeVariables (unsigned int nParams)
 constructor
std::vector< float > & parameter ()
 get array of parameters for changing it
const std::vector< float > & parameter () const
 get array of parameters
std::vector< float > & preSigma ()
 get array of presigmas (<= 0: means fixed) for changing it
const std::vector< float > & preSigma () const
 get array of presigmas (<= 0: means fixed)
bool setAllDefault (unsigned int nParam)
 set default values for all data concerning nParam (false if nParam out of range)
void setHitsX (unsigned int hitsX)
void setHitsY (unsigned int hitsY)
void setLabel (unsigned int label)
 set alignable label as used by pede
std::vector< float > & sigma ()
 get array of sigmas for changing it
const std::vector< float > & sigma () const
 get array of sigmas
unsigned int size () const
 number of parameters
virtual ~MillePedeVariables ()
 destructor

Private Attributes

std::vector< float > myDiffBefore
std::vector< float > myGlobalCor
unsigned int myHitsX
unsigned int myHitsY
std::vector< boolmyIsValid
unsigned int myLabel
std::vector< float > myParameter
 <= 0 means fixed
std::vector< float > myPreSigma
std::vector< float > mySigma


Detailed Description

container for millepede specific variables attached to AlignmentParameters

Author:
: Gero Flucke date : November 2006
Revision
1.3
Date
2007/03/16 17:03:02
(last update by
Author
flucke
)

Definition at line 20 of file MillePedeVariables.h.


Constructor & Destructor Documentation

MillePedeVariables::MillePedeVariables ( unsigned int  nParams  )  [explicit]

constructor

Definition at line 15 of file MillePedeVariables.cc.

References i, and setAllDefault().

Referenced by clone().

00016   :  myIsValid(nParams), myDiffBefore(nParams), myGlobalCor(nParams), myPreSigma(nParams),
00017      myParameter(nParams), mySigma(nParams), myHitsX(0), myHitsY(0), myLabel(0)
00018 {
00019   for (unsigned int i = 0; i < nParams; ++i) {
00020     this->setAllDefault(i);
00021   }
00022 }

virtual MillePedeVariables::~MillePedeVariables (  )  [inline, virtual]

destructor

Definition at line 26 of file MillePedeVariables.h.

00026 {}


Member Function Documentation

virtual MillePedeVariables* MillePedeVariables::clone ( void   )  const [inline, virtual]

clone method (using copy constructor)

Implements AlignmentUserVariables.

Definition at line 28 of file MillePedeVariables.h.

References MillePedeVariables().

00028 { return new MillePedeVariables(*this);}

std::vector<float>& MillePedeVariables::diffBefore (  )  [inline]

get array of differences to start value for changing it

Definition at line 43 of file MillePedeVariables.h.

References myDiffBefore.

00043 {return myDiffBefore;}

const std::vector<float>& MillePedeVariables::diffBefore (  )  const [inline]

get array of differences to start value

Definition at line 41 of file MillePedeVariables.h.

References myDiffBefore.

Referenced by MillePedeVariablesIORoot::readOne(), PedeReader::setParameter(), and MillePedeVariablesIORoot::writeOne().

00041 {return myDiffBefore;}

std::vector<float>& MillePedeVariables::globalCor (  )  [inline]

get global correlation array for changing it

Definition at line 48 of file MillePedeVariables.h.

References myGlobalCor.

00048 {return myGlobalCor;}

const std::vector<float>& MillePedeVariables::globalCor (  )  const [inline]

get global correlation array

Definition at line 46 of file MillePedeVariables.h.

References myGlobalCor.

Referenced by MillePedeVariablesIORoot::readOne(), PedeReader::setParameter(), and MillePedeVariablesIORoot::writeOne().

00046 {return myGlobalCor;}

unsigned int MillePedeVariables::hitsX (  )  const [inline]

get number of hits for x-measurement

Definition at line 71 of file MillePedeVariables.h.

References myHitsX.

Referenced by MillePedeAlignmentAlgorithm::addHits(), and MillePedeVariablesIORoot::writeOne().

00071 {return myHitsX;}

unsigned int MillePedeVariables::hitsY (  )  const [inline]

get number of hits for y-measurement

Definition at line 77 of file MillePedeVariables.h.

References myHitsY.

Referenced by MillePedeAlignmentAlgorithm::addHits(), and MillePedeVariablesIORoot::writeOne().

00077 {return myHitsY;}

void MillePedeVariables::increaseHitsX ( unsigned int  add = 1  )  [inline]

increase hits for x-measurement

Definition at line 73 of file MillePedeVariables.h.

References myHitsX.

Referenced by MillePedeAlignmentAlgorithm::addHits(), and MillePedeAlignmentAlgorithm::run().

00073 { myHitsX += add;}

void MillePedeVariables::increaseHitsY ( unsigned int  add = 1  )  [inline]

increase hits for y-measurement

Definition at line 79 of file MillePedeVariables.h.

References myHitsY.

Referenced by MillePedeAlignmentAlgorithm::addHits(), and MillePedeAlignmentAlgorithm::run().

00079 { myHitsY += add;}

bool MillePedeVariables::isFixed ( unsigned int  nParam  )  const

true if parameter is fixed

Definition at line 40 of file MillePedeVariables.cc.

Referenced by PedeReader::setParameter().

00041 {
00042   if (nParam >= this->size()) return false;
00043   
00044   return (this->preSigma()[nParam] < 0.);
00045 }

std::vector<bool>& MillePedeVariables::isValid ( void   )  [inline]

get valid flag array for changing it

Definition at line 38 of file MillePedeVariables.h.

References myIsValid.

00038 { return myIsValid;}

const std::vector<bool>& MillePedeVariables::isValid ( void   )  const [inline]

get valid flag array

Definition at line 36 of file MillePedeVariables.h.

References myIsValid.

Referenced by MillePedeVariablesIORoot::readOne(), PedeReader::setParameter(), and MillePedeVariablesIORoot::writeOne().

00036 { return myIsValid;}

unsigned int MillePedeVariables::label (  )  const [inline]

get alignable label as used by pede

Definition at line 66 of file MillePedeVariables.h.

References myLabel.

Referenced by MillePedeVariablesIORoot::writeOne().

00066 {return myLabel;}

std::vector<float>& MillePedeVariables::parameter (  )  [inline]

get array of parameters for changing it

Definition at line 63 of file MillePedeVariables.h.

References myParameter.

00063 {return myParameter;}

const std::vector<float>& MillePedeVariables::parameter (  )  const [inline]

get array of parameters

Definition at line 61 of file MillePedeVariables.h.

References myParameter.

Referenced by MillePedeVariablesIORoot::readOne(), PedeReader::setParameter(), and MillePedeVariablesIORoot::writeOne().

00061 {return myParameter;}

std::vector<float>& MillePedeVariables::preSigma (  )  [inline]

get array of presigmas (<= 0: means fixed) for changing it

Definition at line 53 of file MillePedeVariables.h.

References myPreSigma.

00053 {return myPreSigma;}

const std::vector<float>& MillePedeVariables::preSigma (  )  const [inline]

get array of presigmas (<= 0: means fixed)

Definition at line 51 of file MillePedeVariables.h.

References myPreSigma.

Referenced by MillePedeVariablesIORoot::readOne(), PedeReader::setParameter(), and MillePedeVariablesIORoot::writeOne().

00051 {return myPreSigma;}

bool MillePedeVariables::setAllDefault ( unsigned int  nParam  ) 

set default values for all data concerning nParam (false if nParam out of range)

Definition at line 25 of file MillePedeVariables.cc.

References myDiffBefore, myGlobalCor, myIsValid, myParameter, myPreSigma, and mySigma.

Referenced by MillePedeVariables(), and PedeReader::setParameter().

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 }

void MillePedeVariables::setHitsX ( unsigned int  hitsX  )  [inline]

Definition at line 74 of file MillePedeVariables.h.

References myHitsX.

Referenced by MillePedeVariablesIORoot::readOne().

00074 { myHitsX = hitsX;}

void MillePedeVariables::setHitsY ( unsigned int  hitsY  )  [inline]

Definition at line 80 of file MillePedeVariables.h.

References myHitsY.

Referenced by MillePedeVariablesIORoot::readOne().

00080 { myHitsY = hitsY;}

void MillePedeVariables::setLabel ( unsigned int  label  )  [inline]

set alignable label as used by pede

Definition at line 68 of file MillePedeVariables.h.

References myLabel.

Referenced by MillePedeVariablesIORoot::readOne(), and PedeReader::setParameter().

00068 { myLabel = label;}

std::vector<float>& MillePedeVariables::sigma (  )  [inline]

get array of sigmas for changing it

Definition at line 58 of file MillePedeVariables.h.

References mySigma.

00058 {return mySigma;}

const std::vector<float>& MillePedeVariables::sigma (  )  const [inline]

get array of sigmas

Definition at line 56 of file MillePedeVariables.h.

References mySigma.

Referenced by MillePedeVariablesIORoot::readOne(), PedeReader::setParameter(), and MillePedeVariablesIORoot::writeOne().

00056 {return mySigma;}

unsigned int MillePedeVariables::size ( void   )  const [inline]

number of parameters

Definition at line 33 of file MillePedeVariables.h.

References myIsValid.

Referenced by MillePedeAlignmentAlgorithm::addHits(), and MillePedeVariablesIORoot::writeOne().

00033 {return myIsValid.size();}


Member Data Documentation

std::vector<float> MillePedeVariables::myDiffBefore [private]

Definition at line 87 of file MillePedeVariables.h.

Referenced by diffBefore(), and setAllDefault().

std::vector<float> MillePedeVariables::myGlobalCor [private]

Definition at line 88 of file MillePedeVariables.h.

Referenced by globalCor(), and setAllDefault().

unsigned int MillePedeVariables::myHitsX [private]

Definition at line 92 of file MillePedeVariables.h.

Referenced by hitsX(), increaseHitsX(), and setHitsX().

unsigned int MillePedeVariables::myHitsY [private]

Definition at line 93 of file MillePedeVariables.h.

Referenced by hitsY(), increaseHitsY(), and setHitsY().

std::vector<bool> MillePedeVariables::myIsValid [private]

Definition at line 86 of file MillePedeVariables.h.

Referenced by isValid(), setAllDefault(), and size().

unsigned int MillePedeVariables::myLabel [private]

Definition at line 94 of file MillePedeVariables.h.

Referenced by label(), and setLabel().

std::vector<float> MillePedeVariables::myParameter [private]

<= 0 means fixed

Definition at line 90 of file MillePedeVariables.h.

Referenced by parameter(), and setAllDefault().

std::vector<float> MillePedeVariables::myPreSigma [private]

Definition at line 89 of file MillePedeVariables.h.

Referenced by preSigma(), and setAllDefault().

std::vector<float> MillePedeVariables::mySigma [private]

Definition at line 91 of file MillePedeVariables.h.

Referenced by setAllDefault(), and sigma().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:28:16 2009 for CMSSW by  doxygen 1.5.4