File indexing completed on 2024-11-15 23:41:00
0001 #ifndef PerigeeTrajectoryError_H
0002 #define PerigeeTrajectoryError_H
0003
0004 #include "TrackingTools/TrajectoryParametrization/interface/TrajectoryStateExceptions.h"
0005 #include "DataFormats/Math/interface/AlgebraicROOTObjects.h"
0006 #include "FWCore/Utilities/interface/Likely.h"
0007
0008
0009
0010
0011
0012
0013
0014 class PerigeeTrajectoryError {
0015 public:
0016 PerigeeTrajectoryError() : weightIsAvailable(false) {}
0017
0018
0019
0020
0021
0022
0023 explicit PerigeeTrajectoryError(const AlgebraicSymMatrix55 &aPerigeeError)
0024 : thePerigeeError(aPerigeeError), weightIsAvailable(false) {}
0025
0026
0027
0028
0029 const AlgebraicSymMatrix55 &covarianceMatrix() const { return thePerigeeError; }
0030
0031
0032
0033
0034
0035 const AlgebraicSymMatrix55 &weightMatrix(int &error) const {
0036 if UNLIKELY (!weightIsAvailable)
0037 calculateWeightMatrix();
0038 error = inverseError;
0039 return thePerigeeWeight;
0040 }
0041
0042 void calculateWeightMatrix() const;
0043
0044 double transverseCurvatureError() const { return sqrt(thePerigeeError(0, 0)); }
0045
0046
0047
0048
0049
0050 double thetaError() const { return sqrt(thePerigeeError(1, 1)); }
0051
0052
0053
0054
0055
0056 double phiError() const { return sqrt(thePerigeeError(2, 2)); }
0057
0058
0059
0060
0061
0062 double transverseImpactParameterError() const { return sqrt(thePerigeeError(3, 3)); }
0063
0064
0065
0066
0067
0068 double longitudinalImpactParameterError() const { return sqrt(thePerigeeError(4, 4)); }
0069
0070 private:
0071 AlgebraicSymMatrix55 thePerigeeError;
0072 mutable AlgebraicSymMatrix55 thePerigeeWeight;
0073 mutable int inverseError;
0074 mutable bool weightIsAvailable = false;
0075 };
0076 #endif