1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#ifndef ALIGNMENT_POSITION_ERROR_H
#define ALIGNMENT_POSITION_ERROR_H
#include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h"
/** The position error of a Det due to alignment.
* It is summed in quadrature with the RecHit global error.
*/
class AlignmentPositionError {
public:
AlignmentPositionError() {}
AlignmentPositionError(float xx, float yy, float zz, float phixphix = 0, float phiyphiy = 0, float phizphiz = 0);
AlignmentPositionError(const GlobalErrorExtended& ge) : theGlobalError(ge) {}
AlignmentPositionError(const GlobalError& ge);
~AlignmentPositionError() {}
bool valid() const { return (theGlobalError.cxx() > 0 || theGlobalError.cyy() > 0 || theGlobalError.czz() > 0); }
const GlobalErrorExtended& globalError() const { return theGlobalError; };
AlignmentPositionError operator+(const AlignmentPositionError& ape) const {
return AlignmentPositionError(this->globalError() + ape.globalError());
};
AlignmentPositionError operator-(const AlignmentPositionError& ape) const {
return AlignmentPositionError(this->globalError() - ape.globalError());
};
AlignmentPositionError& operator+=(const AlignmentPositionError& ape) {
theGlobalError = GlobalErrorExtended(this->globalError() + ape.globalError());
return *this;
};
AlignmentPositionError& operator-=(const AlignmentPositionError& ape) {
theGlobalError = GlobalErrorExtended(this->globalError() - ape.globalError());
return *this;
};
private:
GlobalErrorExtended theGlobalError;
};
#endif // ALIGNMENT_POSITION_ERROR_H
|