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:
24  MillePedeVariables(unsigned int nParams, unsigned int label, const std::string& name);
26  ~MillePedeVariables() override = default;
28  MillePedeVariables* clone() const override { return new MillePedeVariables(*this); }
29 
31  bool setAllDefault(unsigned int nParam);
33  unsigned int size() const { return myIsValid.size(); }
34 
36  const std::vector<bool>& isValid() const { return myIsValid; }
38  std::vector<bool>& isValid() { return myIsValid; }
39 
41  const std::vector<float>& diffBefore() const { return myDiffBefore; }
43  std::vector<float>& diffBefore() { return myDiffBefore; }
44 
46  const std::vector<float>& globalCor() const { return myGlobalCor; }
48  std::vector<float>& globalCor() { return myGlobalCor; }
49 
51  const std::vector<float>& preSigma() const { return myPreSigma; }
53  std::vector<float>& preSigma() { return myPreSigma; }
54 
56  const std::vector<float>& sigma() const { return mySigma; }
58  std::vector<float>& sigma() { return mySigma; }
59 
61  const std::vector<float>& parameter() const { return myParameter; }
63  std::vector<float>& parameter() { return myParameter; }
64 
66  unsigned int label() const { return myLabel; }
68  void setLabel(unsigned int label) { myLabel = label; }
69 
71  const std::string& name() const { return myName; }
73  void setName(const std::string& name) { myName = name; }
74 
76  unsigned int hitsX() const { return myHitsX; }
78  void increaseHitsX(unsigned int add = 1) { myHitsX += add; }
79  void setHitsX(unsigned int hitsX) { myHitsX = hitsX; }
80 
82  unsigned int hitsY() const { return myHitsY; }
84  void increaseHitsY(unsigned int add = 1) { myHitsY += add; }
85  void setHitsY(unsigned int hitsY) { myHitsY = hitsY; }
86 
88  bool isFixed(unsigned int nParam) const;
89 
90 private:
91  MillePedeVariables() {} // make unusable default constructor
92 
93  std::vector<bool> myIsValid;
94  std::vector<float> myDiffBefore;
95  std::vector<float> myGlobalCor;
96  std::vector<float> myPreSigma;
97  std::vector<float> myParameter;
98  std::vector<float> mySigma;
99  unsigned int myHitsX;
100  unsigned int myHitsY;
101  unsigned int myLabel;
103 };
104 
105 #endif
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
const std::vector< float > & preSigma() const
get array of presigmas (<= 0: means fixed)
std::vector< bool > myIsValid
const std::vector< bool > & isValid() const
get valid flag array
unsigned int hitsX() const
get number of hits for x-measurement
bool isFixed(unsigned int nParam) const
true if parameter is fixed
std::vector< bool > & isValid()
get valid flag array for changing it
unsigned int label() const
get alignable label as used by pede
void setHitsY(unsigned int hitsY)
std::vector< float > & parameter()
get array of parameters for changing it
std::vector< float > myDiffBefore
(Abstract) Base class for alignment algorithm user variables
const std::vector< float > & diffBefore() const
get array of differences to start value
MillePedeVariables * clone() const override
std::vector< float > & sigma()
get array of sigmas for changing it
std::vector< float > myParameter
<= 0 means fixed
const std::vector< float > & sigma() const
get array of sigmas
std::vector< float > mySigma
std::vector< float > myPreSigma
void add(std::map< std::string, TH1 *> &h, TH1 *hist)
void setName(const std::string &name)
set alignable name
const std::string & name() const
get alignable name
unsigned int size() const
number of parameters
std::vector< float > & diffBefore()
get array of differences to start value for changing it
const std::vector< float > & parameter() const
get array of parameters
void setLabel(unsigned int label)
set alignable label as used by pede
unsigned int hitsY() const
get number of hits for y-measurement
std::vector< float > myGlobalCor
~MillePedeVariables() override=default
const std::vector< float > & globalCor() const
get global correlation array
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