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
 
std::vector< float > & diffBefore ()
 get array of differences to start value for changing it More...
 
const std::vector< float > & diffBefore () const
 get array of differences to start value More...
 
std::vector< float > & globalCor ()
 get global correlation array for changing it More...
 
const std::vector< float > & globalCor () const
 get global correlation array 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...
 
std::vector< bool > & isValid ()
 get valid flag array for changing it More...
 
const std::vector< bool > & isValid () const
 get valid flag array 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...
 
std::vector< float > & parameter ()
 get array of parameters for changing it More...
 
const std::vector< float > & parameter () const
 get array of parameters More...
 
std::vector< float > & preSigma ()
 get array of presigmas (<= 0: means fixed) for changing it More...
 
const std::vector< float > & preSigma () const
 get array of presigmas (<= 0: means fixed) 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...
 
std::vector< float > & sigma ()
 get array of sigmas for changing it More...
 
const std::vector< float > & sigma () const
 get array of sigmas 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() [1/2]

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

constructor

Definition at line 15 of file MillePedeVariables.cc.

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 }

References mps_fire::i, and setAllDefault().

◆ ~MillePedeVariables()

MillePedeVariables::~MillePedeVariables ( )
overridedefault

destructor

◆ MillePedeVariables() [2/2]

MillePedeVariables::MillePedeVariables ( )
inlineprivate

Definition at line 91 of file MillePedeVariables.h.

91 {} // make unusable default constructor

Referenced by clone().

Member Function Documentation

◆ clone()

MillePedeVariables* MillePedeVariables::clone ( void  ) const
inlineoverridevirtual

clone method (using copy constructor)

Implements AlignmentUserVariables.

Definition at line 28 of file MillePedeVariables.h.

28 { return new MillePedeVariables(*this); }

References MillePedeVariables().

◆ diffBefore() [1/2]

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

get array of differences to start value for changing it

Definition at line 43 of file MillePedeVariables.h.

43 { return myDiffBefore; }

References myDiffBefore.

◆ diffBefore() [2/2]

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

get array of differences to start value

Definition at line 41 of file MillePedeVariables.h.

41 { return myDiffBefore; }

References myDiffBefore.

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

◆ globalCor() [1/2]

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

get global correlation array for changing it

Definition at line 48 of file MillePedeVariables.h.

48 { return myGlobalCor; }

References myGlobalCor.

◆ globalCor() [2/2]

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

get global correlation array

Definition at line 46 of file MillePedeVariables.h.

46 { return myGlobalCor; }

References myGlobalCor.

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

◆ hitsX()

unsigned int MillePedeVariables::hitsX ( ) const
inline

get number of hits for x-measurement

Definition at line 76 of file MillePedeVariables.h.

76 { return myHitsX; }

References myHitsX.

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

◆ hitsY()

unsigned int MillePedeVariables::hitsY ( ) const
inline

get number of hits for y-measurement

Definition at line 82 of file MillePedeVariables.h.

82 { return myHitsY; }

References myHitsY.

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

◆ increaseHitsX()

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

increase hits for x-measurement

Definition at line 78 of file MillePedeVariables.h.

78 { myHitsX += add; }

References PVValHelper::add(), and myHitsX.

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

◆ increaseHitsY()

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

increase hits for y-measurement

Definition at line 84 of file MillePedeVariables.h.

84 { myHitsY += add; }

References PVValHelper::add(), and myHitsY.

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

◆ isFixed()

bool MillePedeVariables::isFixed ( unsigned int  nParam) const

true if parameter is fixed

Definition at line 47 of file MillePedeVariables.cc.

47  {
48  if (nParam >= this->size())
49  return false;
50 
51  return (this->preSigma()[nParam] < 0.);
52 }

References preSigma(), and size().

Referenced by PedeReader::setParameter().

◆ isValid() [1/2]

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

get valid flag array for changing it

Definition at line 38 of file MillePedeVariables.h.

38 { return myIsValid; }

References myIsValid.

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

◆ isValid() [2/2]

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

◆ label()

unsigned int MillePedeVariables::label ( ) const
inline

get alignable label as used by pede

Definition at line 66 of file MillePedeVariables.h.

66 { return myLabel; }

References myLabel.

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

◆ name()

const std::string& MillePedeVariables::name ( ) const
inline

◆ parameter() [1/2]

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

get array of parameters for changing it

Definition at line 63 of file MillePedeVariables.h.

63 { return myParameter; }

References myParameter.

◆ parameter() [2/2]

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

get array of parameters

Definition at line 61 of file MillePedeVariables.h.

61 { return myParameter; }

References myParameter.

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

◆ preSigma() [1/2]

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

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

Definition at line 53 of file MillePedeVariables.h.

53 { return myPreSigma; }

References myPreSigma.

◆ preSigma() [2/2]

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

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

Definition at line 51 of file MillePedeVariables.h.

51 { return myPreSigma; }

References myPreSigma.

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

◆ setAllDefault()

bool MillePedeVariables::setAllDefault ( unsigned int  nParam)

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

Definition at line 32 of file MillePedeVariables.cc.

32  {
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 }

References myDiffBefore, myGlobalCor, myIsValid, myParameter, myPreSigma, mySigma, pfTracksFromL1Tracks_cfi::nParam, and size().

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

◆ setHitsX()

void MillePedeVariables::setHitsX ( unsigned int  hitsX)
inline

Definition at line 79 of file MillePedeVariables.h.

79 { myHitsX = hitsX; }

References hitsX(), and myHitsX.

Referenced by MillePedeVariablesIORoot::readOne().

◆ setHitsY()

void MillePedeVariables::setHitsY ( unsigned int  hitsY)
inline

Definition at line 85 of file MillePedeVariables.h.

85 { myHitsY = hitsY; }

References hitsY(), and myHitsY.

Referenced by MillePedeVariablesIORoot::readOne().

◆ setLabel()

void MillePedeVariables::setLabel ( unsigned int  label)
inline

set alignable label as used by pede

Definition at line 68 of file MillePedeVariables.h.

68 { myLabel = label; }

References label(), and myLabel.

Referenced by SequenceTypes.DummyModule::__init__(), and SequenceTypes.DummyBooleanModule::__init__().

◆ setName()

void MillePedeVariables::setName ( const std::string &  name)
inline

set alignable name

Definition at line 73 of file MillePedeVariables.h.

73 { myName = name; }

References myName, and name().

◆ sigma() [1/2]

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

get array of sigmas for changing it

Definition at line 58 of file MillePedeVariables.h.

58 { return mySigma; }

References mySigma.

◆ sigma() [2/2]

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

get array of sigmas

Definition at line 56 of file MillePedeVariables.h.

56 { return mySigma; }

References mySigma.

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

◆ size()

unsigned int MillePedeVariables::size ( void  ) const
inline

Member Data Documentation

◆ myDiffBefore

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

Definition at line 94 of file MillePedeVariables.h.

Referenced by diffBefore(), and setAllDefault().

◆ myGlobalCor

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

Definition at line 95 of file MillePedeVariables.h.

Referenced by globalCor(), and setAllDefault().

◆ myHitsX

unsigned int MillePedeVariables::myHitsX
private

Definition at line 99 of file MillePedeVariables.h.

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

◆ myHitsY

unsigned int MillePedeVariables::myHitsY
private

Definition at line 100 of file MillePedeVariables.h.

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

◆ myIsValid

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

Definition at line 93 of file MillePedeVariables.h.

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

◆ myLabel

unsigned int MillePedeVariables::myLabel
private

Definition at line 101 of file MillePedeVariables.h.

Referenced by label(), and setLabel().

◆ myName

std::string MillePedeVariables::myName
private

Definition at line 102 of file MillePedeVariables.h.

Referenced by name(), and setName().

◆ myParameter

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

<= 0 means fixed

Definition at line 97 of file MillePedeVariables.h.

Referenced by parameter(), and setAllDefault().

◆ myPreSigma

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

Definition at line 96 of file MillePedeVariables.h.

Referenced by preSigma(), and setAllDefault().

◆ mySigma

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

Definition at line 98 of file MillePedeVariables.h.

Referenced by setAllDefault(), and sigma().

MillePedeVariables::myDiffBefore
std::vector< float > myDiffBefore
Definition: MillePedeVariables.h:94
mps_fire.i
i
Definition: mps_fire.py:428
pfTracksFromL1Tracks_cfi.nParam
nParam
Definition: pfTracksFromL1Tracks_cfi.py:5
MillePedeVariables::myName
std::string myName
Definition: MillePedeVariables.h:102
MillePedeVariables::hitsY
unsigned int hitsY() const
get number of hits for y-measurement
Definition: MillePedeVariables.h:82
MillePedeVariables::size
unsigned int size() const
number of parameters
Definition: MillePedeVariables.h:33
MillePedeVariables::label
unsigned int label() const
get alignable label as used by pede
Definition: MillePedeVariables.h:66
MillePedeVariables::myLabel
unsigned int myLabel
Definition: MillePedeVariables.h:101
MillePedeVariables::hitsX
unsigned int hitsX() const
get number of hits for x-measurement
Definition: MillePedeVariables.h:76
MillePedeVariables::myHitsY
unsigned int myHitsY
Definition: MillePedeVariables.h:100
MillePedeVariables::setAllDefault
bool setAllDefault(unsigned int nParam)
set default values for all data concerning nParam (false if nParam out of range)
Definition: MillePedeVariables.cc:32
MillePedeVariables::myHitsX
unsigned int myHitsX
Definition: MillePedeVariables.h:99
MillePedeVariables::myParameter
std::vector< float > myParameter
<= 0 means fixed
Definition: MillePedeVariables.h:97
PVValHelper::add
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
Definition: PVValidationHelpers.cc:12
MillePedeVariables::mySigma
std::vector< float > mySigma
Definition: MillePedeVariables.h:98
MillePedeVariables::preSigma
const std::vector< float > & preSigma() const
get array of presigmas (<= 0: means fixed)
Definition: MillePedeVariables.h:51
MillePedeVariables::myIsValid
std::vector< bool > myIsValid
Definition: MillePedeVariables.h:93
MillePedeVariables::myPreSigma
std::vector< float > myPreSigma
Definition: MillePedeVariables.h:96
MillePedeVariables::MillePedeVariables
MillePedeVariables()
Definition: MillePedeVariables.h:91
MillePedeVariables::name
const std::string & name() const
get alignable name
Definition: MillePedeVariables.h:71
MillePedeVariables::myGlobalCor
std::vector< float > myGlobalCor
Definition: MillePedeVariables.h:95