Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:29

0001 #ifndef ALIGNMENT_POSITION_ERROR_H
0002 #define ALIGNMENT_POSITION_ERROR_H
0003 
0004 #include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h"
0005 
0006 /** The position error of a Det due to alignment.
0007  *  It is summed in quadrature with the RecHit global error.
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  // ALIGNMENT_POSITION_ERROR_H