00001 #ifndef PerigeeLinearizedTrackState_H 00002 #define PerigeeLinearizedTrackState_H 00003 00004 #include "RecoVertex/VertexPrimitives/interface/LinearizedTrackState.h" 00005 #include "TrackingTools/PatternTools/interface/TSCPBuilderNoMaterial.h" 00006 #include "DataFormats/GeometrySurface/interface/ReferenceCounted.h" 00007 #include "RecoVertex/VertexPrimitives/interface/LinearizedTrackState.h" 00008 #include "Math/SMatrix.h" 00009 #include "DataFormats/CLHEP/interface/Migration.h" 00010 00032 class PerigeeLinearizedTrackState : public LinearizedTrackState<5> { 00033 00034 00035 public: 00036 00040 friend class LinearizedTrackStateFactory; 00041 typedef ReferenceCountingPointer<LinearizedTrackState<5> > RefCountedLinearizedTrackState; 00042 00047 virtual RefCountedLinearizedTrackState stateWithNewLinearizationPoint 00048 (const GlobalPoint & newLP) const; 00049 00050 00054 const GlobalPoint & linearizationPoint() const { return theLinPoint; } 00055 00056 virtual reco::TransientTrack track() const { return theTrack; } 00057 00058 const TrajectoryStateOnSurface state() const { return theTSOS; } 00059 00063 const AlgebraicVector5 & constantTerm() const; 00064 00068 const AlgebraicMatrix53 & positionJacobian() const; 00069 00073 const AlgebraicMatrix53 & momentumJacobian() const; 00074 00077 const AlgebraicVector5 & parametersFromExpansion() const; 00078 00083 const TrajectoryStateClosestToPoint & predictedState() const; 00084 00088 AlgebraicVector5 predictedStateParameters() const; 00089 00093 virtual AlgebraicVector3 predictedStateMomentumParameters() const; 00094 00098 AlgebraicSymMatrix55 predictedStateWeight() const; 00099 00103 AlgebraicSymMatrix55 predictedStateError() const; 00104 00108 AlgebraicSymMatrix33 predictedStateMomentumError() const; 00109 00110 // /** Method returning the impact point measurement 00111 // */ 00112 // ImpactPointMeasurement impactPointMeasurement() const; 00113 00114 TrackCharge charge() const {return theCharge;} 00115 00116 bool hasError() const; 00117 00118 bool operator ==(LinearizedTrackState<5> & other)const; 00119 00120 bool operator ==(ReferenceCountingPointer<LinearizedTrackState<5> >& other)const; 00121 00125 virtual RefCountedRefittedTrackState createRefittedTrackState( 00126 const GlobalPoint & vertexPosition, 00127 const AlgebraicVector3 & vectorParameters, 00128 const AlgebraicSymMatrix66 & covarianceMatrix) const; 00129 00130 00131 virtual AlgebraicVector5 refittedParamFromEquation( 00132 const RefCountedRefittedTrackState & theRefittedState) const; 00133 00134 virtual double weightInMixture() const {return theTSOS.weight();} 00135 00136 virtual void inline checkParameters(AlgebraicVector5 & parameters) const; 00137 00138 virtual std::vector<ReferenceCountingPointer<LinearizedTrackState<5> > > components() 00139 const; 00140 00141 00142 private: 00143 00147 PerigeeLinearizedTrackState(const GlobalPoint & linP, const reco::TransientTrack & track, 00148 const TrajectoryStateOnSurface& tsos) 00149 : theLinPoint(linP), theTrack(track), jacobiansAvailable(false), 00150 // impactPointAvailable(false), 00151 theCharge(theTrack.charge()), theTSOS(tsos) {} 00152 00155 void computeJacobians() const; 00158 void computeChargedJacobians() const; 00161 void computeNeutralJacobians() const; 00164 void compute3DImpactPoint() const; 00165 00166 GlobalPoint theLinPoint; 00167 reco::TransientTrack theTrack; 00168 00169 mutable bool jacobiansAvailable; 00170 mutable AlgebraicMatrix53 thePositionJacobian, theMomentumJacobian; 00171 mutable TrajectoryStateClosestToPoint thePredState; 00172 mutable AlgebraicVector5 theConstantTerm; 00173 mutable AlgebraicVector5 theExpandedParams; 00174 00175 // ImpactPointMeasurementExtractor theIPMExtractor; 00176 TSCPBuilderNoMaterial builder; 00177 // mutable bool impactPointAvailable; 00178 // mutable ImpactPointMeasurement the3DImpactPoint; 00179 TrackCharge theCharge; 00180 const TrajectoryStateOnSurface theTSOS; 00181 }; 00182 00183 #endif