CMS 3D CMS Logo

MillePedeVariables.h
Go to the documentation of this file.
1 #ifndef MILLEPEDEVARIABLES_H
2 #define MILLEPEDEVARIABLES_H
3 
17 
18 #include <string>
19 #include <vector>
20 
22  public:
23 
25  MillePedeVariables(unsigned int nParams, unsigned int label, const std::string& name);
27  virtual ~MillePedeVariables() = default;
29  virtual MillePedeVariables* clone() const { return new MillePedeVariables(*this);}
30 
32  bool setAllDefault(unsigned int nParam);
34  unsigned int size() const {return myIsValid.size();}
35 
37  const std::vector<bool>& isValid() const { return myIsValid;}
39  std::vector<bool>& isValid() { return myIsValid;}
40 
42  const std::vector<float>& diffBefore() const {return myDiffBefore;}
44  std::vector<float>& diffBefore() {return myDiffBefore;}
45 
47  const std::vector<float>& globalCor() const {return myGlobalCor;}
49  std::vector<float>& globalCor() {return myGlobalCor;}
50 
52  const std::vector<float>& preSigma() const {return myPreSigma;}
54  std::vector<float>& preSigma() {return myPreSigma;}
55 
57  const std::vector<float>& sigma() const {return mySigma;}
59  std::vector<float>& sigma() {return mySigma;}
60 
62  const std::vector<float>& parameter() const {return myParameter;}
64  std::vector<float>& parameter() {return myParameter;}
65 
67  unsigned int label() const {return myLabel;}
69  void setLabel(unsigned int label) { myLabel = label;}
70 
72  const std::string& name() const { return myName; }
74  void setName(const std::string& name) { myName = name;}
75 
77  unsigned int hitsX() const {return myHitsX;}
79  void increaseHitsX(unsigned int add = 1) { myHitsX += add;}
80  void setHitsX(unsigned int hitsX) { myHitsX = hitsX;}
81 
83  unsigned int hitsY() const {return myHitsY;}
85  void increaseHitsY(unsigned int add = 1) { myHitsY += add;}
86  void setHitsY(unsigned int hitsY) { myHitsY = hitsY;}
87 
89  bool isFixed(unsigned int nParam) const;
90 
91  private:
92  MillePedeVariables() {} // make unusable default constructor
93 
94  std::vector<bool> myIsValid;
95  std::vector<float> myDiffBefore;
96  std::vector<float> myGlobalCor;
97  std::vector<float> myPreSigma;
98  std::vector<float> myParameter;
99  std::vector<float> mySigma;
100  unsigned int myHitsX;
101  unsigned int myHitsY;
102  unsigned int myLabel;
104 };
105 
106 #endif
unsigned int hitsX() const
get number of hits for x-measurement
unsigned int label() const
get alignable label as used by pede
const std::vector< float > & globalCor() const
get global correlation array
unsigned int size() const
number of parameters
void increaseHitsX(unsigned int add=1)
increase hits for x-measurement
std::vector< float > & preSigma()
get array of presigmas (<= 0: means fixed) for changing it
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 > myIsValid
const std::vector< float > & parameter() const
get array of parameters
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
const std::string & name() const
get alignable name
virtual MillePedeVariables * clone() const
std::vector< bool > & isValid()
get valid flag array for changing it
void setHitsY(unsigned int hitsY)
const std::vector< float > & preSigma() const
get array of presigmas (<= 0: means fixed)
std::vector< float > & parameter()
get array of parameters for changing it
unsigned int hitsY() const
get number of hits for y-measurement
const std::vector< float > & sigma() const
get array of sigmas
std::vector< float > myDiffBefore
(Abstract) Base class for alignment algorithm user variables
std::vector< float > & sigma()
get array of sigmas for changing it
const std::vector< float > & diffBefore() const
get array of differences to start value
std::vector< float > myParameter
<= 0 means fixed
const std::vector< bool > & isValid() const
get valid flag array
std::vector< float > mySigma
virtual ~MillePedeVariables()=default
std::vector< float > myPreSigma
void setName(const std::string &name)
set alignable name
std::vector< float > & diffBefore()
get array of differences to start value for changing it
void setLabel(unsigned int label)
set alignable label as used by pede
std::vector< float > myGlobalCor
bool setAllDefault(unsigned int nParam)
set default values for all data concerning nParam (false if nParam out of range)
void setHitsX(unsigned int hitsX)
std::vector< float > & globalCor()
get global correlation array for changing it