CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/RecoVertex/KinematicFitPrimitives/interface/ParticleKinematicLinearizedTrackState.h

Go to the documentation of this file.
00001 #ifndef ParticleKinematicLinearizedTrackState_H
00002 #define ParticleKinematicLinearizedTrackState_H
00003 
00004 #include "RecoVertex/VertexPrimitives/interface/LinearizedTrackState.h"
00005 #include "RecoVertex/KinematicFitPrimitives/interface/RefCountedKinematicParticle.h"
00006 #include "RecoVertex/VertexPrimitives/interface/RefittedTrackState.h"
00007 #include "RecoVertex/KinematicFitPrimitives/interface/PerigeeKinematicState.h"
00008 #include "RecoVertex/KinematicFitPrimitives/interface/TransientTrackKinematicStateBuilder.h"
00009 #include "DataFormats/GeometrySurface/interface/ReferenceCounted.h"
00010 #include "DataFormats/CLHEP/interface/Migration.h"
00011 #include "RecoVertex/KinematicFitPrimitives/interface/Matrices.h"
00012 
00013 class ParticleKinematicLinearizedTrackState : public LinearizedTrackState<6> {
00014 
00015 public:
00016  
00017  friend class ParticleKinematicLinearizedTrackStateFactory;
00018  typedef ReferenceCountingPointer<LinearizedTrackState<6> > RefCountedLinearizedTrackState;
00019 
00020  ParticleKinematicLinearizedTrackState()
00021  {jacobiansAvailable = false;}
00022  
00027  virtual ReferenceCountingPointer<LinearizedTrackState<6> > stateWithNewLinearizationPoint
00028         (const GlobalPoint & newLP) const; 
00029         
00033  const GlobalPoint & linearizationPoint() const { return theLinPoint; }
00034  
00035 
00039  const AlgebraicVector6 & constantTerm() const;
00040 
00044  virtual const AlgebraicMatrix63 & positionJacobian() const;
00045 
00049  virtual const AlgebraicMatrix64 & momentumJacobian() const;
00050 
00053  const AlgebraicVector6 & parametersFromExpansion() const;
00054 
00063  AlgebraicVector6 predictedStateParameters() const;
00064     
00068  AlgebraicVectorM predictedStateMomentumParameters() const; 
00069 
00073  AlgebraicSymMatrix44 predictedStateMomentumError() const; 
00074 
00078  AlgebraicSymMatrix66 predictedStateWeight(int & error) const;
00079   
00083  AlgebraicSymMatrix66 predictedStateError() const; 
00084 
00085 // /** 
00086 //  * Method returning the impact point measurement     
00087 //  */      
00088 //  ImpactPointMeasurement impactPointMeasurement() const;
00089   
00090  TrackCharge charge() const;
00091  
00092  RefCountedKinematicParticle particle() const;
00093    
00094  bool operator ==(LinearizedTrackState<6>& other)const;
00095  
00096  bool hasError() const;
00097  
00098  RefCountedRefittedTrackState createRefittedTrackState(
00099                      const GlobalPoint & vertexPosition, 
00100                      const AlgebraicVectorM & vectorParameters,
00101                      const AlgebraicSymMatrix77 & covarianceMatrix) const;
00102                      
00106   virtual AlgebraicVectorN refittedParamFromEquation(
00107         const RefCountedRefittedTrackState & theRefittedState) const;
00108 
00109   virtual inline void checkParameters(AlgebraicVectorN & parameters) const;
00110                      
00111  double weightInMixture() const;
00112 
00113  std::vector<ReferenceCountingPointer<LinearizedTrackState<6> > > components()
00114                                                                         const;
00115  
00116  virtual reco::TransientTrack track() const;
00117 
00118  
00119 private:
00120 
00124   ParticleKinematicLinearizedTrackState(const GlobalPoint & linP, RefCountedKinematicParticle & prt) 
00125               : theLinPoint(linP), part(prt), jacobiansAvailable(false),
00126               theCharge(prt->currentState().particleCharge())  ,impactPointAvailable(false)
00127            
00128     {}
00129     
00133   void computeJacobians() const;
00137   void computeChargedJacobians() const;
00138  
00142   void computeNeutralJacobians() const;   
00143      
00144      
00145   GlobalPoint theLinPoint;
00146   RefCountedKinematicParticle part;
00147   TransientTrackKinematicStateBuilder builder;
00148   
00149   mutable bool errorAvailable;
00150   mutable bool jacobiansAvailable;
00151   mutable AlgebraicMatrix63 thePositionJacobian;
00152   mutable AlgebraicMatrix64 theMomentumJacobian;
00153   mutable PerigeeKinematicState thePredState;
00154   mutable AlgebraicVector6 theConstantTerm;
00155   mutable AlgebraicVector6 theExpandedParams;
00156   
00157   TrackCharge theCharge;
00158 //   ImpactPointMeasurementExtractor theIPMExtractor;
00159   mutable bool impactPointAvailable; 
00160 };
00161 #endif