CMS 3D CMS Logo

TrackExtra.h

Go to the documentation of this file.
00001 #ifndef TrackReco_TrackExtra_h
00002 #define TrackReco_TrackExtra_h
00003 
00015 #include <Rtypes.h>
00016 #include "DataFormats/Math/interface/Vector3D.h"
00017 #include "DataFormats/Math/interface/Point3D.h"
00018 #include "DataFormats/Math/interface/Error.h"
00019 #include "DataFormats/TrackReco/interface/TrackExtraBase.h"
00020 #include "DataFormats/TrackReco/interface/TrackResiduals.h"
00021 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
00022 #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h"
00023 
00024 namespace reco {
00025   class TrackExtra : public TrackExtraBase {
00026   public:
00028     enum { dimension = 5 };
00030     enum { covarianceSize = dimension * ( dimension + 1 ) / 2 };
00032     typedef math::XYZPoint Point;
00034     typedef math::XYZVector Vector;
00036     typedef math::Error<5>::type CovarianceMatrix;
00038     typedef unsigned int index;
00039 
00041     TrackExtra(): outerOk_(false),
00042       outerDetId_(0),
00043       innerOk_(false),
00044       innerDetId_(0),
00045       seedDir_(anyDirection) { }
00046 
00048     TrackExtra( const Point & outerPosition, const Vector & outerMomentum, bool ok ,
00049                 const Point & innerPosition, const Vector & innerMomentum, bool iok,
00050                 const CovarianceMatrix& outerState, unsigned int outerId,
00051                 const CovarianceMatrix& innerState, unsigned int innerId, 
00052                 PropagationDirection seedDir, 
00053                 edm::RefToBase<TrajectorySeed>  seedRef=edm::RefToBase<TrajectorySeed>());
00054 
00056     const Point & outerPosition() const { return outerPosition_; }
00058     const Vector & outerMomentum() const { return outerMomentum_; }
00060     bool outerOk() const { return outerOk_; }
00062     const Point & innerPosition() const { return innerPosition_; }
00064     const Vector & innerMomentum() const { return innerMomentum_; }
00066     bool innerOk() const { return innerOk_; }
00068     double outerPx() const { return outerMomentum_.X(); }
00070     double outerPy() const { return outerMomentum_.Y(); }
00072     double outerPz() const { return outerMomentum_.Z(); }
00074     double outerX() const { return outerPosition_.X(); }
00076     double outerY() const { return outerPosition_.Y(); }
00078     double outerZ() const { return outerPosition_.Z(); }
00080     double outerP() const { return outerMomentum().R(); }
00082     double outerPt() const { return outerMomentum().Rho(); }
00084     double outerPhi() const { return outerMomentum().Phi(); }
00086     double outerEta() const { return outerMomentum().Eta(); }
00088     double outerTheta() const { return outerMomentum().Theta(); }
00090     double outerRadius() const { return outerPosition().Rho(); }
00091 
00093     CovarianceMatrix outerStateCovariance() const;
00095     CovarianceMatrix innerStateCovariance() const;
00097     CovarianceMatrix & fillOuter( CovarianceMatrix & v ) const;
00099     CovarianceMatrix & fillInner( CovarianceMatrix & v ) const;
00101     unsigned int outerDetId() const { return outerDetId_; }
00103     unsigned int innerDetId() const { return innerDetId_; }
00104     // direction how the hits were sorted in the original seed
00105     PropagationDirection seedDirection() const {return seedDir_;}
00106 
00112     edm::RefToBase<TrajectorySeed> seedRef() const { return seedRef_; }
00113 
00115     void setResiduals (const TrackResiduals &r) { trackResiduals_ = r; }
00116 
00118     const TrackResiduals &residuals () const { return trackResiduals_; }
00119 
00120   private:
00121 
00123     Point outerPosition_;
00125     Vector outerMomentum_;
00127     bool outerOk_;
00129     float outerCovariance_[ covarianceSize ];
00130     unsigned int outerDetId_;
00131 
00132 
00134     Point innerPosition_;
00136     Vector innerMomentum_;
00138     bool innerOk_;
00140     float innerCovariance_[ covarianceSize ];
00141     unsigned int innerDetId_;
00142 
00143     PropagationDirection seedDir_;
00144     edm::RefToBase<TrajectorySeed> seedRef_;
00145 
00147     TrackResiduals trackResiduals_;
00148   };
00149 
00150 }
00151 
00152 #endif

Generated on Tue Jun 9 17:31:47 2009 for CMSSW by  doxygen 1.5.4