File indexing completed on 2024-04-06 11:57:29
0001 #ifndef Alignment_TwoBodyDecay_TwoBodyDecayParameters_h
0002 #define Alignment_TwoBodyDecay_TwoBodyDecayParameters_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
0013
0014 class TwoBodyDecayParameters {
0015 public:
0016
0017 enum ParameterName { x = 0, y = 1, z = 2, px = 3, py = 4, pz = 5, theta = 6, phi = 7, mass = 8 };
0018
0019 enum { dimension = 9 };
0020
0021 TwoBodyDecayParameters(void) : theParameters(AlgebraicVector()), theCovariance(AlgebraicSymMatrix()) {}
0022
0023 TwoBodyDecayParameters(const AlgebraicVector ¶m, const AlgebraicSymMatrix &cov)
0024 : theParameters(param), theCovariance(cov) {}
0025
0026 TwoBodyDecayParameters(const AlgebraicVector ¶m) : theParameters(param), theCovariance(AlgebraicSymMatrix()) {}
0027
0028 TwoBodyDecayParameters(const TwoBodyDecayParameters &other)
0029 : theParameters(other.parameters()), theCovariance(other.covariance()) {}
0030
0031 ~TwoBodyDecayParameters(void) {}
0032
0033
0034 inline const AlgebraicVector ¶meters(void) const { return theParameters; }
0035
0036
0037 inline const AlgebraicSymMatrix &covariance(void) const { return theCovariance; }
0038
0039
0040 inline double operator[](ParameterName name) const { return theParameters[name]; }
0041
0042
0043 inline double operator()(ParameterName name) const { return theParameters[name]; }
0044
0045
0046 inline const AlgebraicVector sub(ParameterName first, ParameterName last) const {
0047 return theParameters.sub(first + 1, last + 1);
0048 }
0049
0050 inline bool hasError(void) const { return (theCovariance.num_row() != 0); }
0051
0052 private:
0053 AlgebraicVector theParameters;
0054 AlgebraicSymMatrix theCovariance;
0055 };
0056
0057 #endif