File indexing completed on 2024-04-06 12:29:13
0001 #ifndef PerigeeKinematicState_H
0002 #define PerigeeKinematicState_H
0003
0004 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicState.h"
0005 #include "RecoVertex/KinematicFitPrimitives/interface/ExtendedPerigeeTrajectoryParameters.h"
0006 #include "RecoVertex/KinematicFitPrimitives/interface/ExtendedPerigeeTrajectoryError.h"
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 class PerigeeKinematicState {
0022 public:
0023 PerigeeKinematicState() {
0024 vl = false;
0025 errorIsAvailable = false;
0026 }
0027
0028 virtual ~PerigeeKinematicState() {}
0029
0030
0031
0032 bool hasError() const {
0033 if (!(isValid()))
0034 throw VertexException("PerigeeKinematicState::error is requested for the invalid state");
0035 return errorIsAvailable;
0036 }
0037
0038 bool isValid() const { return vl; }
0039
0040 const KinematicState& theState() const {
0041 if (!isValid())
0042 throw VertexException("PerigeeKinematicState::initial state is requested for the invalid state");
0043 return inState;
0044 }
0045
0046
0047
0048
0049 const GlobalPoint referencePoint() const {
0050 if (!isValid())
0051 throw VertexException("PerigeeKinematicState::point is requested for the invalid state");
0052 return point;
0053 }
0054
0055
0056
0057
0058
0059 const ExtendedPerigeeTrajectoryError& perigeeError() const {
0060 if (!(isValid()))
0061 throw VertexException("PerigeeKinematicState::requesting perigee error for invalid state");
0062 if (!(hasError()))
0063 throw VertexException("PerigeeKinematicState::requesting perigee error when none available");
0064 return cov;
0065 }
0066
0067
0068
0069
0070 const ExtendedPerigeeTrajectoryParameters& perigeeParameters() const {
0071 if (!(isValid()))
0072 throw VertexException("PerigeeKinematicState::requesting perigee parameters for invalid state");
0073 return par;
0074 }
0075
0076 private:
0077 friend class TransientTrackKinematicStateBuilder;
0078
0079 PerigeeKinematicState(const KinematicState& state, const GlobalPoint& pt);
0080
0081
0082
0083
0084
0085
0086 AlgebraicMatrix jacobianCurvilinear2Perigee(const FreeTrajectoryState& fts) const;
0087
0088 private:
0089 GlobalPoint point;
0090 ExtendedPerigeeTrajectoryParameters par;
0091 ExtendedPerigeeTrajectoryError cov;
0092 KinematicState inState;
0093 bool errorIsAvailable;
0094 bool vl;
0095 };
0096 #endif