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 00099 AlgebraicSymMatrix55 predictedStateWeight(int & error) const; 00100 00104 AlgebraicSymMatrix55 predictedStateError() const; 00105 00109 AlgebraicSymMatrix33 predictedStateMomentumError() const; 00110 00111 // /** Method returning the impact point measurement 00112 // */ 00113 // ImpactPointMeasurement impactPointMeasurement() const; 00114 00115 TrackCharge charge() const {return theCharge;} 00116 00117 bool hasError() const; 00118 00119 bool operator ==(LinearizedTrackState<5> & other)const; 00120 00121 bool operator ==(ReferenceCountingPointer<LinearizedTrackState<5> >& other)const; 00122 00126 virtual RefCountedRefittedTrackState createRefittedTrackState( 00127 const GlobalPoint & vertexPosition, 00128 const AlgebraicVector3 & vectorParameters, 00129 const AlgebraicSymMatrix66 & covarianceMatrix) const; 00130 00131 00132 virtual AlgebraicVector5 refittedParamFromEquation( 00133 const RefCountedRefittedTrackState & theRefittedState) const; 00134 00135 virtual double weightInMixture() const {return theTSOS.weight();} 00136 00137 virtual void inline checkParameters(AlgebraicVector5 & parameters) const; 00138 00139 virtual std::vector<ReferenceCountingPointer<LinearizedTrackState<5> > > components() 00140 const; 00141 00142 virtual bool isValid() const; 00143 00144 private: 00145 00149 PerigeeLinearizedTrackState(const GlobalPoint & linP, const reco::TransientTrack & track, 00150 const TrajectoryStateOnSurface& tsos) 00151 : theLinPoint(linP), theTrack(track), jacobiansAvailable(false), 00152 // impactPointAvailable(false), 00153 theCharge(theTrack.charge()), theTSOS(tsos) {} 00154 00157 void computeJacobians() const; 00160 void computeChargedJacobians() const; 00163 void computeNeutralJacobians() const; 00166 void compute3DImpactPoint() const; 00167 00168 GlobalPoint theLinPoint; 00169 reco::TransientTrack theTrack; 00170 00171 mutable bool jacobiansAvailable; 00172 mutable AlgebraicMatrix53 thePositionJacobian, theMomentumJacobian; 00173 mutable TrajectoryStateClosestToPoint thePredState; 00174 mutable AlgebraicVector5 theConstantTerm; 00175 mutable AlgebraicVector5 theExpandedParams; 00176 00177 // ImpactPointMeasurementExtractor theIPMExtractor; 00178 TSCPBuilderNoMaterial builder; 00179 // mutable bool impactPointAvailable; 00180 // mutable ImpactPointMeasurement the3DImpactPoint; 00181 TrackCharge theCharge; 00182 const TrajectoryStateOnSurface theTSOS; 00183 }; 00184 00185 #endif