File indexing completed on 2023-10-25 09:32:11
0001 #ifndef MILLEPEDEVARIABLES_H
0002 #define MILLEPEDEVARIABLES_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "Alignment/CommonAlignment/interface/AlignmentUserVariables.h"
0017
0018 #include <string>
0019 #include <vector>
0020
0021 class MillePedeVariables : public AlignmentUserVariables {
0022 public:
0023
0024 MillePedeVariables(unsigned int nParams, unsigned int label, const std::string& name);
0025
0026 ~MillePedeVariables() override = default;
0027
0028 MillePedeVariables* clone() const override { return new MillePedeVariables(*this); }
0029
0030
0031 bool setAllDefault(unsigned int nParam);
0032
0033 unsigned int size() const { return myIsValid.size(); }
0034
0035
0036 const std::vector<bool>& isValid() const { return myIsValid; }
0037
0038 std::vector<bool>& isValid() { return myIsValid; }
0039
0040
0041 const std::vector<float>& diffBefore() const { return myDiffBefore; }
0042
0043 std::vector<float>& diffBefore() { return myDiffBefore; }
0044
0045
0046 const std::vector<float>& globalCor() const { return myGlobalCor; }
0047
0048 std::vector<float>& globalCor() { return myGlobalCor; }
0049
0050
0051 const std::vector<float>& preSigma() const { return myPreSigma; }
0052
0053 std::vector<float>& preSigma() { return myPreSigma; }
0054
0055
0056 const std::vector<float>& sigma() const { return mySigma; }
0057
0058 std::vector<float>& sigma() { return mySigma; }
0059
0060
0061 const std::vector<float>& parameter() const { return myParameter; }
0062
0063 std::vector<float>& parameter() { return myParameter; }
0064
0065
0066 unsigned int label() const { return myLabel; }
0067
0068 void setLabel(unsigned int label) { myLabel = label; }
0069
0070
0071 const std::string& name() const { return myName; }
0072
0073 void setName(const std::string& name) { myName = name; }
0074
0075
0076 unsigned int hitsX() const { return myHitsX; }
0077
0078 void increaseHitsX(unsigned int add = 1) { myHitsX += add; }
0079 void setHitsX(unsigned int hitsX) { myHitsX = hitsX; }
0080
0081
0082 unsigned int hitsY() const { return myHitsY; }
0083
0084 void increaseHitsY(unsigned int add = 1) { myHitsY += add; }
0085 void setHitsY(unsigned int hitsY) { myHitsY = hitsY; }
0086
0087
0088 bool isFixed(unsigned int nParam) const;
0089
0090 private:
0091 MillePedeVariables() {}
0092
0093 std::vector<bool> myIsValid;
0094 std::vector<float> myDiffBefore;
0095 std::vector<float> myGlobalCor;
0096 std::vector<float> myPreSigma;
0097 std::vector<float> myParameter;
0098 std::vector<float> mySigma;
0099 unsigned int myHitsX;
0100 unsigned int myHitsY;
0101 unsigned int myLabel;
0102 std::string myName;
0103 };
0104
0105 #endif