00001 #ifndef GsfTrackReco_GsfTrackExtra_h 00002 #define GsfTrackReco_GsfTrackExtra_h 00003 00006 // #include "DataFormats/Math/interface/Vector3D.h" 00007 // #include "DataFormats/Math/interface/Point3D.h" 00008 // #include "DataFormats/Math/interface/Vector.h" 00009 // #include "DataFormats/Math/interface/Error.h" 00010 #include "DataFormats/GsfTrackReco/interface/GsfComponent5D.h" 00011 00012 namespace reco { 00013 class GsfTrackExtra { 00014 public: 00016 enum { dimension = 5 }; 00017 // /// error matrix size 00018 // enum { covarianceSize = dimension * ( dimension + 1 ) / 2 }; 00019 // /// point in the space 00020 // typedef math::XYZPoint Point; 00021 // /// spatial vector 00022 // typedef math::XYZVector Vector; 00023 // /// 5 parameter covariance matrix 00024 // typedef math::Error<dimension>::type CovarianceMatrix; 00025 // /// index type 00026 // typedef unsigned int index; 00028 typedef math::Vector<dimension>::type LocalParameterVector; 00030 typedef math::Error<dimension>::type LocalCovarianceMatrix; 00031 00033 GsfTrackExtra() { } 00035 GsfTrackExtra( const std::vector<GsfComponent5D>& outerStates, 00036 const double& outerLocalPzSign, 00037 const std::vector<GsfComponent5D>& innerStates, 00038 const double& innerLocalPzSign); 00040 double outerStateLocalPzSign() const {return positiveOuterStatePz_ ? 1. : -1.;} 00042 std::vector<double> outerStateWeights() const { return weights(outerStates_); } 00044 std::vector<LocalParameterVector> outerStateLocalParameters() const { 00045 return parameters(outerStates_); 00046 } 00048 std::vector<LocalCovarianceMatrix> outerStateCovariances() const { 00049 return covariances(outerStates_); 00050 } 00052 double innerStateLocalPzSign() const {return positiveInnerStatePz_ ? 1. : -1.;} 00054 std::vector<double> innerStateWeights() const { return weights(innerStates_); } 00056 std::vector<LocalParameterVector> innerStateLocalParameters() const { 00057 return parameters(innerStates_); 00058 } 00060 std::vector<LocalCovarianceMatrix> innerStateCovariances() const { 00061 return covariances(innerStates_); 00062 } 00063 00064 private: 00066 std::vector<double> weights (const std::vector<GsfComponent5D>& states) const; 00068 std::vector<LocalParameterVector> parameters (const std::vector<GsfComponent5D>& states) const; 00070 std::vector<LocalCovarianceMatrix> covariances (const std::vector<GsfComponent5D>& states) const; 00071 00072 private: 00074 std::vector<GsfComponent5D> outerStates_; 00076 bool positiveOuterStatePz_; 00078 std::vector<GsfComponent5D> innerStates_; 00080 bool positiveInnerStatePz_; 00081 }; 00082 00083 } 00084 00085 #endif