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() [1/2]

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),
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 }
std::vector< bool > myIsValid
unsigned int label() const
get alignable label as used by pede
std::vector< float > myDiffBefore
std::vector< float > myParameter
<= 0 means fixed
std::vector< float > mySigma
std::vector< float > myPreSigma
const std::string & name() const
get alignable name
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::~MillePedeVariables ( )
overridedefault

destructor

◆ MillePedeVariables() [2/2]

MillePedeVariables::MillePedeVariables ( )
inlineprivate

Definition at line 91 of file MillePedeVariables.h.

Referenced by clone().

91 {} // make unusable default constructor

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.

References MillePedeVariables().

28 { return new MillePedeVariables(*this); }

◆ diffBefore() [1/2]

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().

41 { return myDiffBefore; }
std::vector< float > myDiffBefore

◆ diffBefore() [2/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.

References myDiffBefore.

43 { return myDiffBefore; }
std::vector< float > myDiffBefore

◆ globalCor() [1/2]

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().

46 { return myGlobalCor; }
std::vector< float > myGlobalCor

◆ globalCor() [2/2]

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

get global correlation array for changing it

Definition at line 48 of file MillePedeVariables.h.

References myGlobalCor.

48 { return myGlobalCor; }
std::vector< float > myGlobalCor

◆ hitsX()

unsigned int MillePedeVariables::hitsX ( ) const
inline

get number of hits for x-measurement

Definition at line 76 of file MillePedeVariables.h.

References myHitsX.

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

76 { return myHitsX; }

◆ hitsY()

unsigned int MillePedeVariables::hitsY ( ) const
inline

get number of hits for y-measurement

Definition at line 82 of file MillePedeVariables.h.

References myHitsY.

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

82 { return myHitsY; }

◆ increaseHitsX()

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

increase hits for x-measurement

Definition at line 78 of file MillePedeVariables.h.

References PVValHelper::add(), and myHitsX.

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

78 { myHitsX += add; }
void add(std::map< std::string, TH1 *> &h, TH1 *hist)

◆ increaseHitsY()

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

increase hits for y-measurement

Definition at line 84 of file MillePedeVariables.h.

References PVValHelper::add(), and myHitsY.

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

84 { myHitsY += add; }
void add(std::map< std::string, TH1 *> &h, TH1 *hist)

◆ isFixed()

bool MillePedeVariables::isFixed ( unsigned int  nParam) const

true if parameter is fixed

Definition at line 47 of file MillePedeVariables.cc.

References preSigma(), and size().

Referenced by PedeReader::setParameter().

47  {
48  if (nParam >= this->size())
49  return false;
50 
51  return (this->preSigma()[nParam] < 0.);
52 }
const std::vector< float > & preSigma() const
get array of presigmas (<= 0: means fixed)
unsigned int size() const
number of parameters

◆ isValid() [1/2]

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

◆ isValid() [2/2]

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

get valid flag array for changing it

Definition at line 38 of file MillePedeVariables.h.

References myIsValid.

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

38 { return myIsValid; }
std::vector< bool > myIsValid

◆ label()

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 setLabel(), PedeReader::setParameter(), and MillePedeVariablesIORoot::writeOne().

66 { return myLabel; }

◆ name()

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

◆ parameter() [1/2]

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().

61 { return myParameter; }
std::vector< float > myParameter
<= 0 means fixed

◆ parameter() [2/2]

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

get array of parameters for changing it

Definition at line 63 of file MillePedeVariables.h.

References myParameter.

63 { return myParameter; }
std::vector< float > myParameter
<= 0 means fixed

◆ preSigma() [1/2]

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 isFixed(), MillePedeVariablesIORoot::readOne(), PedeReader::setParameter(), and MillePedeVariablesIORoot::writeOne().

51 { return myPreSigma; }
std::vector< float > myPreSigma

◆ preSigma() [2/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.

References myPreSigma.

53 { return myPreSigma; }
std::vector< float > myPreSigma

◆ 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.

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

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

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

◆ setHitsX()

void MillePedeVariables::setHitsX ( unsigned int  hitsX)
inline

Definition at line 79 of file MillePedeVariables.h.

References hitsX(), and myHitsX.

Referenced by MillePedeVariablesIORoot::readOne().

79 { myHitsX = hitsX; }
unsigned int hitsX() const
get number of hits for x-measurement

◆ setHitsY()

void MillePedeVariables::setHitsY ( unsigned int  hitsY)
inline

Definition at line 85 of file MillePedeVariables.h.

References hitsY(), and myHitsY.

Referenced by MillePedeVariablesIORoot::readOne().

85 { myHitsY = hitsY; }
unsigned int hitsY() const
get number of hits for y-measurement

◆ setLabel()

void MillePedeVariables::setLabel ( unsigned int  label)
inline

set alignable label as used by pede

Definition at line 68 of file MillePedeVariables.h.

References label(), and myLabel.

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

68 { myLabel = label; }
unsigned int label() const
get alignable label as used by pede

◆ setName()

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

set alignable name

Definition at line 73 of file MillePedeVariables.h.

References myName, and name().

73 { myName = name; }
const std::string & name() const
get alignable name

◆ sigma() [1/2]

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().

56 { return mySigma; }
std::vector< float > mySigma

◆ sigma() [2/2]

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

get array of sigmas for changing it

Definition at line 58 of file MillePedeVariables.h.

References mySigma.

58 { return mySigma; }
std::vector< float > mySigma

◆ 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().