File indexing completed on 2024-09-10 02:58:37
0001 #ifndef ALIGNMENT_POSITION_ERROR_H
0002 #define ALIGNMENT_POSITION_ERROR_H
0003
0004 #include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h"
0005
0006
0007
0008
0009
0010 class AlignmentPositionError {
0011 public:
0012 AlignmentPositionError() {}
0013
0014 AlignmentPositionError(float xx, float yy, float zz, float phixphix = 0, float phiyphiy = 0, float phizphiz = 0);
0015
0016 AlignmentPositionError(const GlobalErrorExtended& ge) : theGlobalError(ge) {}
0017
0018 AlignmentPositionError(const GlobalError& ge);
0019
0020 ~AlignmentPositionError() {}
0021
0022 bool valid() const { return (theGlobalError.cxx() > 0 || theGlobalError.cyy() > 0 || theGlobalError.czz() > 0); }
0023
0024 const GlobalErrorExtended& globalError() const { return theGlobalError; };
0025
0026 AlignmentPositionError operator+(const AlignmentPositionError& ape) const {
0027 return AlignmentPositionError(this->globalError() + ape.globalError());
0028 };
0029
0030 AlignmentPositionError operator-(const AlignmentPositionError& ape) const {
0031 return AlignmentPositionError(this->globalError() - ape.globalError());
0032 };
0033
0034 AlignmentPositionError& operator+=(const AlignmentPositionError& ape) {
0035 theGlobalError = GlobalErrorExtended(this->globalError() + ape.globalError());
0036 return *this;
0037 };
0038
0039 AlignmentPositionError& operator-=(const AlignmentPositionError& ape) {
0040 theGlobalError = GlobalErrorExtended(this->globalError() - ape.globalError());
0041 return *this;
0042 };
0043
0044 private:
0045 GlobalErrorExtended theGlobalError;
0046 };
0047
0048 #endif