CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
MillePedeVariables Class Reference

#include <MillePedeVariables.h>

Inheritance diagram for MillePedeVariables:
AlignmentUserVariables

Public Member Functions

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

Private Member Functions

 MillePedeVariables ()
 

Private Attributes

std::vector< float > myDiffBefore
 
std::vector< float > myGlobalCor
 
unsigned int myHitsX
 
unsigned int myHitsY
 
std::vector< bool > myIsValid
 
unsigned int myLabel
 
std::string myName
 
std::vector< float > myParameter
 <= 0 means fixed More...
 
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 21 of file MillePedeVariables.h.

Constructor & Destructor Documentation

MillePedeVariables::MillePedeVariables ( unsigned int  nParams,
unsigned int  label,
const std::string &  name 
)

constructor

Definition at line 15 of file MillePedeVariables.cc.

References mps_fire::i, and setAllDefault().

16  : myIsValid(nParams), myDiffBefore(nParams), myGlobalCor(nParams), myPreSigma(nParams),
17  myParameter(nParams), mySigma(nParams), myHitsX(0), myHitsY(0), myLabel(label), myName(name)
18 {
19  for (unsigned int i = 0; i < nParams; ++i) {
20  this->setAllDefault(i);
21  }
22 }
unsigned int label() const
get alignable label as used by pede
std::vector< bool > myIsValid
const std::string & name() const
get alignable name
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)
MillePedeVariables::~MillePedeVariables ( )
overridedefault

destructor

MillePedeVariables::MillePedeVariables ( )
inlineprivate

Definition at line 92 of file MillePedeVariables.h.

Referenced by clone().

92 {} // make unusable default constructor

Member Function Documentation

MillePedeVariables* MillePedeVariables::clone ( void  ) const
inlineoverridevirtual

clone method (using copy constructor)

Implements AlignmentUserVariables.

Definition at line 29 of file MillePedeVariables.h.

References MillePedeVariables(), and setAllDefault().

29 { return new MillePedeVariables(*this);}
const std::vector<float>& MillePedeVariables::diffBefore ( ) const
inline

get array of differences to start value

Definition at line 42 of file MillePedeVariables.h.

References myDiffBefore.

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

42 {return myDiffBefore;}
std::vector< float > myDiffBefore
std::vector<float>& MillePedeVariables::diffBefore ( )
inline

get array of differences to start value for changing it

Definition at line 44 of file MillePedeVariables.h.

References myDiffBefore.

44 {return myDiffBefore;}
std::vector< float > myDiffBefore
const std::vector<float>& MillePedeVariables::globalCor ( ) const
inline

get global correlation array

Definition at line 47 of file MillePedeVariables.h.

References myGlobalCor.

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

47 {return myGlobalCor;}
std::vector< float > myGlobalCor
std::vector<float>& MillePedeVariables::globalCor ( )
inline

get global correlation array for changing it

Definition at line 49 of file MillePedeVariables.h.

References myGlobalCor.

49 {return myGlobalCor;}
std::vector< float > myGlobalCor
unsigned int MillePedeVariables::hitsX ( ) const
inline

get number of hits for x-measurement

Definition at line 77 of file MillePedeVariables.h.

References myHitsX.

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

77 {return myHitsX;}
unsigned int MillePedeVariables::hitsY ( ) const
inline

get number of hits for y-measurement

Definition at line 83 of file MillePedeVariables.h.

References myHitsY.

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

83 {return myHitsY;}
void MillePedeVariables::increaseHitsX ( unsigned int  add = 1)
inline

increase hits for x-measurement

Definition at line 79 of file MillePedeVariables.h.

References PVValHelper::add(), and myHitsX.

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

79 { myHitsX += add;}
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
void MillePedeVariables::increaseHitsY ( unsigned int  add = 1)
inline

increase hits for y-measurement

Definition at line 85 of file MillePedeVariables.h.

References PVValHelper::add(), and myHitsY.

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

85 { myHitsY += add;}
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
bool MillePedeVariables::isFixed ( unsigned int  nParam) const

true if parameter is fixed

Definition at line 40 of file MillePedeVariables.cc.

References preSigma(), and size().

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

41 {
42  if (nParam >= this->size()) return false;
43 
44  return (this->preSigma()[nParam] < 0.);
45 }
unsigned int size() const
number of parameters
const std::vector< float > & preSigma() const
get array of presigmas (<= 0: means fixed)
const std::vector<bool>& MillePedeVariables::isValid ( void  ) const
inline
std::vector<bool>& MillePedeVariables::isValid ( void  )
inline

get valid flag array for changing it

Definition at line 39 of file MillePedeVariables.h.

References myIsValid.

Referenced by ntupleDataFormat._Object::_checkIsValid(), and core.AutoHandle.AutoHandle::ReallyLoad().

39 { return myIsValid;}
std::vector< bool > myIsValid
unsigned int MillePedeVariables::label ( ) const
inline
const std::string& MillePedeVariables::name ( ) const
inline
const std::vector<float>& MillePedeVariables::parameter ( ) const
inline

get array of parameters

Definition at line 62 of file MillePedeVariables.h.

References myParameter.

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

62 {return myParameter;}
std::vector< float > myParameter
<= 0 means fixed
std::vector<float>& MillePedeVariables::parameter ( )
inline

get array of parameters for changing it

Definition at line 64 of file MillePedeVariables.h.

References myParameter.

64 {return myParameter;}
std::vector< float > myParameter
<= 0 means fixed
const std::vector<float>& MillePedeVariables::preSigma ( ) const
inline

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

Definition at line 52 of file MillePedeVariables.h.

References myPreSigma.

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

52 {return myPreSigma;}
std::vector< float > myPreSigma
std::vector<float>& MillePedeVariables::preSigma ( )
inline

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

Definition at line 54 of file MillePedeVariables.h.

References myPreSigma.

54 {return myPreSigma;}
std::vector< float > 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, mySigma, and size().

Referenced by MillePedeAlignmentAlgorithm::buildUserVariables(), clone(), MillePedeVariables(), and PedeReader::setParameter().

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 }
unsigned int size() const
number of parameters
std::vector< bool > myIsValid
std::vector< float > myDiffBefore
std::vector< float > myParameter
<= 0 means fixed
std::vector< float > mySigma
std::vector< float > myPreSigma
std::vector< float > myGlobalCor
void MillePedeVariables::setHitsX ( unsigned int  hitsX)
inline

Definition at line 80 of file MillePedeVariables.h.

References hitsX(), and myHitsX.

Referenced by MillePedeVariablesIORoot::readOne().

80 { myHitsX = hitsX;}
unsigned int hitsX() const
get number of hits for x-measurement
void MillePedeVariables::setHitsY ( unsigned int  hitsY)
inline

Definition at line 86 of file MillePedeVariables.h.

References hitsY(), isFixed(), and myHitsY.

Referenced by MillePedeVariablesIORoot::readOne().

86 { myHitsY = hitsY;}
unsigned int hitsY() const
get number of hits for y-measurement
void MillePedeVariables::setLabel ( unsigned int  label)
inline

set alignable label as used by pede

Definition at line 69 of file MillePedeVariables.h.

References label(), and myLabel.

Referenced by SequenceTypes.DummyModule::__init__(), SequenceTypes.DummyBooleanModule::__init__(), and Vispa.Gui.FindDialog.FindDialog::reset().

69 { myLabel = label;}
unsigned int label() const
get alignable label as used by pede
void MillePedeVariables::setName ( const std::string &  name)
inline

set alignable name

Definition at line 74 of file MillePedeVariables.h.

References myName, and name().

Referenced by Vispa.Gui.PortWidget.PortWidget::__init__(), and Vispa.Views.PropertyView.Property::__init__().

74 { myName = name;}
const std::string & name() const
get alignable name
const std::vector<float>& MillePedeVariables::sigma ( ) const
inline

get array of sigmas

Definition at line 57 of file MillePedeVariables.h.

References mySigma.

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

57 {return mySigma;}
std::vector< float > mySigma
std::vector<float>& MillePedeVariables::sigma ( )
inline

get array of sigmas for changing it

Definition at line 59 of file MillePedeVariables.h.

References mySigma.

59 {return mySigma;}
std::vector< float > mySigma
unsigned int MillePedeVariables::size ( void  ) const
inline

Member Data Documentation

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

Definition at line 95 of file MillePedeVariables.h.

Referenced by diffBefore(), and setAllDefault().

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

Definition at line 96 of file MillePedeVariables.h.

Referenced by globalCor(), and setAllDefault().

unsigned int MillePedeVariables::myHitsX
private

Definition at line 100 of file MillePedeVariables.h.

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

unsigned int MillePedeVariables::myHitsY
private

Definition at line 101 of file MillePedeVariables.h.

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

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

Definition at line 94 of file MillePedeVariables.h.

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

unsigned int MillePedeVariables::myLabel
private

Definition at line 102 of file MillePedeVariables.h.

Referenced by label(), and setLabel().

std::string MillePedeVariables::myName
private

Definition at line 103 of file MillePedeVariables.h.

Referenced by name(), and setName().

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

<= 0 means fixed

Definition at line 98 of file MillePedeVariables.h.

Referenced by parameter(), and setAllDefault().

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

Definition at line 97 of file MillePedeVariables.h.

Referenced by preSigma(), and setAllDefault().

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

Definition at line 99 of file MillePedeVariables.h.

Referenced by setAllDefault(), and sigma().